Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel opening a symlink with O_NOFOLLOW is expected t...



details:   https://anonhg.NetBSD.org/src/rev/0a727dc8e1a2
branches:  trunk
changeset: 460386:0a727dc8e1a2
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Oct 20 16:02:11 2019 +0000

description:
opening a symlink with O_NOFOLLOW is expected to fail.

diffstat:

 tests/kernel/t_fcntl.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 663e4e98925a -r 0a727dc8e1a2 tests/kernel/t_fcntl.c
--- a/tests/kernel/t_fcntl.c    Sun Oct 20 14:25:14 2019 +0000
+++ b/tests/kernel/t_fcntl.c    Sun Oct 20 16:02:11 2019 +0000
@@ -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 @@
        { "/bin/sh", 0 },
        { "/dev/zero", 0 },
        { "/dev/null", 0 },
-       { "/bin/chgrp", 0 },
+       { "/sbin/chown", 0 },
        { "/", ENOENT },
 };
 
@@ -64,7 +64,7 @@
 
        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,



Home | Main Index | Thread Index | Old Index