From 4fda6bb447ae7809f4a08f4f51a85a8cc4cacf52 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 1 Apr 2014 17:18:52 -0400 Subject: [PATCH] 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. --- testsuite/lib/stap_run_error.exp | 6 ++++++ 1 file changed, 6 insertions(+) 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 } -- 2.43.5