From: Jonathan Lebon Date: Tue, 1 Apr 2014 21:18:52 +0000 (-0400) Subject: proc stap_run_error: also use -KILL in case -INT fails X-Git-Tag: release-2.5~99 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4fda6bb447ae7809f4a08f4f51a85a8cc4cacf52;p=systemtap.git proc stap_run_error: also use -KILL in case -INT fails Just like the previous commit, but for stap_run_error. It can happen that a stap session started with stap_run_error ignores -INT, in which case we need to be a little meaner and use -KILL. --- diff --git a/testsuite/lib/stap_run_error.exp b/testsuite/lib/stap_run_error.exp index 35752fcd7..cc3867844 100644 --- a/testsuite/lib/stap_run_error.exp +++ b/testsuite/lib/stap_run_error.exp @@ -53,7 +53,10 @@ proc stap_run_error { TEST_NAME EXPECT_ERROR ERROR_STRING OUTPUT_CHECK_STRING ar } timeout { fail "$TEST_NAME shutdown (timeout)" + # Let's try INT again, then KILL in case it's not sufficient exec kill -INT -- -[exp_pid] + sleep 3 + exec kill -KILL -- -[exp_pid] } eof { fail "$TEST_NAME shutdown (eof)" } } @@ -65,6 +68,9 @@ proc stap_run_error { TEST_NAME EXPECT_ERROR ERROR_STRING OUTPUT_CHECK_STRING ar } # again for good measure exec kill -INT -- -[exp_pid] + sleep 3 + # and again for a really good measure + exec kill -KILL -- -[exp_pid] catch close wait }