From 62c4172e24f7d771507aa8dd42bcce3809aa5116 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Tue, 1 Apr 2014 16:48:03 -0400 Subject: [PATCH] proc stap_run: also use -KILL in case -INT fails It can happen that a stap session started with stap_run ignores -INT, in which case we need to be a little meaner and use -KILL. --- testsuite/lib/stap_run.exp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index a6d1e8116..a77925c61 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -89,7 +89,10 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } } timeout { fail "$TEST_NAME shutdown (timeout)" - exec kill -INT -- -[exp_pid] + # 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)" } } @@ -103,6 +106,9 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } } # 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