diff --git a/tests/by-util/test_cp.rs b/tests/by-util/test_cp.rs index 053e015f4..c831bb08f 100644 --- a/tests/by-util/test_cp.rs +++ b/tests/by-util/test_cp.rs @@ -488,7 +488,7 @@ fn test_cp_arg_interactive() { } #[test] -#[cfg(not(any(target_os = "android", target_os = "freebsd")))] +#[cfg(not(any(target_os = "android", target_os = "freebsd", target_os = "openbsd")))] fn test_cp_arg_interactive_update_overwrite_newer() { // -u -i won't show the prompt to validate the override or not // Therefore, the error code will be 0 @@ -1285,6 +1285,7 @@ fn test_cp_parents_dest_not_directory() { } #[test] +#[cfg(not(target_os = "openbsd"))] fn test_cp_parents_with_permissions_copy_file() { let (at, mut ucmd) = at_and_ucmd!(); @@ -1325,6 +1326,7 @@ fn test_cp_parents_with_permissions_copy_file() { } #[test] +#[cfg(not(target_os = "openbsd"))] fn test_cp_parents_with_permissions_copy_dir() { let (at, mut ucmd) = at_and_ucmd!(); @@ -1382,6 +1384,7 @@ fn test_cp_issue_1665() { } #[test] +#[cfg(not(target_os = "openbsd"))] fn test_cp_preserve_no_args() { let (at, mut ucmd) = at_and_ucmd!(); let src_file = "a"; @@ -1409,6 +1412,7 @@ fn test_cp_preserve_no_args() { } #[test] +#[cfg(not(target_os = "openbsd"))] fn test_cp_preserve_no_args_before_opts() { let (at, mut ucmd) = at_and_ucmd!(); let src_file = "a"; @@ -1463,7 +1467,7 @@ fn test_cp_preserve_all() { } #[test] -#[cfg(all(unix, not(target_os = "android")))] +#[cfg(all(unix, not(any(target_os = "android", target_os = "openbsd"))))] fn test_cp_preserve_xattr() { let (at, mut ucmd) = at_and_ucmd!(); let src_file = "a"; @@ -2558,6 +2562,7 @@ fn test_copy_symlink_force() { #[test] #[cfg(unix)] +#[cfg(not(target_os = "openbsd"))] fn test_no_preserve_mode() { use std::os::unix::prelude::MetadataExt; @@ -2588,6 +2593,7 @@ fn test_no_preserve_mode() { #[test] #[cfg(unix)] +#[cfg(not(target_os = "openbsd"))] fn test_preserve_mode() { use std::os::unix::prelude::MetadataExt; @@ -2745,7 +2751,7 @@ fn test_cp_dangling_symlink_inside_directory() { } /// Test for copying a dangling symbolic link and its permissions. -#[cfg(not(target_os = "freebsd"))] // FIXME: fix this test for FreeBSD +#[cfg(not(any(target_os = "freebsd", target_os = "openbsd")))] // FIXME: fix this test for FreeBSD/OpenBSD #[test] fn test_copy_through_dangling_symlink_no_dereference_permissions() { let (at, mut ucmd) = at_and_ucmd!(); @@ -2963,7 +2969,7 @@ fn test_copy_same_symlink_no_dereference_dangling() { } // TODO: enable for Android, when #3477 solved -#[cfg(not(any(windows, target_os = "android")))] +#[cfg(not(any(windows, target_os = "android", target_os = "openbsd")))] #[test] fn test_cp_parents_2_dirs() { let (at, mut ucmd) = at_and_ucmd!(); @@ -3193,7 +3199,7 @@ fn test_copy_nested_directory_to_itself_disallowed() { } /// Test for preserving permissions when copying a directory. -#[cfg(all(not(windows), not(target_os = "freebsd")))] +#[cfg(all(not(windows), not(target_os = "freebsd"), not(target_os = "openbsd")))] #[test] fn test_copy_dir_preserve_permissions() { // Create a directory that has some non-default permissions. @@ -3223,7 +3229,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(all(not(windows), not(target_os = "freebsd")))] +#[cfg(all(not(windows), not(target_os = "freebsd"), not(target_os = "openbsd")))] #[test] fn test_copy_dir_preserve_permissions_inaccessible_file() { // Create a directory that has some non-default permissions and @@ -3293,7 +3299,7 @@ fn test_same_file_force_backup() { } /// Test for copying the contents of a FIFO as opposed to the FIFO object itself. -#[cfg(all(unix, not(target_os = "freebsd")))] +#[cfg(all(unix, not(target_os = "freebsd"), not(target_os = "openbsd")))] #[test] fn test_copy_contents_fifo() { // TODO this test should work on FreeBSD, but the command was @@ -3353,7 +3359,7 @@ fn test_reflink_never_sparse_always() { /// Test for preserving attributes of a hard link in a directory. #[test] -#[cfg(not(target_os = "android"))] +#[cfg(not(any(target_os = "android", target_os = "openbsd")))] fn test_preserve_hardlink_attributes_in_directory() { let (at, mut ucmd) = at_and_ucmd!(); @@ -5476,6 +5482,7 @@ mod link_deref { // disable these excessive permissions. #[test] #[cfg(unix)] +#[cfg(not(target_os = "openbsd"))] fn test_dir_perm_race_with_preserve_mode_and_ownership() { const SRC_DIR: &str = "src"; const DEST_DIR: &str = "dest";