summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog6
-rw-r--r--testsuite/lib/stap_run.exp3
-rw-r--r--testsuite/lib/systemtap.exp5
-rw-r--r--testsuite/systemtap.base/beginenderror.exp2
-rw-r--r--testsuite/systemtap.base/bench.exp2
-rw-r--r--testsuite/systemtap.base/cache.exp3
-rw-r--r--testsuite/systemtap.base/cmd_parse.exp16
-rw-r--r--testsuite/systemtap.base/debugpath.exp4
-rw-r--r--testsuite/systemtap.base/deref2.exp2
-rw-r--r--testsuite/systemtap.base/marker.exp3
-rw-r--r--testsuite/systemtap.base/onoffprobe.exp2
-rw-r--r--testsuite/systemtap.base/optim.exp3
-rw-r--r--testsuite/systemtap.base/overload.exp3
-rw-r--r--testsuite/systemtap.base/preprocessor.exp2
-rw-r--r--testsuite/systemtap.base/prologues.exp4
-rw-r--r--testsuite/systemtap.base/stmtvars.exp4
-rw-r--r--testsuite/systemtap.base/utrace_p4.exp3
-rw-r--r--testsuite/systemtap.base/warnings.exp2
-rw-r--r--testsuite/systemtap.context/args.tcl3
-rw-r--r--testsuite/systemtap.context/backtrace.tcl4
-rw-r--r--testsuite/systemtap.context/pid.tcl3
-rw-r--r--testsuite/systemtap.maps/absentstats.exp3
-rw-r--r--testsuite/systemtap.maps/foreach_fail.exp3
-rw-r--r--testsuite/systemtap.maps/ix_clear.exp3
-rw-r--r--testsuite/systemtap.maps/ix_clear2.exp3
-rw-r--r--testsuite/systemtap.maps/ix_clear3.exp3
-rw-r--r--testsuite/systemtap.maps/linear_0.exp3
-rw-r--r--testsuite/systemtap.maps/linear_bad.exp3
-rw-r--r--testsuite/systemtap.maps/linear_neg.exp3
-rw-r--r--testsuite/systemtap.maps/pmap_agg_overflow.exp3
-rw-r--r--testsuite/systemtap.printf/sharedbuf.exp3
-rw-r--r--testsuite/systemtap.samples/args.exp6
-rw-r--r--testsuite/systemtap.samples/arith.exp3
-rw-r--r--testsuite/systemtap.samples/arith_limits.exp2
-rw-r--r--testsuite/systemtap.samples/crash.exp2
-rw-r--r--testsuite/systemtap.samples/gtod.exp6
-rw-r--r--testsuite/systemtap.samples/pfaults.exp2
-rw-r--r--testsuite/systemtap.samples/poll_map.exp3
-rw-r--r--testsuite/systemtap.samples/primes.exp2
-rw-r--r--testsuite/systemtap.samples/profile.exp2
-rw-r--r--testsuite/systemtap.samples/symbols.exp2
-rw-r--r--testsuite/systemtap.samples/syscalls1.exp2
-rw-r--r--testsuite/systemtap.samples/syscalls2.exp2
-rw-r--r--testsuite/systemtap.samples/system_func.exp2
-rw-r--r--testsuite/systemtap.stress/conversions.exp2
-rw-r--r--testsuite/systemtap.stress/whitelist.exp5
46 files changed, 70 insertions, 82 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index f1e4d603..f5f51fad 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2008-05-27 Frank Ch. Eigler <fche@elastic.org>
+
+ * lib/systemtap.exp (closewait): New proc for aggressive child
+ process reaping.
+ ALL/*.exp: Updated to use it instead of ad-hoc catch/close/wait.
+
2008-05-26 Frank Ch. Eigler <fche@elastic.org>
* testsuite/stmtvars.exp: Tweaked matching regexps, tested on
diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index 42efa4f8..aa681c22 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -90,8 +90,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
}
# again for good measure
exec kill -INT -[exp_pid]
- catch close
- wait
+ closewait
}
proc no_load {} {
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index d458e98f..4586ee20 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -128,3 +128,8 @@ proc as_root { command } {
verbose -log "RC $res"
return $res
}
+
+proc closewait { args } {
+ catch { if {"$args" == "" } then { close -slave } else { eval "close $args" } }
+ catch { wait }
+}
diff --git a/testsuite/systemtap.base/beginenderror.exp b/testsuite/systemtap.base/beginenderror.exp
index 1ab50fdb..b43a900d 100644
--- a/testsuite/systemtap.base/beginenderror.exp
+++ b/testsuite/systemtap.base/beginenderror.exp
@@ -15,7 +15,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
if {$ok1 == 4 && $ok2 == 3 && $ko == 0} then {
pass "$test ($ok1 $ok2 $ko)"
} else {
diff --git a/testsuite/systemtap.base/bench.exp b/testsuite/systemtap.base/bench.exp
index 4863a00c..32de9a0b 100644
--- a/testsuite/systemtap.base/bench.exp
+++ b/testsuite/systemtap.base/bench.exp
@@ -10,5 +10,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
if {$ok == 15} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp
index 26d7b0ef..a908910a 100644
--- a/testsuite/systemtap.base/cache.exp
+++ b/testsuite/systemtap.base/cache.exp
@@ -36,8 +36,7 @@ proc stap_compile { TEST_NAME flags script args } {
-re "semantic error:" {incr compile_errors 1; exp_continue}
timeout { fail "$TEST_NAME (timeout)" }
}
- catch close
- wait
+ closewait
# If we've got compile errors and the script was supposed to
# compile, fail.
diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp
index cbce0455..9fcad31a 100644
--- a/testsuite/systemtap.base/cmd_parse.exp
+++ b/testsuite/systemtap.base/cmd_parse.exp
@@ -13,7 +13,7 @@ expect {
timeout {fail "cmd_parse1: unexpected timeout"}
eof {fail "cmd_parse1: unexpected EOF"}
}
-wait
+closewait
# stap -c 'echo "hello "\"world\"' -e 'probe begin {}'
spawn stap -c {echo "hello "\"world\"} -e {probe begin {}}
@@ -23,7 +23,7 @@ expect {
timeout {fail "cmd_parse2: unexpected timeout"}
eof {fail "cmd_parse2: unexpected EOF"}
}
-wait
+closewait
#stap -c '(a="hello world"; echo $a)' -e 'probe begin {}'
spawn stap -c {(a="hello world"; echo $a)} -e {probe begin {}}
@@ -33,7 +33,7 @@ expect {
timeout {fail "cmd_parse3: unexpected timeout"}
eof {fail "cmd_parse3: unexpected EOF"}
}
-wait
+closewait
#stap -c '(a="hello "\"world\"; echo $a)' -e 'probe begin {}'
spawn stap -c {(a="hello "\"world\"; echo $a)} -e {probe begin {}}
@@ -43,7 +43,7 @@ expect {
timeout {fail "cmd_parse4: unexpected timeout"}
eof {fail "cmd_parse4: unexpected EOF"}
}
-wait
+closewait
#stap -c '(a="hello "world; echo $a)' -e 'probe begin {}'
spawn stap -c {(a="hello "world; echo $a)} -e {probe begin {}}
@@ -53,7 +53,7 @@ expect {
timeout {fail "cmd_parse5: unexpected timeout"}
eof {fail "cmd_parse5: unexpected EOF"}
}
-wait
+closewait
#stap -c '(((a=42+7)); echo "The answer is $a")' -e 'probe begin {}'
# NB: not ((a=42+7)) - must not assume bash
@@ -64,7 +64,7 @@ expect {
timeout {fail "cmd_parse6: unexpected timeout"}
eof {fail "cmd_parse6: unexpected EOF"}
}
-wait
+closewait
#stap -c '(echo "Hello World" 1>&2) > /dev/null' -e 'probe begin {}'
spawn stap -c {(echo "Hello World" 1>&2) > /dev/null} -e {probe begin {}}
@@ -74,7 +74,7 @@ expect {
timeout {fail "cmd_parse7: unexpected timeout"}
eof {fail "cmd_parse7: unexpected EOF"}
}
-wait
+closewait
spawn stap -l {vm.*}
expect {
@@ -83,4 +83,4 @@ expect {
timeout {fail "cmd_parse8: unexpected timeout"}
eof {fail "cmd_parse8: unexpected EOF"}
}
-wait
+closewait
diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp
index b0b12207..a3b3b051 100644
--- a/testsuite/systemtap.base/debugpath.exp
+++ b/testsuite/systemtap.base/debugpath.exp
@@ -7,7 +7,7 @@ expect {
eof { fail "$test (eof)" }
}
-wait
+closewait
set test "debugpath-good"
spawn env SYSTEMTAP_DEBUGINFO_PATH=:/usr/lib/debug stap -e "probe kernel.function(\"sys_open\") {}" -p2
@@ -17,4 +17,4 @@ expect {
eof { fail "$test (eof)" }
}
-wait
+closewait
diff --git a/testsuite/systemtap.base/deref2.exp b/testsuite/systemtap.base/deref2.exp
index 6ee85d10..b897fad8 100644
--- a/testsuite/systemtap.base/deref2.exp
+++ b/testsuite/systemtap.base/deref2.exp
@@ -24,6 +24,6 @@ expect {
eof { }
timeout { }
}
-wait
+closewait
if {$neg > 0} { pass "$test ($pos $neg)" } else { fail "$test ($pos $neg)" }
diff --git a/testsuite/systemtap.base/marker.exp b/testsuite/systemtap.base/marker.exp
index 857fa5d2..60a48b80 100644
--- a/testsuite/systemtap.base/marker.exp
+++ b/testsuite/systemtap.base/marker.exp
@@ -23,8 +23,7 @@ proc stap_compile { TEST_NAME compile script args } {
-re "compilation failed" {incr compile_errors 1; exp_continue}
-re "semantic error:" {incr compile_errors 1; exp_continue}
}
- catch close
- wait
+ closewait
# If we've got compile errors and the script was supposed to
# compile, fail.
diff --git a/testsuite/systemtap.base/onoffprobe.exp b/testsuite/systemtap.base/onoffprobe.exp
index 24012cac..8e53ad45 100644
--- a/testsuite/systemtap.base/onoffprobe.exp
+++ b/testsuite/systemtap.base/onoffprobe.exp
@@ -34,7 +34,7 @@ expect {
}
exec kill -INT -[exp_pid]
#FIXME does not handle case of hanging pfaults.stp correctly
-wait
+closewait
exec rm -f $test.ko
if {$ok != 8} {fail "conditional probes ($ok)"}
diff --git a/testsuite/systemtap.base/optim.exp b/testsuite/systemtap.base/optim.exp
index ddc1c90f..2d7b2bf7 100644
--- a/testsuite/systemtap.base/optim.exp
+++ b/testsuite/systemtap.base/optim.exp
@@ -9,6 +9,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-close
-wait
+closewait
if {$ok == 2} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.base/overload.exp b/testsuite/systemtap.base/overload.exp
index cbcbe817..de9382d2 100644
--- a/testsuite/systemtap.base/overload.exp
+++ b/testsuite/systemtap.base/overload.exp
@@ -62,8 +62,7 @@ proc stap_run_overload { TEST_NAME EXPECT_OVERLOAD args } {
exec kill -INT -[exp_pid] }
eof { fail "$TEST_NAME startup (eof)" }
}
- catch close
- wait
+ closewait
}
# OVERLOAD1 tests to make sure normal operation doesn't receive an
diff --git a/testsuite/systemtap.base/preprocessor.exp b/testsuite/systemtap.base/preprocessor.exp
index 4e0c7fc2..e210cf4f 100644
--- a/testsuite/systemtap.base/preprocessor.exp
+++ b/testsuite/systemtap.base/preprocessor.exp
@@ -48,5 +48,5 @@ expect {
eof { }
timeout { }
}
-catch {close; wait}
+closewait
if {$ok == 1} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.base/prologues.exp b/testsuite/systemtap.base/prologues.exp
index 48f994a5..505b9836 100644
--- a/testsuite/systemtap.base/prologues.exp
+++ b/testsuite/systemtap.base/prologues.exp
@@ -9,7 +9,7 @@ if {! [installtest_p]} { untested $test } else {
timeout { fail "$test (timeout)" }
eof
}
- wait
+ closewait
if {$ok > 10} { pass $test } else { fail $test }
}
@@ -24,7 +24,7 @@ if {! [installtest_p]} { untested $test } else {
timeout { fail "$test (timeout)" }
eof
}
- wait
+ closewait
if {$ok > 10} { pass $test } else { fail $test }
}
diff --git a/testsuite/systemtap.base/stmtvars.exp b/testsuite/systemtap.base/stmtvars.exp
index 822e0d7e..abc85478 100644
--- a/testsuite/systemtap.base/stmtvars.exp
+++ b/testsuite/systemtap.base/stmtvars.exp
@@ -10,7 +10,7 @@ expect {
timeout { fail "$test (timeout)" }
eof
}
-wait
+closewait
verbose -log "pc=$pc vars=$vars"
if {$pc != 0 && $vars != ""} { pass "$test - .function" } { fail "$test - .function" }
@@ -23,7 +23,7 @@ expect {
timeout { fail "$test (timeout)" }
eof
}
-wait
+closewait
verbose -log "pc2=$pc2 vars2=$vars2"
if {$pc == $pc2 && $vars == $vars2} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.base/utrace_p4.exp b/testsuite/systemtap.base/utrace_p4.exp
index eb6ea685..df877056 100644
--- a/testsuite/systemtap.base/utrace_p4.exp
+++ b/testsuite/systemtap.base/utrace_p4.exp
@@ -26,8 +26,7 @@ proc stap_compile { TEST_NAME compile script args } {
-re "compilation failed" {incr compile_errors 1; exp_continue}
-re "semantic error:" {incr compile_errors 1; exp_continue}
}
- catch close
- wait
+ closewait
# If we've got compile errors and the script was supposed to
# compile, fail.
diff --git a/testsuite/systemtap.base/warnings.exp b/testsuite/systemtap.base/warnings.exp
index 6cff723d..1e33138f 100644
--- a/testsuite/systemtap.base/warnings.exp
+++ b/testsuite/systemtap.base/warnings.exp
@@ -8,7 +8,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
if {$ok == 22} {
pass $test
} else {
diff --git a/testsuite/systemtap.context/args.tcl b/testsuite/systemtap.context/args.tcl
index 7cb79cdf..3a1ecb23 100644
--- a/testsuite/systemtap.context/args.tcl
+++ b/testsuite/systemtap.context/args.tcl
@@ -54,5 +54,4 @@ expect {
eof {fail "function arguments: unexpected timeout"}
}
exec kill -INT -[exp_pid]
-close
-wait
+closewait
diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl
index 6c8aee40..f9e14b31 100644
--- a/testsuite/systemtap.context/backtrace.tcl
+++ b/testsuite/systemtap.context/backtrace.tcl
@@ -163,6 +163,4 @@ if {$m6 == 5} {
}
-
-close
-wait
+closewait
diff --git a/testsuite/systemtap.context/pid.tcl b/testsuite/systemtap.context/pid.tcl
index a2c091f1..f9dffba7 100644
--- a/testsuite/systemtap.context/pid.tcl
+++ b/testsuite/systemtap.context/pid.tcl
@@ -28,5 +28,4 @@ expect {
timeout {fail "all pid tests - timeout"}
eof {fail "all pid tests - unexpected EOF"}
}
-catch {close}
-wait
+closewait
diff --git a/testsuite/systemtap.maps/absentstats.exp b/testsuite/systemtap.maps/absentstats.exp
index f0e99a86..d533d2fa 100644
--- a/testsuite/systemtap.maps/absentstats.exp
+++ b/testsuite/systemtap.maps/absentstats.exp
@@ -17,7 +17,6 @@ expect {
-re {\n} { exp_continue }
eof { }
}
-catch close
-wait
+closewait
if {$ok == 2 && $ko == 13} then { pass $test } else { fail "$test ($ok $ko)" }
diff --git a/testsuite/systemtap.maps/foreach_fail.exp b/testsuite/systemtap.maps/foreach_fail.exp
index 75fcfcc4..934a58cd 100644
--- a/testsuite/systemtap.maps/foreach_fail.exp
+++ b/testsuite/systemtap.maps/foreach_fail.exp
@@ -14,5 +14,4 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { pass "$test correctly failed to compile" }
}
-close
-wait
+closewait
diff --git a/testsuite/systemtap.maps/ix_clear.exp b/testsuite/systemtap.maps/ix_clear.exp
index 07417898..b88e92f5 100644
--- a/testsuite/systemtap.maps/ix_clear.exp
+++ b/testsuite/systemtap.maps/ix_clear.exp
@@ -21,5 +21,4 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-catch { close }
-wait
+closewait
diff --git a/testsuite/systemtap.maps/ix_clear2.exp b/testsuite/systemtap.maps/ix_clear2.exp
index a1b68628..280650c0 100644
--- a/testsuite/systemtap.maps/ix_clear2.exp
+++ b/testsuite/systemtap.maps/ix_clear2.exp
@@ -22,5 +22,4 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-catch { close }
-wait
+closewait
diff --git a/testsuite/systemtap.maps/ix_clear3.exp b/testsuite/systemtap.maps/ix_clear3.exp
index a2935470..c0a61af1 100644
--- a/testsuite/systemtap.maps/ix_clear3.exp
+++ b/testsuite/systemtap.maps/ix_clear3.exp
@@ -20,5 +20,4 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-catch { close }
-wait
+closewait
diff --git a/testsuite/systemtap.maps/linear_0.exp b/testsuite/systemtap.maps/linear_0.exp
index 8e6952a7..efb97066 100644
--- a/testsuite/systemtap.maps/linear_0.exp
+++ b/testsuite/systemtap.maps/linear_0.exp
@@ -15,8 +15,7 @@ expect {
}
eof { }
}
-catch close
-wait
+closewait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/linear_bad.exp b/testsuite/systemtap.maps/linear_bad.exp
index d99fd16c..a093cb49 100644
--- a/testsuite/systemtap.maps/linear_bad.exp
+++ b/testsuite/systemtap.maps/linear_bad.exp
@@ -15,8 +15,7 @@ expect {
}
eof { }
}
-catch close
-wait
+closewait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/linear_neg.exp b/testsuite/systemtap.maps/linear_neg.exp
index b1640030..bad6ad21 100644
--- a/testsuite/systemtap.maps/linear_neg.exp
+++ b/testsuite/systemtap.maps/linear_neg.exp
@@ -15,8 +15,7 @@ expect {
}
eof { }
}
-catch close
-wait
+closewait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/pmap_agg_overflow.exp b/testsuite/systemtap.maps/pmap_agg_overflow.exp
index 99665057..edb605e7 100644
--- a/testsuite/systemtap.maps/pmap_agg_overflow.exp
+++ b/testsuite/systemtap.maps/pmap_agg_overflow.exp
@@ -25,8 +25,7 @@ expect {
eof {}
-re "semantic error:" { fail "$test compilation" }
}
-catch { close }
-wait
+closewait
if {$pass == 3} {
pass $test
diff --git a/testsuite/systemtap.printf/sharedbuf.exp b/testsuite/systemtap.printf/sharedbuf.exp
index b1fd4c72..7774a305 100644
--- a/testsuite/systemtap.printf/sharedbuf.exp
+++ b/testsuite/systemtap.printf/sharedbuf.exp
@@ -58,5 +58,4 @@ if {$c1 == 2 && $c2 == 2} {
} else {
fail "buffer sharing ($c1, $c2)"
}
-close
-wait
+closewait
diff --git a/testsuite/systemtap.samples/args.exp b/testsuite/systemtap.samples/args.exp
index 6b1fd3d0..9cfc0d2b 100644
--- a/testsuite/systemtap.samples/args.exp
+++ b/testsuite/systemtap.samples/args.exp
@@ -21,7 +21,7 @@ expect {
timeout { fail "$test compile (timeout)" }
eof { }
}
-catch {close}; wait
+closewait
set modpath_cwd "$modname.ko"
if [file exists $modpath_cwd] {
@@ -55,7 +55,7 @@ expect {
timeout { }
eof { }
}
-catch {close}; wait
+closewait
if {$ok == 1} {
pass "$test run 1"
} else {
@@ -70,7 +70,7 @@ expect {
timeout { }
eof { }
}
-catch {close}; wait
+closewait
if {$ok == 1} {
pass "$test run 2"
} else {
diff --git a/testsuite/systemtap.samples/arith.exp b/testsuite/systemtap.samples/arith.exp
index c4f72793..f0af4db7 100644
--- a/testsuite/systemtap.samples/arith.exp
+++ b/testsuite/systemtap.samples/arith.exp
@@ -9,6 +9,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-close
-wait
+closewait
if {$ok == 1} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/arith_limits.exp b/testsuite/systemtap.samples/arith_limits.exp
index 93794c8e..b8b3d3d8 100644
--- a/testsuite/systemtap.samples/arith_limits.exp
+++ b/testsuite/systemtap.samples/arith_limits.exp
@@ -9,5 +9,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
if {$ok == 1} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/crash.exp b/testsuite/systemtap.samples/crash.exp
index 9c3e5e05..453a510b 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 { exec kill -INT -[exp_pid]; close ; wait }
+catch { exec kill -INT -[exp_pid]; closewait }
# The crash(8) script creates testlog/global or testlog/cpu<n>
as_root { chmod -R a+rX testlog }
diff --git a/testsuite/systemtap.samples/gtod.exp b/testsuite/systemtap.samples/gtod.exp
index a8f3c9d6..97aaca83 100644
--- a/testsuite/systemtap.samples/gtod.exp
+++ b/testsuite/systemtap.samples/gtod.exp
@@ -16,7 +16,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
#10ms interval (check timer drift in middle range)
spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 10000
expect {
@@ -25,7 +25,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
#100ms interval (calm down processors and CPU freq might be changed)
spawn $srcdir/$subdir/gtod.sh $srcdir/$subdir/gtod.stp $wd/gtod 100000
expect {
@@ -34,7 +34,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-wait
+closewait
exec rm -f $wd/gtod
if {$ok == 300} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/pfaults.exp b/testsuite/systemtap.samples/pfaults.exp
index 2cab7c14..bf50cd18 100644
--- a/testsuite/systemtap.samples/pfaults.exp
+++ b/testsuite/systemtap.samples/pfaults.exp
@@ -12,5 +12,5 @@ expect {
eof { }
}
#FIXME does not handle case of hanging pfaults.stp correctly
-wait
+closewait
if {$ok == 2} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/poll_map.exp b/testsuite/systemtap.samples/poll_map.exp
index 5ade48e6..be999b49 100644
--- a/testsuite/systemtap.samples/poll_map.exp
+++ b/testsuite/systemtap.samples/poll_map.exp
@@ -9,6 +9,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-close
-wait
+closewait
if {$ok == 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/primes.exp b/testsuite/systemtap.samples/primes.exp
index f99f67cc..f5a734c3 100644
--- a/testsuite/systemtap.samples/primes.exp
+++ b/testsuite/systemtap.samples/primes.exp
@@ -16,6 +16,6 @@ expect {
eof { }
}
#FIXME does not handle case of hanging primes.stp correctly
-wait
+closewait
if {$ok == 7} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/profile.exp b/testsuite/systemtap.samples/profile.exp
index 9ca9da15..dffac99d 100644
--- a/testsuite/systemtap.samples/profile.exp
+++ b/testsuite/systemtap.samples/profile.exp
@@ -10,6 +10,6 @@ expect {
eof { }
}
#FIXME does not handle case of hanging primes.stp correctly
-wait
+closewait
if {$ok > 0} { pass "$test ($ok)" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/symbols.exp b/testsuite/systemtap.samples/symbols.exp
index 0c599b58..a3bad80a 100644
--- a/testsuite/systemtap.samples/symbols.exp
+++ b/testsuite/systemtap.samples/symbols.exp
@@ -10,5 +10,5 @@ expect {
eof { }
}
#FIXME does not handle case of hanging symbols.stp correctly
-wait
+closewait
if {$ok == 11} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/syscalls1.exp b/testsuite/systemtap.samples/syscalls1.exp
index eb8a0c6d..e9998c14 100644
--- a/testsuite/systemtap.samples/syscalls1.exp
+++ b/testsuite/systemtap.samples/syscalls1.exp
@@ -10,5 +10,5 @@ expect {
eof { }
}
#FIXME does not handle case of hanging psyscalls.stp correctly
-wait
+closewait
if {$ok > 200 && $ok < 350} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/syscalls2.exp b/testsuite/systemtap.samples/syscalls2.exp
index 7bbd9a51..0a171a75 100644
--- a/testsuite/systemtap.samples/syscalls2.exp
+++ b/testsuite/systemtap.samples/syscalls2.exp
@@ -9,7 +9,7 @@ expect {
eof { }
}
#FIXME does not handle case of hanging psyscalls.stp correctly
-wait
+closewait
# 150 is conservative - it's larger than 100 to allow a bit of slop
# between the exit() call and the actual shutdown
if {$ok >= 100 && $ok < 150} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/system_func.exp b/testsuite/systemtap.samples/system_func.exp
index ec935783..661815af 100644
--- a/testsuite/systemtap.samples/system_func.exp
+++ b/testsuite/systemtap.samples/system_func.exp
@@ -18,5 +18,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-catch {close}; wait
+closewait
if {$open == 1 && $saw_user == 1 && $done == 1 } { pass "$test" } { fail "$test ($open,$saw_user,$done)" }
diff --git a/testsuite/systemtap.stress/conversions.exp b/testsuite/systemtap.stress/conversions.exp
index 9c2c2fa9..89d89250 100644
--- a/testsuite/systemtap.stress/conversions.exp
+++ b/testsuite/systemtap.stress/conversions.exp
@@ -17,7 +17,7 @@ foreach value {0 0xffffffff 0xffffffffffffffff} {
timeout { fail "$test (timeout)" }
}
verbose -log "done exp $test $errs"
- wait
+ closewait
if {$errs == 14} { pass $test } else { fail "$test ($errs)" }
verbose -log "done $test $errs"
}
diff --git a/testsuite/systemtap.stress/whitelist.exp b/testsuite/systemtap.stress/whitelist.exp
index 4a31c124..f7c0bf16 100644
--- a/testsuite/systemtap.stress/whitelist.exp
+++ b/testsuite/systemtap.stress/whitelist.exp
@@ -320,8 +320,7 @@ proc whitelist_run { TEST_NAME {LOAD_GEN_FUNCTION ""} args } {
timeout { set detail "stap timeout"; exec kill -INT -[exp_pid -i $stap_id] }
eof { set failed 0 }
}
- catch {close -i $stap_id}
- wait -i $stap_id
+ closewait -i $stap_id
if {$failed} { puts "whitelist_run failure \($detail\)" }
}
@@ -353,7 +352,7 @@ proc runbenchs {} {
set donepos [lsearch $idlist $expect_out(spawn_id)]
set idlist [lreplace $idlist $donepos $donepos]
incr runningcount -1
- wait -i $expect_out(spawn_id)
+ closewait -i $expect_out(spawn_id)
} timeout {
break
}