diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index 5a97db0bd..cf8952aed 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -49,7 +49,7 @@ static TEST_MOUNT_OTHER_FILESYSTEM_FILE: &str = "mount/DO_NOT_copy_me.txt"; static TEST_NONEXISTENT_FILE: &str = "nonexistent_file.txt"; /// Assert that mode, ownership, and permissions of two metadata objects match. -#[cfg(not(windows))] +#[cfg(all(not(windows), not(target_os = "freebsd")))] macro_rules! assert_metadata_eq { ($m1:expr, $m2:expr) => {{ assert_eq!($m1.mode(), $m2.mode(), "mode is different"); @@ -2176,7 +2176,7 @@ fn test_copy_nested_directory_to_itself_disallowed() { } /// Test for preserving permissions when copying a directory. -#[cfg(not(windows))] +#[cfg(all(not(windows), not(target_os = "freebsd")))] #[test] fn test_copy_dir_preserve_permissions() { // Create a directory that has some non-default permissions. @@ -2206,7 +2206,7 @@ fn test_copy_dir_preserve_permissions() { /// Test for preserving permissions when copying a directory, even in /// the face of an inaccessible file in that directory. -#[cfg(not(windows))] +#[cfg(all(not(windows), not(target_os = "freebsd")))] #[test] fn test_copy_dir_preserve_permissions_inaccessible_file() { // Create a directory that has some non-default permissions and