? tests/lib/libc/c063/D23573.diff Index: tests/lib/libc/c063/t_o_search.c =================================================================== RCS file: /cvsroot/src/tests/lib/libc/c063/t_o_search.c,v retrieving revision 1.9 diff -u -r1.9 t_o_search.c --- tests/lib/libc/c063/t_o_search.c 6 Feb 2020 12:18:06 -0000 1.9 +++ tests/lib/libc/c063/t_o_search.c 8 Feb 2020 18:29:25 -0000 @@ -34,6 +34,8 @@ #include #include +#include +#include #include #include @@ -55,6 +57,11 @@ #define USE_O_SEARCH #endif +#ifdef __FreeBSD__ +#define statvfs statfs +#define fstatvfs fstatfs +#endif + #define DIR "dir" #define FILE "dir/o_search" #define BASEFILE "o_search" @@ -311,8 +318,9 @@ } ATF_TC_BODY(o_search_revokex, tc) { - int dfd, fd; + struct statvfs vst; struct stat sb; + int dfd, fd; ATF_REQUIRE(mkdir(DIR, 0755) == 0); ATF_REQUIRE((fd = open(FILE, O_CREAT|O_RDWR, 0644)) != -1); @@ -322,6 +330,11 @@ /* Drop permissions. The kernel must still not check the exec bit. */ ATF_REQUIRE(chmod(DIR, 0000) == 0); + + fstatvfs(dfd, &vst); + if (strcmp(vst.f_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);