summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/lib/stap_run.exp5
-rw-r--r--testsuite/systemtap.base/onoffprobe.exp2
-rw-r--r--testsuite/systemtap.base/overload.exp5
-rw-r--r--testsuite/systemtap.context/args.tcl2
-rw-r--r--testsuite/systemtap.context/backtrace.tcl2
-rw-r--r--testsuite/systemtap.context/context.exp2
-rw-r--r--testsuite/systemtap.maps/ix_clear.exp2
-rw-r--r--testsuite/systemtap.maps/ix_clear2.exp2
-rw-r--r--testsuite/systemtap.maps/ix_clear3.exp2
-rw-r--r--testsuite/systemtap.maps/pmap_agg_overflow.exp2
-rw-r--r--testsuite/systemtap.printf/sharedbuf.exp2
-rw-r--r--testsuite/systemtap.samples/crash.exp2
-rw-r--r--testsuite/systemtap.stress/whitelist.exp4
14 files changed, 23 insertions, 16 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 2a384fdc..c3ee8d1e 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2008-02-23 Frank Ch. Eigler <fche@elastic.org>
+
+ * */*.exp: Change all "send \003" to "exec kill -INT -<pgrp>" in order
+ to more reliably kill an inferior stap/stapio/staprun process group.
+
2008-02-22 Frank Ch. Eigler <fche@elastic.org>
* semko/fortyfive.stp: Add ".call" to exclude false (?) positives
diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index 5bd1549c..c2b4e74d 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -50,7 +50,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
}
}
- send "\003"
+ exec kill -INT -[exp_pid]
# check the output to see if it is sane
set output "^systemtap ending probe\r\n$OUTPUT_CHECK_STRING"
@@ -78,7 +78,8 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
}
}
-re "semantic error:" { fail "$TEST_NAME compilation" }
- timeout { fail "$TEST_NAME startup (timeout)"; send "\003" }
+ timeout { fail "$TEST_NAME startup (timeout)"
+ exec kill -INT [exp_pid] }
eof { fail "$TEST_NAME startup (eof)" }
}
catch close
diff --git a/testsuite/systemtap.base/onoffprobe.exp b/testsuite/systemtap.base/onoffprobe.exp
index b86de4ea..24012cac 100644
--- a/testsuite/systemtap.base/onoffprobe.exp
+++ b/testsuite/systemtap.base/onoffprobe.exp
@@ -32,7 +32,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-send "\003"
+exec kill -INT -[exp_pid]
#FIXME does not handle case of hanging pfaults.stp correctly
wait
exec rm -f $test.ko
diff --git a/testsuite/systemtap.base/overload.exp b/testsuite/systemtap.base/overload.exp
index db7f49ef..cbcbe817 100644
--- a/testsuite/systemtap.base/overload.exp
+++ b/testsuite/systemtap.base/overload.exp
@@ -37,7 +37,7 @@ proc stap_run_overload { TEST_NAME EXPECT_OVERLOAD args } {
}
}
-re "^systemtap starting probe\r\n" {
- send "\003"
+ exec kill -INT -[exp_pid]
expect {
-timeout 10
@@ -58,7 +58,8 @@ proc stap_run_overload { TEST_NAME EXPECT_OVERLOAD args } {
}
}
-re "semantic error:" { fail "$TEST_NAME compilation" }
- timeout { fail "$TEST_NAME startup (timeout)"; send "\003" }
+ timeout { fail "$TEST_NAME startup (timeout)";
+ exec kill -INT -[exp_pid] }
eof { fail "$TEST_NAME startup (eof)" }
}
catch close
diff --git a/testsuite/systemtap.context/args.tcl b/testsuite/systemtap.context/args.tcl
index 37a43823..7cb79cdf 100644
--- a/testsuite/systemtap.context/args.tcl
+++ b/testsuite/systemtap.context/args.tcl
@@ -53,6 +53,6 @@ expect {
}
eof {fail "function arguments: unexpected timeout"}
}
-send "\003"
+exec kill -INT -[exp_pid]
close
wait
diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl
index 703f0ec2..f359cd41 100644
--- a/testsuite/systemtap.context/backtrace.tcl
+++ b/testsuite/systemtap.context/backtrace.tcl
@@ -117,7 +117,7 @@ expect {
}
eof {fail "backtrace of yyy_func3, yyy_func4.return and timer.profile. unexpected EOF" }
}
-send "\003"
+exec kill -INT -[exp_pid]
if {$m1 == 4} {
pass "backtrace of yyy_func3"
} else {
diff --git a/testsuite/systemtap.context/context.exp b/testsuite/systemtap.context/context.exp
index 11c0f2fc..71201a58 100644
--- a/testsuite/systemtap.context/context.exp
+++ b/testsuite/systemtap.context/context.exp
@@ -11,7 +11,7 @@ set build_dir ""
proc cleanup {} {
global build_dir
- catch {send "\003"}
+ catch { exec kill -INT -[exp_pid] }
foreach n {1 2} {
as_root [list /bin/rm -f /lib/modules/$::uname/kernel/systemtap_test_module$n.ko]
as_root [list /sbin/rmmod systemtap_test_module$n]
diff --git a/testsuite/systemtap.maps/ix_clear.exp b/testsuite/systemtap.maps/ix_clear.exp
index 0c6ca6c3..07417898 100644
--- a/testsuite/systemtap.maps/ix_clear.exp
+++ b/testsuite/systemtap.maps/ix_clear.exp
@@ -14,7 +14,7 @@ expect {
pass "$test passed"
}
timeout {
- send "\003"
+ exec kill -INT -[exp_pid]
fail "$test timed out"
}
eof {
diff --git a/testsuite/systemtap.maps/ix_clear2.exp b/testsuite/systemtap.maps/ix_clear2.exp
index c5e72c36..a1b68628 100644
--- a/testsuite/systemtap.maps/ix_clear2.exp
+++ b/testsuite/systemtap.maps/ix_clear2.exp
@@ -15,7 +15,7 @@ expect {
pass "$test passed"
}
timeout {
- send "\003"
+ exec kill -INT -[exp_pid]
fail "$test timed out"
}
eof {
diff --git a/testsuite/systemtap.maps/ix_clear3.exp b/testsuite/systemtap.maps/ix_clear3.exp
index 7674fdbc..a2935470 100644
--- a/testsuite/systemtap.maps/ix_clear3.exp
+++ b/testsuite/systemtap.maps/ix_clear3.exp
@@ -13,7 +13,7 @@ expect {
pass "$test passed"
}
timeout {
- send "\003"
+ exec kill -INT -[exp_pid]
fail "$test timed out"
}
eof {
diff --git a/testsuite/systemtap.maps/pmap_agg_overflow.exp b/testsuite/systemtap.maps/pmap_agg_overflow.exp
index 1b0a7234..99665057 100644
--- a/testsuite/systemtap.maps/pmap_agg_overflow.exp
+++ b/testsuite/systemtap.maps/pmap_agg_overflow.exp
@@ -19,7 +19,7 @@ expect {
set unsupported 1
}
timeout {
- send "\003"
+ exec kill -INT -[exp_pid]
fail "$test timed out"
}
eof {}
diff --git a/testsuite/systemtap.printf/sharedbuf.exp b/testsuite/systemtap.printf/sharedbuf.exp
index 6a182716..b1fd4c72 100644
--- a/testsuite/systemtap.printf/sharedbuf.exp
+++ b/testsuite/systemtap.printf/sharedbuf.exp
@@ -52,7 +52,7 @@ expect {
}
eof {fail "shared buffer hosting. unexpected EOF" }
}
-send "\003"
+exec kill -INT -[exp_pid]
if {$c1 == 2 && $c2 == 2} {
pass "buffer sharing"
} else {
diff --git a/testsuite/systemtap.samples/crash.exp b/testsuite/systemtap.samples/crash.exp
index 629cff54..9c3e5e05 100644
--- a/testsuite/systemtap.samples/crash.exp
+++ b/testsuite/systemtap.samples/crash.exp
@@ -19,7 +19,7 @@ expect {
timeout { fail "$test - testlog.stp timeout" }
timeout { fail "$test - testlog.stp eof" }
}
-catch { send "\003"; close ; wait }
+catch { exec kill -INT -[exp_pid]; close ; wait }
# The crash(8) script creates testlog/global or testlog/cpu<n>
as_root { chmod -R a+rX testlog }
diff --git a/testsuite/systemtap.stress/whitelist.exp b/testsuite/systemtap.stress/whitelist.exp
index 00a8208a..4a31c124 100644
--- a/testsuite/systemtap.stress/whitelist.exp
+++ b/testsuite/systemtap.stress/whitelist.exp
@@ -310,14 +310,14 @@ proc whitelist_run { TEST_NAME {LOAD_GEN_FUNCTION ""} args } {
-re {Pass\ 5:\ starting\ run.\r\n} {
set error_msg "stap runtime"
runbenchs
- send -i $stap_id "\003"
+ exec kill -INT -[exp_pid -i $stap_id]
exp_continue
}
-re {Pass\ 5:\ run\ completed} {
set failed 0
}
-re {parse\ error|semantic\ error} { set detail "$expect_out(0,string)" }
- timeout { set detail "stap timeout"; send "\003" }
+ timeout { set detail "stap timeout"; exec kill -INT -[exp_pid -i $stap_id] }
eof { set failed 0 }
}
catch {close -i $stap_id}