summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPovilas Kanapickas <povilas@radix.lt>2020-12-19 21:42:45 +0200
committerPovilas Kanapickas <povilas@radix.lt>2021-02-07 15:23:27 +0200
commit0c0d2ee80fe8cb8254605f1007efe031eeb9d150 (patch)
tree9b3cab90872de8854b7dc3406b3126658fd7b3c6
parent6799bd76604ac627d16e31485cc4a74dbb71bd81 (diff)
misc: Sync DoubleSegfault test to current behavior of Xorg
This commit in xserver 9c72887939f319e185d2726d9d9a4191b9d12efd changed the behavior of crashing server from exit(1) to abort(). Adjust the test accordingly.
-rw-r--r--tests/server/misc.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/server/misc.cpp b/tests/server/misc.cpp
index f3ca1b4..4ce7032 100644
--- a/tests/server/misc.cpp
+++ b/tests/server/misc.cpp
@@ -118,9 +118,11 @@ TEST(MiscServerTest, DoubleSegfault)
if (waitpid(server.Pid(), &status, 0) == -1)
break;
- /* A SIGSEGV triggers FatalError and then exit(1) */
- ASSERT_FALSE(WIFSIGNALED(status));
- ASSERT_EQ(WEXITSTATUS(status), 1);
+ /* A SIGSEGV triggers FatalError and then abort() which is effectively termination by the
+ SIGABRT signal */
+ ASSERT_TRUE(WIFSIGNALED(status));
+ ASSERT_EQ(WTERMSIG(status), SIGABRT);
+ ASSERT_EQ(WEXITSTATUS(status), 0);
std::ifstream logfile(server.GetLogFilePath().c_str());
std::string line;