diff options
author | Thomas Haller <thaller@redhat.com> | 2019-06-13 11:26:31 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-06-13 11:27:32 +0200 |
commit | 49c6fa2ba763955cd2a2aeab6517e7105f3e4931 (patch) | |
tree | 53b63b2fe732523e6ee56072fa58a2d4712fb30a | |
parent | a3e75f329446a93a61ca4c458a7657bd919f4fe6 (diff) | |
download | NetworkManager-49c6fa2ba763955cd2a2aeab6517e7105f3e4931.tar.gz |
src/tests: show exit status in test failure of test_nm_utils_kill_child()
This test keeps randomly failing. Rework is, so that we see the actual
exit status in the output of the failed test.
-rw-r--r-- | src/tests/test-core-with-expect.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tests/test-core-with-expect.c b/src/tests/test-core-with-expect.c index 19e5a342d4..d38025ecb1 100644 --- a/src/tests/test-core-with-expect.c +++ b/src/tests/test-core-with-expect.c @@ -384,7 +384,12 @@ test_nm_utils_kill_child (void) err = waitpid (child_pid, &exit_status, 0); } while (err == -1 && errno == EINTR); g_assert (err == child_pid); - g_assert (WIFEXITED (exit_status) && WEXITSTATUS(exit_status) == 0); + if (WIFEXITED (exit_status)) + g_assert_cmpint (WEXITSTATUS (exit_status), ==, 0); + else { + g_assert_cmpint (exit_status, ==, 0); + g_assert_not_reached (); + } } /*****************************************************************************/ |