Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libc/gen Avoid ATF_REQUIRE() inside a child process.
details: https://anonhg.NetBSD.org/src/rev/415e1965c407
branches: trunk
changeset: 766039:415e1965c407
user: jruoho <jruoho%NetBSD.org@localhost>
date: Tue Jun 14 05:28:00 2011 +0000
description:
Avoid ATF_REQUIRE() inside a child process.
diffstat:
tests/lib/libc/gen/t_assert.c | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diffs (49 lines):
diff -r cf761164ca86 -r 415e1965c407 tests/lib/libc/gen/t_assert.c
--- a/tests/lib/libc/gen/t_assert.c Tue Jun 14 05:25:20 2011 +0000
+++ b/tests/lib/libc/gen/t_assert.c Tue Jun 14 05:28:00 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_assert.c,v 1.1 2011/06/14 05:25:21 jruoho Exp $ */
+/* $NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_assert.c,v 1.1 2011/06/14 05:25:21 jruoho Exp $");
+__RCSID("$NetBSD: t_assert.c,v 1.2 2011/06/14 05:28:00 jruoho Exp $");
#include <sys/wait.h>
@@ -40,8 +40,6 @@
#include <string.h>
#include <unistd.h>
-#include <stdio.h>
-
static void handler(int);
static void
@@ -73,8 +71,8 @@
sa.sa_flags = 0;
sa.sa_handler = handler;
- ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0);
- ATF_REQUIRE(sigaction(SIGABRT, &sa, 0) == 0);
+ (void)sigemptyset(&sa.sa_mask);
+ (void)sigaction(SIGABRT, &sa, 0);
assert(1 == 1);
@@ -110,8 +108,8 @@
sa.sa_flags = 0;
sa.sa_handler = handler;
- ATF_REQUIRE(sigemptyset(&sa.sa_mask) == 0);
- ATF_REQUIRE(sigaction(SIGABRT, &sa, 0) == 0);
+ (void)sigemptyset(&sa.sa_mask);
+ (void)sigaction(SIGABRT, &sa, 0);
assert(1 == 2);
Home |
Main Index |
Thread Index |
Old Index