Index: head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c =================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c +++ head/contrib/netbsd-tests/lib/libc/c063/t_o_search.c @@ -34,6 +34,11 @@ #include #include +#ifdef __FreeBSD__ +#include +#else +#include +#endif #include #include @@ -322,6 +327,23 @@ /* Drop permissions. The kernel must still not check the exec bit. */ ATF_REQUIRE(chmod(DIR, 0000) == 0); + { + const char *fstypename; +#ifdef __FreeBSD__ + struct statfs st; + + fstatfs(dfd, &st); + fstypename = st.f_fstypename; +#else + struct statvfs vst; + + fstatvfs(dfd, &vst); + fstypename = vst.f_fstypename; +#endif + if (strcmp(fstypename, "nfs") == 0) + atf_tc_expect_fail( + "NFS protocol cannot observe O_SEARCH semantics"); + } ATF_REQUIRE(fstatat(dfd, BASEFILE, &sb, 0) == 0); ATF_REQUIRE(close(dfd) == 0);