diff options
| author | christos <christos@NetBSD.org> | 2019-10-20 16:02:11 +0000 |
|---|---|---|
| committer | christos <christos@NetBSD.org> | 2019-10-20 16:02:11 +0000 |
| commit | e26bafff3eb4d8ec546ef3c036d02df3662ee69f (patch) | |
| tree | 69225301a4a83d38139e760a07dfff27a7eeab7a /tests/kernel | |
| parent | db894f55637817b02267c22ebf145f2a21206415 (diff) | |
opening a symlink with O_NOFOLLOW is expected to fail.
Diffstat (limited to 'tests/kernel')
| -rw-r--r-- | tests/kernel/t_fcntl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/kernel/t_fcntl.c b/tests/kernel/t_fcntl.c index 0e385b829f9..536e8b513b0 100644 --- a/tests/kernel/t_fcntl.c +++ b/tests/kernel/t_fcntl.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_fcntl.c,v 1.1 2019/09/15 16:25:58 christos Exp $ */ +/* $NetBSD: t_fcntl.c,v 1.2 2019/10/20 16:02:11 christos Exp $ */ /*- * Copyright (c) 2019 The NetBSD Foundation, Inc. @@ -53,7 +53,7 @@ static const struct { { "/bin/sh", 0 }, { "/dev/zero", 0 }, { "/dev/null", 0 }, - { "/bin/chgrp", 0 }, + { "/sbin/chown", 0 }, { "/", ENOENT }, }; @@ -64,7 +64,7 @@ ATF_TC_BODY(getpath, tc) for (size_t i = 0; i < __arraycount(files); i++) { fd = open(files[i].name, O_RDONLY|O_NOFOLLOW); - ATF_REQUIRE(fd != -1); + ATF_REQUIRE_MSG(fd != -1, "Cannot open `%s'", files[i].name); rv = fcntl(fd, F_GETPATH, path); if (files[i].rv) { ATF_REQUIRE_MSG(errno == files[i].rv, |
