Module Name: src Committed By: jruoho Date: Tue Jun 14 05:28:00 UTC 2011
Modified Files: src/tests/lib/libc/gen: t_assert.c Log Message: Avoid ATF_REQUIRE() inside a child process. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_assert.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/lib/libc/gen/t_assert.c diff -u src/tests/lib/libc/gen/t_assert.c:1.1 src/tests/lib/libc/gen/t_assert.c:1.2 --- src/tests/lib/libc/gen/t_assert.c:1.1 Tue Jun 14 05:25:21 2011 +++ src/tests/lib/libc/gen/t_assert.c Tue Jun 14 05:28:00 2011 @@ -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);