summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.samples
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@elastic.org>2008-05-27 17:40:00 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-05-27 17:43:04 -0400
commit7938bd829dfd82c40b35d536b5913e666c1454d2 (patch)
tree2022964dca31d53b6eee3fe9588e955c410ec53e /testsuite/systemtap.samples
parent16a02dfb97fd3979d0f517a71a6aba050a3bed98 (diff)
downloadsystemtap-steved-7938bd829dfd82c40b35d536b5913e666c1454d2.tar.gz
systemtap-steved-7938bd829dfd82c40b35d536b5913e666c1454d2.tar.xz
systemtap-steved-7938bd829dfd82c40b35d536b5913e666c1454d2.zip
testsuite: use catch{close}catch{wait} to ensure child process pipe/zombie cleanup
Diffstat (limited to 'testsuite/systemtap.samples')
-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
13 files changed, 17 insertions, 19 deletions
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)" }