path_test: Fix the unix socket test

The intent was to specify O_PATH to open(2).

MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Mark Johnston 2021-09-08 10:57:04 -04:00
parent ee4731179c
commit 8b83b656a5

View File

@ -865,7 +865,7 @@ ATF_TC_BODY(path_unix, tc)
ATF_REQUIRE_MSG(bind(sd, (struct sockaddr *)&sun, SUN_LEN(&sun)) == 0,
FMT_ERR("bind"));
pathfd = open(path, O_RDONLY);
pathfd = open(path, O_PATH);
ATF_REQUIRE_ERRNO(EOPNOTSUPP, pathfd < 0);
CHECKED_CLOSE(sd);