diff options
| author | Peter Collingbourne <pcc@google.com> | 2022-10-12 13:43:59 -0700 |
|---|---|---|
| committer | Peter Collingbourne <pcc@google.com> | 2023-03-02 16:08:51 -0800 |
| commit | fed6fceb6f7f73e6870e84a2a3389cb71108f197 (patch) | |
| tree | d8fc10b2ad3a2831470282226152192ec9e427b5 /library/std/src/fs | |
| parent | 13471d3b2046cce78181dde6cfc146c09f55e29e (diff) | |
| download | rust-fed6fceb6f7f73e6870e84a2a3389cb71108f197.tar.gz rust-fed6fceb6f7f73e6870e84a2a3389cb71108f197.zip | |
Make std tests pass on newer Android
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 with an #[ignore] directive.
Diffstat (limited to 'library/std/src/fs')
| -rw-r--r-- | library/std/src/fs/tests.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 909d9bf4093..d0edbfe22ef 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -935,6 +935,7 @@ fn readlink_not_symlink() { } #[test] +#[cfg_attr(target_os = "android", ignore)] // Android SELinux rules prevent creating hardlinks fn links_work() { let tmpdir = tmpdir(); let input = tmpdir.join("in.txt"); @@ -1431,6 +1432,7 @@ fn metadata_access_times() { /// Test creating hard links to symlinks. #[test] +#[cfg_attr(target_os = "android", ignore)] // Android SELinux rules prevent creating hardlinks fn symlink_hard_link() { let tmpdir = tmpdir(); if !got_symlink_permission(&tmpdir) { |
