From: Michael Wallner Date: Mon, 6 Jan 2020 12:39:23 +0000 (+0100) Subject: libtest: fix doesnotexist spawn test X-Git-Tag: pre_cmake~79 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=a58ef1135a570a3ea8d10efc70c9057b4c03ea01;p=awesomized%2Flibmemcached libtest: fix doesnotexist spawn test --- diff --git a/libtest/unittest.cc b/libtest/unittest.cc index a2843d27..fafe032a 100644 --- a/libtest/unittest.cc +++ b/libtest/unittest.cc @@ -623,8 +623,12 @@ static test_return_t application_doesnotexist_BINARY(void *) #elif defined(__FreeBSD__) && __FreeBSD__ ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.run(args)); #else - ASSERT_EQ(Application::SUCCESS, true_app.run(args)); - ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.join()); + Application::error_t rc = true_app.run(args); + if (Application::SUCCESS == rc) { + ASSERT_EQ(Application::INVALID_POSIX_SPAWN, true_app.join()); + } else { + ASSERT_EQ(Application::INVALID_POSIX_SPAWN, rc); + } #endif test_zero(true_app.stdout_result().size());