From fed6fceb6f7f73e6870e84a2a3389cb71108f197 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Wed, 12 Oct 2022 13:43:59 -0700 Subject: 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. --- library/std/src/fs/tests.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'library/std/src/fs') 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) { -- cgit 1.4.1-3-g733a5