diff --git a/tests/by-util/test_dd.rs b/tests/by-util/test_dd.rs index 553b3c14fba..f24589be0d8 100644 --- a/tests/by-util/test_dd.rs +++ b/tests/by-util/test_dd.rs @@ -2338,7 +2338,7 @@ fn test_nocache_eof() { } #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(not(wasi_runner))] fn test_nocache_eof_fadvise_zero_length() { use std::process::Command; diff --git a/tests/by-util/test_install.rs b/tests/by-util/test_install.rs index c87c588ed33..0000e4a86d7 100644 --- a/tests/by-util/test_install.rs +++ b/tests/by-util/test_install.rs @@ -36,10 +36,10 @@ fn test_install_basic_try_reflink() { at.touch(file1); at.touch(file2); at.mkdir(dir); - #[cfg(not(target_os = "linux"))] + #[cfg(not(any(target_os = "linux", target_os = "android")))] ucmd.arg(file1).arg(file2).arg(dir).succeeds().no_stderr(); // mkfs.btrfs needs root. use strace instead. - #[cfg(target_os = "linux")] + #[cfg(any(target_os = "linux", target_os = "android"))] if std::process::Command::new("strace") .args(["-qqq", "-o", "strace.out", "-e", "trace=ioctl"]) .arg(uutests::util::get_tests_binary()) @@ -3379,7 +3379,7 @@ fn test_install_d_parallel_mkdir_race() { } #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] fn test_install_target_without_splice_support() { // Does eCryptfs not support splice on some kernel? use std::process::Command; diff --git a/tests/by-util/test_ls.rs b/tests/by-util/test_ls.rs index a6b80e2aa89..defd244c295 100644 --- a/tests/by-util/test_ls.rs +++ b/tests/by-util/test_ls.rs @@ -8440,7 +8440,7 @@ fn test_long_options_detached() { // Without -R a directory can never be revisited, so ls should not spend a stat // recording it for the loop detection that only recursion consults. #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(not(wasi_runner))] fn test_no_extra_stat_without_recursion() { use std::process::Command; @@ -8699,7 +8699,7 @@ fn test_ls_dereference_sibling_alias_not_already_listed() { #[case(&["-lLZ", "."], "./entry")] #[case(&["-lLd", "entry"], "entry")] #[case(&["--dereference-command-line-symlink-to-dir", "-d", "--color=always", "entry"], "entry")] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(not(wasi_runner))] fn test_dereferenced_metadata_is_cached(#[case] args: &[&str], #[case] path: &str) { use std::process::Command; diff --git a/tests/by-util/test_rm.rs b/tests/by-util/test_rm.rs index 3acad56c46e..b282c07dd0c 100644 --- a/tests/by-util/test_rm.rs +++ b/tests/by-util/test_rm.rs @@ -1723,7 +1723,7 @@ fn test_preserve_root_literal_root() { /// `rm -rf / --no-preserve-root` must get past the failsafe. `strace` fakes the /// removals and sends SIGINT on the first one, so nothing is deleted. -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[test] fn test_no_preserve_root_literal_root() { use std::os::unix::process::ExitStatusExt; diff --git a/tests/by-util/test_shred.rs b/tests/by-util/test_shred.rs index b2a62a66a60..06d9027110c 100644 --- a/tests/by-util/test_shred.rs +++ b/tests/by-util/test_shred.rs @@ -721,7 +721,7 @@ fn test_shred_socket() { } #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(not(wasi_runner))] fn test_stat_failure_reports_open_error() { // Make stat and open fail with different errors on the same path: the @@ -764,7 +764,7 @@ fn test_stat_failure_reports_open_error() { } #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] #[cfg(not(wasi_runner))] fn test_remove_reports_truncate_failure() { // When the data cannot be deallocated, say so and keep the file. diff --git a/tests/by-util/test_shuf.rs b/tests/by-util/test_shuf.rs index 56c2856c586..a3581cb2447 100644 --- a/tests/by-util/test_shuf.rs +++ b/tests/by-util/test_shuf.rs @@ -17,7 +17,7 @@ fn test_invalid_arg() { #[uutests::wasi_ignore(NoSubprocessSpawning)] #[test] -#[cfg(target_os = "linux")] +#[cfg(any(target_os = "linux", target_os = "android"))] fn test_getrandom_fail() { // getrandom is missing from legacy kernel use std::process::Command;