mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
O_SEARCH test: drop O_SEARCH|O_RDWR local diff
In FreeBSD's O_SEARCH implementation, O_SEARCH in conjunction with O_RDWR or O_WRONLY is explicitly rejected. In this case, O_RDWR was not necessary anyways as the file will get created with or without it. This was submitted upstream as misc/54940 and committed in rev 1.8 of the file.
This commit is contained in:
parent
83372bda16
commit
28e68bc000
1 changed files with 0 additions and 4 deletions
|
|
@ -258,11 +258,7 @@ ATF_TC_BODY(o_search_notdir, tc)
|
|||
int fd;
|
||||
|
||||
ATF_REQUIRE(mkdir(DIR, 0755) == 0);
|
||||
#ifndef __FreeBSD__
|
||||
ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_RDWR|O_SEARCH, 0644)) != -1);
|
||||
#else
|
||||
ATF_REQUIRE((dfd = open(FILE, O_CREAT|O_SEARCH, 0644)) != -1);
|
||||
#endif
|
||||
ATF_REQUIRE((fd = openat(dfd, BASEFILE, O_RDWR, 0)) == -1);
|
||||
ATF_REQUIRE(errno == ENOTDIR);
|
||||
ATF_REQUIRE(close(dfd) == 0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue