am 3e3b239d
: Merge "Fix the stack protector death test."
# Via Elliott Hughes (1) and Gerrit Code Review (1) * commit '3e3b239d2be0c5a92e91385f4f10b8f7da8d2837': Fix the stack protector death test.
This commit is contained in:
commit
15c401d4ac
@ -149,12 +149,12 @@ static void TestBug37410() {
|
|||||||
pthread_exit(NULL);
|
pthread_exit(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have to say "DeathTest" here so gtest knows to run this test (which exits)
|
// Even though this isn't really a death test, we have to say "DeathTest" here so gtest knows to
|
||||||
// in its own process.
|
// run this test (which exits normally) in its own process.
|
||||||
TEST(pthread_DeathTest, pthread_bug_37410) {
|
TEST(pthread_DeathTest, pthread_bug_37410) {
|
||||||
// http://code.google.com/p/android/issues/detail?id=37410
|
// http://code.google.com/p/android/issues/detail?id=37410
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
EXPECT_EXIT(TestBug37410(), ::testing::ExitedWithCode(0), "");
|
ASSERT_EXIT(TestBug37410(), ::testing::ExitedWithCode(0), "");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -117,11 +117,9 @@ static void do_modify_stack_chk_guard() {
|
|||||||
__stack_chk_guard = 0x12345678;
|
__stack_chk_guard = 0x12345678;
|
||||||
}
|
}
|
||||||
|
|
||||||
// We have to say "DeathTest" here so gtest knows to run this test (which exits)
|
|
||||||
// in its own process.
|
|
||||||
TEST(stack_protector_DeathTest, modify_stack_protector) {
|
TEST(stack_protector_DeathTest, modify_stack_protector) {
|
||||||
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
::testing::FLAGS_gtest_death_test_style = "threadsafe";
|
||||||
ASSERT_EXIT(do_modify_stack_chk_guard(), testing::KilledBySignal(SIGABRT), "");
|
ASSERT_EXIT(do_modify_stack_chk_guard(), testing::KilledBySignal(SIGSEGV), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user