mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357580
|
@ -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