diff options
author | guanglei <guanglei> | 2006-11-29 07:12:53 +0000 |
---|---|---|
committer | guanglei <guanglei> | 2006-11-29 07:12:53 +0000 |
commit | 5c0c915ff50a77cd09815c261ad5f06fed754c0a (patch) | |
tree | 6af20b38fcae01952314c5f2d18cb0f33ecd68f7 /testsuite/systemtap.samples | |
parent | 7e6c246cb403ffa693ae541d31593d3451360a51 (diff) | |
download | systemtap-steved-5c0c915ff50a77cd09815c261ad5f06fed754c0a.tar.gz systemtap-steved-5c0c915ff50a77cd09815c261ad5f06fed754c0a.tar.xz systemtap-steved-5c0c915ff50a77cd09815c261ad5f06fed754c0a.zip |
bugfix for lket testcase.
new testcase of whitelist for safe probes
Diffstat (limited to 'testsuite/systemtap.samples')
-rw-r--r-- | testsuite/systemtap.samples/lket.exp | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/testsuite/systemtap.samples/lket.exp b/testsuite/systemtap.samples/lket.exp index 1de0eb00..10ca7a28 100644 --- a/testsuite/systemtap.samples/lket.exp +++ b/testsuite/systemtap.samples/lket.exp @@ -1,12 +1,16 @@ # Test the basic functionality of LKET tapset and lket-b2a utility -set test "lket" -if {![installtest_p]} { untested $test; return } +proc cleanfiles {} { + catch {exec /bin/sh -c "rm -f stpd_cpu* lket.out"} +} + +set test "$subdir\/lket" +if {[info procs installtest_p]!="" && ![installtest_p]} {untested $test; return} -eval spawn stap -v -bM $srcdir/$subdir/lket.stp +eval spawn stap -v -DMAXSKIPPED=100000 -bM $srcdir/$subdir/lket.stp set failed 1 +set timeout 180 expect { - -timeout 150 -re {^Pass\ ([1234]):\ [^\r]*\r\n} { set detail "pass$expect_out(1,string)"; exp_continue @@ -22,12 +26,12 @@ expect { timeout {set detail "stap timeout"; send "\003" } } -if {$failed} { fail "$test\($detail\)"; return} +if {$failed} { fail "$test\($detail\)"; cleanfiles; return} set failed [catch {exec /bin/sh -c "lket-b2a -f stpd_cpu*"}] if { $failed || ![file readable "lket.out"] } { - fail "$test\(lket-b2a runtime\)"; return + fail "$test\(lket-b2a runtime\)"; cleanfiles; return } eval {spawn head -n 10 "lket.out"} @@ -41,5 +45,5 @@ if {$failed} { pass "$test\($failed\)"; } -catch {exec rm -f stpd_cpu* lket.out} +cleanfiles return |