diff options
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r-- | testsuite/systemtap.base/optim.exp | 14 | ||||
-rw-r--r-- | testsuite/systemtap.base/optim.stp | 9 |
2 files changed, 15 insertions, 8 deletions
diff --git a/testsuite/systemtap.base/optim.exp b/testsuite/systemtap.base/optim.exp index 7241aeaf..41e22d7a 100644 --- a/testsuite/systemtap.base/optim.exp +++ b/testsuite/systemtap.base/optim.exp @@ -1,3 +1,13 @@ set test "optim" - -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string +if {![installtest_p]} { untested $test; return } +spawn stap $srcdir/$subdir/optim.stp +set ok 0 +expect { + -timeout 30 + -re {i=1} { incr ok } + timeout { fail "$test (timeout)" } + eof { } +} +close +wait +if {$ok == 1} { pass $test } { fail $test } diff --git a/testsuite/systemtap.base/optim.stp b/testsuite/systemtap.base/optim.stp index 711bc31b..6ca722a6 100644 --- a/testsuite/systemtap.base/optim.stp +++ b/testsuite/systemtap.base/optim.stp @@ -3,10 +3,7 @@ function func(i) { array[i++] = 0; return i; } -probe begin(1) { - if (func(0) == 1) log ("systemtap test success") - exit() +probe begin { + printf ("i=%d\n", func(0)) + exit () } - -probe begin { log("systemtap starting probe") } -probe end { log("systemtap ending probe") } |