Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/syscall Require an unprivileged run with atf_tc_set_md...
details: https://anonhg.NetBSD.org/src/rev/3eebeb8edef0
branches: trunk
changeset: 763776:3eebeb8edef0
user: jruoho <jruoho%NetBSD.org@localhost>
date: Mon Apr 04 07:16:29 2011 +0000
description:
Require an unprivileged run with atf_tc_set_md_var(). Pointed out by njoly@.
diffstat:
tests/syscall/t_access.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diffs (36 lines):
diff -r d975e9bf7bc3 -r 3eebeb8edef0 tests/syscall/t_access.c
--- a/tests/syscall/t_access.c Mon Apr 04 06:48:04 2011 +0000
+++ b/tests/syscall/t_access.c Mon Apr 04 07:16:29 2011 +0000
@@ -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)
Home |
Main Index |
Thread Index |
Old Index