Make std tests pass on newer Android by pcc · Pull Request #102757 · rust-lang/r...
source link: https://github.com/rust-lang/rust/pull/102757
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Make std tests pass on newer Android #102757
Conversation
Contributor
Newer versions of Android forbid the creation of hardlinks as well as Unix domain sockets in the /data filesystem via SELinux rules, which causes several tests depending on this behavior to fail. So let's skip these tests on Android if we see an EACCES from one of these syscalls. To achieve this, introduce a macro with the horrible name of or_panic_or_skip_on_android_eacces (better suggestions welcome) which skips (returns from) the test if an EACCES return value is seen on Android.
Collaborator
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @m-ou-se (or someone else) soon. Please see the contribution instructions for more information. |
Collaborator
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
added the T-libs Relevant to the library team, which will review and decide on the PR/issue. label
added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label
Contributor
Author
cc @chriswailes |
This comment has been minimized.
Member
Can we find another fs to test on instead? E.g. |
Contributor
Author
Unfortunately Android devices do not have a filesystem mounted at |
Member
An issue with this is that we no longer know which tests are actually run and which are skipped on Android. Maybe we should explicitly check for the android version to decide whether a test should be skipped? Or just #[ignore] the tests on Android entirely? |
added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
Author
I'm not sure if it's as simple as checking the Android version (I'm not sure when these restrictions were added and it might not have been at the same time on every device). Applications wouldn't be able to use these APIs successfully so there's less value in testing them, but on the other hand Rust is increasingly being used in the operating system itself. If we don't care that much about whether these tests pass on Android and we expect the existing testing on non-Android Linux to be sufficient then yes, the simplest approach is to ignore them on Android, and I've updated the patch to do that. For the operating system use case we may consider arranging to run these tests only on rooted devices, but that can come later. |
Contributor
Author
Anything else needed here? As I mentioned, the tests are now ignored on Android. |
Contributor
Author
Ping. |
Member
@rustbot ready |
added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
labels
Contributor
The latest upstream changes (presumably #106673) made this pull request unmergeable. Please resolve the merge conflicts. |
Contributor
Author
Ping. |
Contributor
It seems somewhat unfortunate to be ignoring the tests entirely but...
Fair enough. And ignored tests can be run explicitly. I wonder though if there could be some way for the tests to be opt-in as a group? I'm thinking something like:
Or some other |
Contributor
Author
What I had in mind for later was that the tests could opt in automatically by checking for I do think though that as a first step we should make these tests stop failing on Android, since after several months it's already getting rather tedious to need to patch this in every time I need to run the tests. |
Contributor
Extremely annoying but at the same time seems fine to me. |
added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
labels
Contributor
Test successful - checks-actions |
Collaborator
Finished benchmarking commit (a6236fa): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 650.76s -> 652.439s (0.26%) |
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
No reviews
None yet
Successfully merging this pull request may close these issues.
None yet
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK