path_test: Fix the unix socket test

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

Sponsored by:	The FreeBSD Foundation

(cherry picked from commit 8b83b656a5)
This commit is contained in:
Mark Johnston 2021-09-08 10:57:04 -04:00
parent 6d8f2277de
commit 91533b4cd4

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);