summaryrefslogtreecommitdiffstats
path: root/testsuite/lib
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/lib
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/lib')
-rw-r--r--testsuite/lib/stap_run.exp3
-rw-r--r--testsuite/lib/systemtap.exp5
2 files changed, 6 insertions, 2 deletions
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 }
+}