Module Name:    src
Committed By:   christos
Date:           Sun Oct 20 16:02:11 UTC 2019

Modified Files:
        src/tests/kernel: t_fcntl.c

Log Message:
opening a symlink with O_NOFOLLOW is expected to fail.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/t_fcntl.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/kernel/t_fcntl.c
diff -u src/tests/kernel/t_fcntl.c:1.1 src/tests/kernel/t_fcntl.c:1.2
--- src/tests/kernel/t_fcntl.c:1.1	Sun Sep 15 12:25:58 2019
+++ src/tests/kernel/t_fcntl.c	Sun Oct 20 12:02:11 2019
@@ -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,

Reply via email to