Skip to content

Enable tests on Android bot #9120

Closed
Closed
@sanxiyn

Description

@sanxiyn
Member

Android port is pretty stable now. It is stable enough to compile working Servo, for example. Let's enable tests on Android bot and start to block pull requests on it. We can reconsider if it is causing problems.

Activity

sanxiyn

sanxiyn commented on Sep 11, 2013

@sanxiyn
MemberAuthor

When the pull request is merged, make check-stage2-T-arm-linux-androideabi-H-x86_64-unknown-linux-gnu-rpass will pass. It takes about 5 minutes running on a hardware Android device.

alexcrichton

alexcrichton commented on Sep 12, 2013

@alexcrichton
Member

Doesn't this involve having hardware with an arm processor on it? Right now I don't think that build artifacts are transferred between builders which is what it seems like this would have to do.

This would be awesome to be able to run tests on arm though, especially if it wasn't a huge slowdown on cycle time.

sanxiyn

sanxiyn commented on Sep 12, 2013

@sanxiyn
MemberAuthor

There is already an (admittedly hacky) necessary automation in place to transfer build artifacts to (and results from) an Android device using adb. It can be used with either a hardware Android device, or an Android emulator.

added a commit that references this issue on Sep 16, 2013

auto merge of #9121 : sanxiyn/rust/arm, r=alexcrichton

sanxiyn

sanxiyn commented on Sep 16, 2013

@sanxiyn
MemberAuthor

Pinging @brson.

brson

brson commented on Sep 17, 2013

@brson
Contributor

We can't get this done before 0.8. Let's try afterward.

sanxiyn

sanxiyn commented on Sep 30, 2013

@sanxiyn
MemberAuthor

Unfortunately, this regressed, and currently all binaries result in segmentation fault on ARM. I bisected the problem down to #9301. Any idea what might be causing this?

alexcrichton

alexcrichton commented on Sep 30, 2013

@alexcrichton
Member

That commit had to do with changing how the global crate map is passed around. It was no longer passed explicitly to main, but rather exposed as a weak symbol through various platform-defined methods. It perhaps means that the symbol/linker on arm does something a tad bit unusual, but it would probably warrant more investigation.

If the symbol returned NULL, then that'd kill all programs because one of the first things the runtime does is to set up logging.

huonw

huonw commented on Sep 30, 2013

@huonw
Member

@fhahn's work in #9593 will probably fix the segfault (but disabling logging), assuming that he implements @luqmana's suggestion to detect the crate map being null.

luqmana

luqmana commented on Sep 30, 2013

@luqmana
Member

I tried a quick test by running a simple hello world (with some caveats as documented at #9632) with the android emulator and I can't reproduce a segfault.

luqmana

luqmana commented on Sep 30, 2013

@luqmana
Member

Logging seems to work fine too. @sanxiyn Could you get a stacktrace?

sanxiyn

sanxiyn commented on Oct 1, 2013

@sanxiyn
MemberAuthor

I can reproduce the segfault with the Android emulator. I am not sure what's going on... Also, does anyone know how can one get a stack trace on Android?

sanxiyn

sanxiyn commented on Oct 2, 2013

@sanxiyn
MemberAuthor

My current hypothesis is that Android dynamic linker does something different for weak symbols. See this comment for example. I also confirmed that Android dynamic linker behaves differently from Linux dynamic linker with respect to weak symbols using a simple C code.

So 1. is this plausible, and 2. is it possible to avoid use of weak symbols? Thanks.

alexcrichton

alexcrichton commented on Oct 2, 2013

@alexcrichton
Member

Does that mean that weak symbols don't work at all on android, or does that means that weak symbols just work differently on android?

If they don't work at all, we may have to re-think how we do this, but if they do work in some situations, then we can certainly have android-specific behavior.

10 remaining items

added a commit that references this issue on Nov 11, 2013

auto merge of #10394 : yichoi/rust/make_check_pass_android, r=brson

sanxiyn

sanxiyn commented on Feb 4, 2014

@sanxiyn
MemberAuthor
added a commit that references this issue on Jul 18, 2022

Auto merge of rust-lang#9120 - anall:bugfix/ice9041, r=Jarcho

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-androidOperating system: Android

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @sanxiyn@alexcrichton@brson@luqmana@huonw

        Issue actions

          Enable tests on Android bot · Issue #9120 · rust-lang/rust