From a69869f8780c8df9f773c4df0e14a2507ecfb345 Mon Sep 17 00:00:00 2001 From: Kevin Qian Date: Mon, 20 Feb 2023 15:38:52 -0800 Subject: [PATCH] Skip perm test for freebsd too --- tokio/tests/fs_try_exists.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tokio/tests/fs_try_exists.rs b/tokio/tests/fs_try_exists.rs index 1962c8d4114..6c36f5560ad 100644 --- a/tokio/tests/fs_try_exists.rs +++ b/tokio/tests/fs_try_exists.rs @@ -14,7 +14,8 @@ async fn try_exists() { assert!(fs::try_exists(existing_path).await.unwrap()); assert!(!fs::try_exists(nonexisting_path).await.unwrap()); - #[cfg(unix)] + // FreeBSD root user always has permission to stat. + #[cfg(all(unix, not(freebsd)))] { use std::os::unix::prelude::PermissionsExt; let permission_denied_directory_path = dir.path().join("baz");