summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog7
-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, 82 insertions, 71 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index d49d777f..6798c370 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -6,13 +6,6 @@
* Makefile.am (clean-local): Try to remove all .systemtap and
.cache_test dirs.
-
-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 aa681c22..42efa4f8 100644
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -90,7 +90,8 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args }
}
# again for good measure
exec kill -INT -[exp_pid]
- closewait
+ catch close
+ wait
}
proc no_load {} {
diff --git a/testsuite/lib/systemtap.exp b/testsuite/lib/systemtap.exp
index 74fcc7af..0f6a69dd 100644
--- a/testsuite/lib/systemtap.exp
+++ b/testsuite/lib/systemtap.exp
@@ -129,8 +129,3 @@ 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 b43a900d..1ab50fdb 100644
--- a/testsuite/systemtap.base/beginenderror.exp
+++ b/testsuite/systemtap.base/beginenderror.exp
@@ -15,7 +15,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+wait
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 32de9a0b..4863a00c 100644
--- a/testsuite/systemtap.base/bench.exp
+++ b/testsuite/systemtap.base/bench.exp
@@ -10,5 +10,5 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+wait
if {$ok == 15} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp
index cae45fe2..f7ed2786 100644
--- a/testsuite/systemtap.base/cache.exp
+++ b/testsuite/systemtap.base/cache.exp
@@ -36,7 +36,8 @@ proc stap_compile { TEST_NAME flags script args } {
-re "semantic error:" {incr compile_errors 1; exp_continue}
timeout { fail "$TEST_NAME (timeout)" }
}
- closewait
+ catch close
+ wait
# 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 9fcad31a..cbce0455 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"}
}
-closewait
+wait
# 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"}
}
-closewait
+wait
#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"}
}
-closewait
+wait
#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"}
}
-closewait
+wait
#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"}
}
-closewait
+wait
#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"}
}
-closewait
+wait
#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"}
}
-closewait
+wait
spawn stap -l {vm.*}
expect {
@@ -83,4 +83,4 @@ expect {
timeout {fail "cmd_parse8: unexpected timeout"}
eof {fail "cmd_parse8: unexpected EOF"}
}
-closewait
+wait
diff --git a/testsuite/systemtap.base/debugpath.exp b/testsuite/systemtap.base/debugpath.exp
index a3b3b051..b0b12207 100644
--- a/testsuite/systemtap.base/debugpath.exp
+++ b/testsuite/systemtap.base/debugpath.exp
@@ -7,7 +7,7 @@ expect {
eof { fail "$test (eof)" }
}
-closewait
+wait
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)" }
}
-closewait
+wait
diff --git a/testsuite/systemtap.base/deref2.exp b/testsuite/systemtap.base/deref2.exp
index b897fad8..6ee85d10 100644
--- a/testsuite/systemtap.base/deref2.exp
+++ b/testsuite/systemtap.base/deref2.exp
@@ -24,6 +24,6 @@ expect {
eof { }
timeout { }
}
-closewait
+wait
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 60a48b80..857fa5d2 100644
--- a/testsuite/systemtap.base/marker.exp
+++ b/testsuite/systemtap.base/marker.exp
@@ -23,7 +23,8 @@ 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}
}
- closewait
+ catch close
+ wait
# 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 8e53ad45..24012cac 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
-closewait
+wait
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 2d7b2bf7..ddc1c90f 100644
--- a/testsuite/systemtap.base/optim.exp
+++ b/testsuite/systemtap.base/optim.exp
@@ -9,5 +9,6 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+close
+wait
if {$ok == 2} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.base/overload.exp b/testsuite/systemtap.base/overload.exp
index de9382d2..cbcbe817 100644
--- a/testsuite/systemtap.base/overload.exp
+++ b/testsuite/systemtap.base/overload.exp
@@ -62,7 +62,8 @@ proc stap_run_overload { TEST_NAME EXPECT_OVERLOAD args } {
exec kill -INT -[exp_pid] }
eof { fail "$TEST_NAME startup (eof)" }
}
- closewait
+ catch close
+ wait
}
# 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 e210cf4f..4e0c7fc2 100644
--- a/testsuite/systemtap.base/preprocessor.exp
+++ b/testsuite/systemtap.base/preprocessor.exp
@@ -48,5 +48,5 @@ expect {
eof { }
timeout { }
}
-closewait
+catch {close; wait}
if {$ok == 1} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.base/prologues.exp b/testsuite/systemtap.base/prologues.exp
index 505b9836..48f994a5 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
}
- closewait
+ wait
if {$ok > 10} { pass $test } else { fail $test }
}
@@ -24,7 +24,7 @@ if {! [installtest_p]} { untested $test } else {
timeout { fail "$test (timeout)" }
eof
}
- closewait
+ wait
if {$ok > 10} { pass $test } else { fail $test }
}
diff --git a/testsuite/systemtap.base/stmtvars.exp b/testsuite/systemtap.base/stmtvars.exp
index abc85478..822e0d7e 100644
--- a/testsuite/systemtap.base/stmtvars.exp
+++ b/testsuite/systemtap.base/stmtvars.exp
@@ -10,7 +10,7 @@ expect {
timeout { fail "$test (timeout)" }
eof
}
-closewait
+wait
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
}
-closewait
+wait
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 df877056..eb6ea685 100644
--- a/testsuite/systemtap.base/utrace_p4.exp
+++ b/testsuite/systemtap.base/utrace_p4.exp
@@ -26,7 +26,8 @@ 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}
}
- closewait
+ catch close
+ wait
# 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 1e33138f..6cff723d 100644
--- a/testsuite/systemtap.base/warnings.exp
+++ b/testsuite/systemtap.base/warnings.exp
@@ -8,7 +8,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+wait
if {$ok == 22} {
pass $test
} else {
diff --git a/testsuite/systemtap.context/args.tcl b/testsuite/systemtap.context/args.tcl
index 3a1ecb23..7cb79cdf 100644
--- a/testsuite/systemtap.context/args.tcl
+++ b/testsuite/systemtap.context/args.tcl
@@ -54,4 +54,5 @@ expect {
eof {fail "function arguments: unexpected timeout"}
}
exec kill -INT -[exp_pid]
-closewait
+close
+wait
diff --git a/testsuite/systemtap.context/backtrace.tcl b/testsuite/systemtap.context/backtrace.tcl
index f9e14b31..6c8aee40 100644
--- a/testsuite/systemtap.context/backtrace.tcl
+++ b/testsuite/systemtap.context/backtrace.tcl
@@ -163,4 +163,6 @@ if {$m6 == 5} {
}
-closewait
+
+close
+wait
diff --git a/testsuite/systemtap.context/pid.tcl b/testsuite/systemtap.context/pid.tcl
index f9dffba7..a2c091f1 100644
--- a/testsuite/systemtap.context/pid.tcl
+++ b/testsuite/systemtap.context/pid.tcl
@@ -28,4 +28,5 @@ expect {
timeout {fail "all pid tests - timeout"}
eof {fail "all pid tests - unexpected EOF"}
}
-closewait
+catch {close}
+wait
diff --git a/testsuite/systemtap.maps/absentstats.exp b/testsuite/systemtap.maps/absentstats.exp
index d533d2fa..f0e99a86 100644
--- a/testsuite/systemtap.maps/absentstats.exp
+++ b/testsuite/systemtap.maps/absentstats.exp
@@ -17,6 +17,7 @@ expect {
-re {\n} { exp_continue }
eof { }
}
-closewait
+catch close
+wait
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 934a58cd..75fcfcc4 100644
--- a/testsuite/systemtap.maps/foreach_fail.exp
+++ b/testsuite/systemtap.maps/foreach_fail.exp
@@ -14,4 +14,5 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { pass "$test correctly failed to compile" }
}
-closewait
+close
+wait
diff --git a/testsuite/systemtap.maps/ix_clear.exp b/testsuite/systemtap.maps/ix_clear.exp
index b88e92f5..07417898 100644
--- a/testsuite/systemtap.maps/ix_clear.exp
+++ b/testsuite/systemtap.maps/ix_clear.exp
@@ -21,4 +21,5 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-closewait
+catch { close }
+wait
diff --git a/testsuite/systemtap.maps/ix_clear2.exp b/testsuite/systemtap.maps/ix_clear2.exp
index 280650c0..a1b68628 100644
--- a/testsuite/systemtap.maps/ix_clear2.exp
+++ b/testsuite/systemtap.maps/ix_clear2.exp
@@ -22,4 +22,5 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-closewait
+catch { close }
+wait
diff --git a/testsuite/systemtap.maps/ix_clear3.exp b/testsuite/systemtap.maps/ix_clear3.exp
index c0a61af1..a2935470 100644
--- a/testsuite/systemtap.maps/ix_clear3.exp
+++ b/testsuite/systemtap.maps/ix_clear3.exp
@@ -20,4 +20,5 @@ expect {
fail "$test unexpected EOF" }
-re "semantic error:" { fail "$test compilation" }
}
-closewait
+catch { close }
+wait
diff --git a/testsuite/systemtap.maps/linear_0.exp b/testsuite/systemtap.maps/linear_0.exp
index efb97066..8e6952a7 100644
--- a/testsuite/systemtap.maps/linear_0.exp
+++ b/testsuite/systemtap.maps/linear_0.exp
@@ -15,7 +15,8 @@ expect {
}
eof { }
}
-closewait
+catch close
+wait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/linear_bad.exp b/testsuite/systemtap.maps/linear_bad.exp
index a093cb49..d99fd16c 100644
--- a/testsuite/systemtap.maps/linear_bad.exp
+++ b/testsuite/systemtap.maps/linear_bad.exp
@@ -15,7 +15,8 @@ expect {
}
eof { }
}
-closewait
+catch close
+wait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/linear_neg.exp b/testsuite/systemtap.maps/linear_neg.exp
index bad6ad21..b1640030 100644
--- a/testsuite/systemtap.maps/linear_neg.exp
+++ b/testsuite/systemtap.maps/linear_neg.exp
@@ -15,7 +15,8 @@ expect {
}
eof { }
}
-closewait
+catch close
+wait
if {$ok == 1} {
pass $test
diff --git a/testsuite/systemtap.maps/pmap_agg_overflow.exp b/testsuite/systemtap.maps/pmap_agg_overflow.exp
index edb605e7..99665057 100644
--- a/testsuite/systemtap.maps/pmap_agg_overflow.exp
+++ b/testsuite/systemtap.maps/pmap_agg_overflow.exp
@@ -25,7 +25,8 @@ expect {
eof {}
-re "semantic error:" { fail "$test compilation" }
}
-closewait
+catch { close }
+wait
if {$pass == 3} {
pass $test
diff --git a/testsuite/systemtap.printf/sharedbuf.exp b/testsuite/systemtap.printf/sharedbuf.exp
index 7774a305..b1fd4c72 100644
--- a/testsuite/systemtap.printf/sharedbuf.exp
+++ b/testsuite/systemtap.printf/sharedbuf.exp
@@ -58,4 +58,5 @@ if {$c1 == 2 && $c2 == 2} {
} else {
fail "buffer sharing ($c1, $c2)"
}
-closewait
+close
+wait
diff --git a/testsuite/systemtap.samples/args.exp b/testsuite/systemtap.samples/args.exp
index 9cfc0d2b..6b1fd3d0 100644
--- a/testsuite/systemtap.samples/args.exp
+++ b/testsuite/systemtap.samples/args.exp
@@ -21,7 +21,7 @@ expect {
timeout { fail "$test compile (timeout)" }
eof { }
}
-closewait
+catch {close}; wait
set modpath_cwd "$modname.ko"
if [file exists $modpath_cwd] {
@@ -55,7 +55,7 @@ expect {
timeout { }
eof { }
}
-closewait
+catch {close}; wait
if {$ok == 1} {
pass "$test run 1"
} else {
@@ -70,7 +70,7 @@ expect {
timeout { }
eof { }
}
-closewait
+catch {close}; wait
if {$ok == 1} {
pass "$test run 2"
} else {
diff --git a/testsuite/systemtap.samples/arith.exp b/testsuite/systemtap.samples/arith.exp
index f0af4db7..c4f72793 100644
--- a/testsuite/systemtap.samples/arith.exp
+++ b/testsuite/systemtap.samples/arith.exp
@@ -9,5 +9,6 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+close
+wait
if {$ok == 1} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/arith_limits.exp b/testsuite/systemtap.samples/arith_limits.exp
index b8b3d3d8..93794c8e 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 { }
}
-closewait
+wait
if {$ok == 1} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/crash.exp b/testsuite/systemtap.samples/crash.exp
index 453a510b..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 { exec kill -INT -[exp_pid]; closewait }
+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.samples/gtod.exp b/testsuite/systemtap.samples/gtod.exp
index 97aaca83..a8f3c9d6 100644
--- a/testsuite/systemtap.samples/gtod.exp
+++ b/testsuite/systemtap.samples/gtod.exp
@@ -16,7 +16,7 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+wait
#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 { }
}
-closewait
+wait
#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 { }
}
-closewait
+wait
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 bf50cd18..2cab7c14 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
-closewait
+wait
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 be999b49..5ade48e6 100644
--- a/testsuite/systemtap.samples/poll_map.exp
+++ b/testsuite/systemtap.samples/poll_map.exp
@@ -9,5 +9,6 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-closewait
+close
+wait
if {$ok == 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/primes.exp b/testsuite/systemtap.samples/primes.exp
index f5a734c3..f99f67cc 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
-closewait
+wait
if {$ok == 7} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.samples/profile.exp b/testsuite/systemtap.samples/profile.exp
index da763053..87174d2c 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
-closewait
+wait
if {$ok > 0} { pass $test } { fail $test }
diff --git a/testsuite/systemtap.samples/symbols.exp b/testsuite/systemtap.samples/symbols.exp
index a3bad80a..0c599b58 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
-closewait
+wait
if {$ok == 11} { pass "$test ($ok)" } { fail "$test ($ok)" }
diff --git a/testsuite/systemtap.samples/syscalls1.exp b/testsuite/systemtap.samples/syscalls1.exp
index e9998c14..eb8a0c6d 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
-closewait
+wait
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 0a171a75..7bbd9a51 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
-closewait
+wait
# 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 661815af..ec935783 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 { }
}
-closewait
+catch {close}; wait
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 89d89250..9c2c2fa9 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"
- closewait
+ wait
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 f7c0bf16..4a31c124 100644
--- a/testsuite/systemtap.stress/whitelist.exp
+++ b/testsuite/systemtap.stress/whitelist.exp
@@ -320,7 +320,8 @@ 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 }
}
- closewait -i $stap_id
+ catch {close -i $stap_id}
+ wait -i $stap_id
if {$failed} { puts "whitelist_run failure \($detail\)" }
}
@@ -352,7 +353,7 @@ proc runbenchs {} {
set donepos [lsearch $idlist $expect_out(spawn_id)]
set idlist [lreplace $idlist $donepos $donepos]
incr runningcount -1
- closewait -i $expect_out(spawn_id)
+ wait -i $expect_out(spawn_id)
} timeout {
break
}