summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2009-08-19 11:20:59 -0500
committerDavid Smith <dsmith@redhat.com>2009-08-19 11:20:59 -0500
commit834b027898f9597f8a12488044555eba3175b391 (patch)
treeaa9aeab472b4046aef4cb32f19b29a2270e2b9e8
parentc2e11ee8dc57e53b0ae17c0d72b809e2eca862cd (diff)
downloadsystemtap-steved-834b027898f9597f8a12488044555eba3175b391.tar.gz
systemtap-steved-834b027898f9597f8a12488044555eba3175b391.tar.xz
systemtap-steved-834b027898f9597f8a12488044555eba3175b391.zip
Improved testcase error handling.
* testsuite/systemtap.base/arith.exp: Improved error handling. * testsuite/systemtap.base/cmd_parse.exp: Ditto.
-rw-r--r--testsuite/systemtap.base/arith.exp2
-rw-r--r--testsuite/systemtap.base/cmd_parse.exp26
2 files changed, 14 insertions, 14 deletions
diff --git a/testsuite/systemtap.base/arith.exp b/testsuite/systemtap.base/arith.exp
index c4f72793..b99badc8 100644
--- a/testsuite/systemtap.base/arith.exp
+++ b/testsuite/systemtap.base/arith.exp
@@ -9,6 +9,6 @@ expect {
timeout { fail "$test (timeout)" }
eof { }
}
-close
+catch { close }
wait
if {$ok == 1} { pass "$test" } { fail "$test" }
diff --git a/testsuite/systemtap.base/cmd_parse.exp b/testsuite/systemtap.base/cmd_parse.exp
index b97d9448..7f5f70d9 100644
--- a/testsuite/systemtap.base/cmd_parse.exp
+++ b/testsuite/systemtap.base/cmd_parse.exp
@@ -12,7 +12,7 @@ expect {
timeout {fail "cmd_parse1: unexpected timeout"}
eof {fail "cmd_parse1: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {echo "hello "\"world\"} -we {probe begin {}}
expect {
@@ -21,7 +21,7 @@ expect {
timeout {fail "cmd_parse2: unexpected timeout"}
eof {fail "cmd_parse2: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {sh -c '(a="hello world"; echo $a)'} -we {probe begin {}}
expect {
@@ -30,7 +30,7 @@ expect {
timeout {fail "cmd_parse3: unexpected timeout"}
eof {fail "cmd_parse3: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {sh -c '(a="hello "\"world\"; echo $a)'} -we {probe begin {}}
expect {
@@ -39,7 +39,7 @@ expect {
timeout {fail "cmd_parse4: unexpected timeout"}
eof {fail "cmd_parse4: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {sh -c '(a="hello "world; echo $a)'} -we {probe begin {}}
expect {
@@ -48,7 +48,7 @@ expect {
timeout {fail "cmd_parse5: unexpected timeout"}
eof {fail "cmd_parse5: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {bash -c '((a=42+7)); echo "The answer is $a"'} -we {probe begin {}}
expect {
@@ -57,7 +57,7 @@ expect {
timeout {fail "cmd_parse6: unexpected timeout"}
eof {fail "cmd_parse6: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -c {sh -c '(echo "Hello World" 1>&2) > /dev/null'} -we {probe begin {}}
expect {
@@ -66,7 +66,7 @@ expect {
timeout {fail "cmd_parse7: unexpected timeout"}
eof {fail "cmd_parse7: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -l {vm.*}
expect {
@@ -75,7 +75,7 @@ expect {
timeout {fail "cmd_parse8: unexpected timeout"}
eof {fail "cmd_parse8: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 1
expect {
@@ -84,7 +84,7 @@ expect {
timeout { fail "cmd_parse9 timeout" }
eof { fail "cmd_parse9 eof" }
}
-wait;close
+wait;catch {close}
spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 5 a b c d
expect {
@@ -93,7 +93,7 @@ expect {
timeout { fail "cmd_parse10 timeout" }
eof { fail "cmd_parse10 eof" }
}
-wait;close
+wait;catch {close}
spawn stap -e {probe begin { printf("%d %s\n", argc, argv[$1]) exit() }} 10 a b c d
expect {
@@ -102,7 +102,7 @@ expect {
timeout { fail "cmd_parse11 timeout" }
eof { fail "cmd_parse11 eof" }
}
-wait;close
+wait;catch {close}
spawn stap -e {probe begin { printf("%d %s\n", argc, argv[0]) exit() }}
expect {
@@ -111,7 +111,7 @@ expect {
timeout { fail "cmd_parse12 timeout" }
eof { fail "cmd_parse12 eof" }
}
-wait;close
+wait;catch {close}
spawn stap -L syscall.a*
expect {
@@ -120,7 +120,7 @@ expect {
timeout {fail "cmd_parse13: unexpected timeout"}
eof {fail "cmd_parse13: unexpected EOF"}
}
-wait;close
+wait;catch {close}
spawn sh -c "stap -v -v --vp 01020 -h 2>&1"
expect {