summaryrefslogtreecommitdiffstats
path: root/tests/pthread_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2013-02-14 16:33:52 -0800
committerElliott Hughes <enh@google.com>2013-02-14 16:35:58 -0800
commit7fd803cdfa873c01138dcbd614ec92418169b1c2 (patch)
tree7cf2172c26930b783a5e19106b35364c8964504d /tests/pthread_test.cpp
parent0a2cb815974ea96af664fa966079966a08916722 (diff)
downloadbionic-7fd803cdfa873c01138dcbd614ec92418169b1c2.zip
bionic-7fd803cdfa873c01138dcbd614ec92418169b1c2.tar.gz
bionic-7fd803cdfa873c01138dcbd614ec92418169b1c2.tar.bz2
Fix the stack protector death test.
Now __stack_chk_fail calls abort(3) directly, we terminate with SIGSEGV rather than SIGABRT. (Because of the workaround for the debuggerd lossage in the abort(3) implementation, which was the motivation for switching __stack_chk_fail over to abort(3).) Also clarify the comment on the weird pthread death test, so it doesn't get copied and pasted onto real death tests. Change-Id: Ie832eaded61359c99e7a10db65e28f35e8f63eed
Diffstat (limited to 'tests/pthread_test.cpp')
-rw-r--r--tests/pthread_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp
index 931a4c7..4f674c7 100644
--- a/tests/pthread_test.cpp
+++ b/tests/pthread_test.cpp
@@ -149,12 +149,12 @@ static void TestBug37410() {
pthread_exit(NULL);
}
-// We have to say "DeathTest" here so gtest knows to run this test (which exits)
-// in its own process.
+// Even though this isn't really a death test, we have to say "DeathTest" here so gtest knows to
+// run this test (which exits normally) in its own process.
TEST(pthread_DeathTest, pthread_bug_37410) {
// http://code.google.com/p/android/issues/detail?id=37410
::testing::FLAGS_gtest_death_test_style = "threadsafe";
- EXPECT_EXIT(TestBug37410(), ::testing::ExitedWithCode(0), "");
+ ASSERT_EXIT(TestBug37410(), ::testing::ExitedWithCode(0), "");
}
#endif