From 905d66af77880fce3cfc02fd71e11abc9480852b Mon Sep 17 00:00:00 2001 From: nick Date: Wed, 22 Jan 2014 11:45:35 +0000 Subject: [PATCH] Rework a test --- tests/unit/check_util.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/unit/check_util.c b/tests/unit/check_util.c index 30563ed..7a5837f 100644 --- a/tests/unit/check_util.c +++ b/tests/unit/check_util.c @@ -71,11 +71,12 @@ START_TEST( test_fatal_kills_process ) sleep(10); } else { - int kidstatus; - int result; - result = waitpid( pid, &kidstatus, 0 ); + int kidret, kidstatus, result; + result = waitpid( pid, &kidret, 0 ); fail_if( result < 0, "Wait failed." ); - fail_unless( kidstatus == 6, "Kid was not aborted." ); + kidstatus = WEXITSTATUS( kidret ); + ck_assert_int_eq( kidstatus, SIGABRT ); +// fail_unless( kidstatus == 6, "Kid was not aborted." ); } }