diff --git a/tests/by-util/test_mv.rs b/tests/by-util/test_mv.rs index 7a1f5cd5b..10565493a 100644 --- a/tests/by-util/test_mv.rs +++ b/tests/by-util/test_mv.rs @@ -401,7 +401,7 @@ fn test_mv_same_file() { } #[test] -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "android")))] fn test_mv_same_hardlink() { let (at, mut ucmd) = at_and_ucmd!(); let file_a = "test_mv_same_file_a"; @@ -418,7 +418,7 @@ fn test_mv_same_hardlink() { } #[test] -#[cfg(unix)] +#[cfg(all(unix, not(target_os = "android")))] fn test_mv_same_hardlink_backup_simple() { let (at, mut ucmd) = at_and_ucmd!(); let file_a = "test_mv_same_file_a"; @@ -427,7 +427,6 @@ fn test_mv_same_hardlink_backup_simple() { at.hard_link(file_a, file_b); - at.touch(file_a); ucmd.arg(file_a) .arg(file_b) .arg("--backup=simple")