Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/kernel Correct assert in ATF t_zombie test



details:   https://anonhg.NetBSD.org/src/rev/958cdfd3d548
branches:  trunk
changeset: 832555:958cdfd3d548
user:      kamil <kamil%NetBSD.org@localhost>
date:      Fri May 18 00:25:30 2018 +0000

description:
Correct assert in ATF t_zombie test

A failure is reported with -1, not 1.

Sponsored by <The NetBSD Foundation>

diffstat:

 tests/kernel/t_zombie.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (35 lines):

diff -r 1a39f84dbc4d -r 958cdfd3d548 tests/kernel/t_zombie.c
--- a/tests/kernel/t_zombie.c   Thu May 17 23:07:47 2018 +0000
+++ b/tests/kernel/t_zombie.c   Fri May 18 00:25:30 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_zombie.c,v 1.1 2018/03/14 02:13:47 kamil Exp $       */
+/*     $NetBSD: t_zombie.c,v 1.2 2018/05/18 00:25:30 kamil Exp $       */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
 #include <sys/cdefs.h>
 __COPYRIGHT("@(#) Copyright (c) 2018\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_zombie.c,v 1.1 2018/03/14 02:13:47 kamil Exp $");
+__RCSID("$NetBSD: t_zombie.c,v 1.2 2018/05/18 00:25:30 kamil Exp $");
 
 #include <sys/types.h>
 #include <sys/sysctl.h>
@@ -130,14 +130,14 @@
        pid_t child1, child2, pid;
 
        child1 = atf_utils_fork();
-       ATF_REQUIRE(child1 != 1);
+       ATF_REQUIRE(child1 != -1);
        if (child1 == 0) {
                /* Just die and turn into a zombie */
                _exit(0);
        }
 
        child2 = atf_utils_fork();
-       ATF_REQUIRE(child2 != 1);
+       ATF_REQUIRE(child2 != -1);
        if (child2 == 0) {
                await_zombie(child1);
 



Home | Main Index | Thread Index | Old Index