summaryrefslogtreecommitdiff
path: root/debuggerd/debuggerd_test.cpp
diff options
context:
space:
mode:
authorJosh Gao <jmgao@google.com>2017-01-23 20:43:02 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-01-23 20:43:05 +0000
commit400973fa8840fe50150797a83416c26e4828310a (patch)
tree4dcc472531afdb58afad41e572cbc10da50df259 /debuggerd/debuggerd_test.cpp
parent13c15e05d0b6f35399800902eb8ea1943172db79 (diff)
parent7c6e3133f57b6c908e211c0013fcb68d5a44d919 (diff)
Merge changes Iacaa796f,I7549f674,Ic9d70880,I96cb09b7,I5c2658a8
* changes: crash_dump: set a watchdog timer. crash_dump: switch to PTRACE_SEIZE. crash_dump: clear the default crash handlers. crash_dump: remove extra log. debuggerd_handler: actually wait for pseudothread to exit.
Diffstat (limited to 'debuggerd/debuggerd_test.cpp')
-rw-r--r--debuggerd/debuggerd_test.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/debuggerd/debuggerd_test.cpp b/debuggerd/debuggerd_test.cpp
index f51b5f253..3b2419365 100644
--- a/debuggerd/debuggerd_test.cpp
+++ b/debuggerd/debuggerd_test.cpp
@@ -340,24 +340,15 @@ TEST_F(CrasherTest, wait_for_gdb) {
AssertDeath(SIGABRT);
}
+// wait_for_gdb shouldn't trigger on manually sent signals.
TEST_F(CrasherTest, wait_for_gdb_signal) {
if (!android::base::SetProperty(kWaitForGdbKey, "1")) {
FAIL() << "failed to enable wait_for_gdb";
}
StartCrasher("abort");
- ASSERT_EQ(0, kill(crasher_pid, SIGABRT)) << strerror(errno);
-
- std::this_thread::sleep_for(500ms);
-
- int status;
- ASSERT_EQ(crasher_pid, (TIMEOUT(1, waitpid(crasher_pid, &status, WUNTRACED))));
- ASSERT_TRUE(WIFSTOPPED(status));
- ASSERT_EQ(SIGSTOP, WSTOPSIG(status));
-
- ASSERT_EQ(0, kill(crasher_pid, SIGCONT)) << strerror(errno);
-
- AssertDeath(SIGABRT);
+ ASSERT_EQ(0, kill(crasher_pid, SIGSEGV)) << strerror(errno);
+ AssertDeath(SIGSEGV);
}
TEST_F(CrasherTest, backtrace) {