From 19d42c033923ecfbaeea0f4c4e4f76fc341a4cf5 Mon Sep 17 00:00:00 2001 From: Jadi Date: Sat, 4 May 2024 21:51:00 +0330 Subject: [PATCH] Disabling xattrs function and tests on OpenBSD The test_compare_xattrs test fails on OpenBSD because OpenBSD does not support xattrs. Disabling this function and its test for target_os = openbsd resolves the issue. Fixes #6348 --- tests/common/util.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/common/util.rs b/tests/common/util.rs index d97a19fa8..ebf95f4b4 100644 --- a/tests/common/util.rs +++ b/tests/common/util.rs @@ -782,7 +782,7 @@ pub fn get_root_path() -> &'static str { /// # Returns /// /// `true` if both paths have the same set of extended attributes, `false` otherwise. -#[cfg(all(unix, not(target_os = "macos")))] +#[cfg(all(unix, not(any(target_os = "macos", target_os = "openbsd"))))] pub fn compare_xattrs>(path1: P, path2: P) -> bool { let get_sorted_xattrs = |path: P| { xattr::list(path) @@ -3611,7 +3611,7 @@ mod tests { assert!(command.tmpd.is_some()); } - #[cfg(all(unix, not(target_os = "macos")))] + #[cfg(all(unix, not(any(target_os = "macos", target_os = "openbsd"))))] #[test] fn test_compare_xattrs() { use tempfile::tempdir;