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 Fix ATF_REQUIRE(false)
details: https://anonhg.NetBSD.org/src/rev/bc8f1d6c1a20
branches: trunk
changeset: 344590:bc8f1d6c1a20
user: christos <christos%NetBSD.org@localhost>
date: Wed Apr 06 00:52:45 2016 +0000
description:
Fix ATF_REQUIRE(false)
diffstat:
tests/lib/libc/sys/t_wait.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r 39f8ac1432a9 -r bc8f1d6c1a20 tests/lib/libc/sys/t_wait.c
--- a/tests/lib/libc/sys/t_wait.c Wed Apr 06 00:48:30 2016 +0000
+++ b/tests/lib/libc/sys/t_wait.c Wed Apr 06 00:52:45 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_wait.c,v 1.1 2016/04/06 00:45:53 christos Exp $ */
+/* $NetBSD: t_wait.c,v 1.2 2016/04/06 00:52:45 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: t_wait.c,v 1.1 2016/04/06 00:45:53 christos Exp $");
+__RCSID("$NetBSD: t_wait.c,v 1.2 2016/04/06 00:52:45 christos Exp $");
#include <sys/wait.h>
#include <sys/resource.h>
@@ -92,7 +92,7 @@
switch (pid = fork()) {
case -1:
- ATF_REQUIRE(pid == 0);
+ ATF_REQUIRE(pid > 0);
case 0:
exit(0x5a5a5a5a);
/*NOTREACHED*/
@@ -128,7 +128,7 @@
sleep(100);
/*FALLTHROUGH*/
case -1:
- ATF_REQUIRE(pid == 0);
+ ATF_REQUIRE(pid > 0);
default:
ATF_REQUIRE(kill(pid, SIGTERM) == 0);
ATF_REQUIRE(!wait6(P_PID, pid, &st, WEXITED, &wru, &si));
@@ -164,7 +164,7 @@
*(char *)8 = 0;
/*FALLTHROUGH*/
case -1:
- ATF_REQUIRE(pid == 0);
+ ATF_REQUIRE(pid > 0);
default:
ATF_REQUIRE(!wait6(P_PID, pid, &st, WEXITED, &wru, &si));
ATF_REQUIRE(WIFSIGNALED(st) && WTERMSIG(st) == SIGSEGV
@@ -200,7 +200,7 @@
sleep(100);
/*FALLTHROUGH*/
case -1:
- ATF_REQUIRE(pid == 0);
+ ATF_REQUIRE(pid > 0);
default:
ATF_REQUIRE(kill(pid, SIGSTOP) == 0);
ATF_REQUIRE(!wait6(P_PID, pid, &st, WSTOPPED, &wru, &si));
Home |
Main Index |
Thread Index |
Old Index