summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/ChangeLog5
-rw-r--r--testsuite/systemtap.base/optim.exp14
-rw-r--r--testsuite/systemtap.base/optim.stp9
3 files changed, 20 insertions, 8 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 9031fb14..35d660c0 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-04 Frank Ch. Eigler <fche@elastic.org>
+
+ PR 4589.
+ * systemtap.base/optim.*: Rewritten, simplified.
+
2007-05-30 Frank Ch. Eigler <fche@redhat.com>
PR 4567.
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") }