]> sourceware.org Git - systemtap.git/commitdiff
proc stap_run_error: also use -KILL in case -INT fails
authorJonathan Lebon <jlebon@redhat.com>
Tue, 1 Apr 2014 21:18:52 +0000 (17:18 -0400)
committerJonathan Lebon <jlebon@redhat.com>
Tue, 1 Apr 2014 21:19:50 +0000 (17:19 -0400)
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

index 35752fcd7e4ec8f3da0fdb4e8a5ac21967ea528d..cc3867844fefb76f0b74ead1d8689476613056a5 100644 (file)
@@ -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
 }
This page took 0.026386 seconds and 5 git commands to generate.