No tombstones under normal bionic unit tests run.
Change a test to use a signal that does not trigger a tombstone.
Also changed the gwp_asan_integration.DISABLED_assert_gwp_asan_enabled
test to inherit from the SilentDeathTest to prevent tombstones
being generated.
Test: Ran tests and no tombstones generated.
Change-Id: I0f104704829dde692aa515a63dea1c6971278c29
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index b2195e7..b0f59bb 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -1049,11 +1049,13 @@
}
TEST(STDIO_TEST, popen_return_value_signal) {
- FILE* fp = popen("kill -7 $$", "r");
+ // Use a realtime signal to avoid creating a tombstone when running.
+ std::string cmd = android::base::StringPrintf("kill -%d $$", SIGRTMIN);
+ FILE* fp = popen(cmd.c_str(), "r");
ASSERT_TRUE(fp != nullptr);
int status = pclose(fp);
EXPECT_TRUE(WIFSIGNALED(status));
- EXPECT_EQ(7, WTERMSIG(status));
+ EXPECT_EQ(SIGRTMIN, WTERMSIG(status));
}
TEST(STDIO_TEST, getc) {