Module Name: src
Committed By: jruoho
Date: Mon Apr 4 07:16:29 UTC 2011
Modified Files:
src/tests/syscall: t_access.c
Log Message:
Require an unprivileged run with atf_tc_set_md_var(). Pointed out by njoly@.
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/syscall/t_access.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/syscall/t_access.c
diff -u src/tests/syscall/t_access.c:1.2 src/tests/syscall/t_access.c:1.3
--- src/tests/syscall/t_access.c:1.2 Mon Apr 4 01:49:45 2011
+++ src/tests/syscall/t_access.c Mon Apr 4 07:16:29 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: t_access.c,v 1.2 2011/04/04 01:49:45 jruoho Exp $ */
+/* $NetBSD: t_access.c,v 1.3 2011/04/04 07:16:29 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_access.c,v 1.2 2011/04/04 01:49:45 jruoho Exp $");
+__RCSID("$NetBSD: t_access.c,v 1.3 2011/04/04 07:16:29 jruoho Exp $");
#include <errno.h>
#include <fcntl.h>
@@ -47,6 +47,7 @@
ATF_TC_HEAD(access_access, tc)
{
atf_tc_set_md_var(tc, "descr", "Test access(2) for EACCES");
+ atf_tc_set_md_var(tc, "require.user", "unprivileged");
}
ATF_TC_BODY(access_access, tc)
@@ -55,9 +56,6 @@
size_t i;
int fd;
- if (getuid() == 0)
- return;
-
fd = open(path, O_RDONLY | O_CREAT);
if (fd < 0)