Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/sys Use ATF_CHECK_ERRNO in setrlimit_perm().
details: https://anonhg.NetBSD.org/src/rev/f400a2c446b8
branches: trunk
changeset: 778001:f400a2c446b8
user: njoly <njoly%NetBSD.org@localhost>
date: Sun Mar 11 23:26:22 2012 +0000
description:
Use ATF_CHECK_ERRNO in setrlimit_perm().
diffstat:
tests/lib/libc/sys/t_setrlimit.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (28 lines):
diff -r c422d4b34a93 -r f400a2c446b8 tests/lib/libc/sys/t_setrlimit.c
--- a/tests/lib/libc/sys/t_setrlimit.c Sun Mar 11 23:10:43 2012 +0000
+++ b/tests/lib/libc/sys/t_setrlimit.c Sun Mar 11 23:26:22 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_setrlimit.c,v 1.2 2011/08/22 00:33:16 dholland Exp $ */
+/* $NetBSD: t_setrlimit.c,v 1.3 2012/03/11 23:26:22 njoly Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_setrlimit.c,v 1.2 2011/08/22 00:33:16 dholland Exp $");
+__RCSID("$NetBSD: t_setrlimit.c,v 1.3 2012/03/11 23:26:22 njoly Exp $");
#include <sys/resource.h>
#include <sys/mman.h>
@@ -460,8 +460,7 @@
errno = 0;
res.rlim_max = res.rlim_max + 1;
- ATF_REQUIRE(setrlimit(rlimit[i], &res) != 0);
- ATF_REQUIRE(errno == EPERM);
+ ATF_CHECK_ERRNO(EPERM, setrlimit(rlimit[i], &res) != 0);
}
}
Home |
Main Index |
Thread Index |
Old Index