diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | testsuite/systemtap.base/optim.exp | 3 | ||||
-rw-r--r-- | testsuite/systemtap.base/optim.stp | 5 |
3 files changed, 11 insertions, 1 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 6f523a83..ec9c74aa 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-09-21 Frank Ch. Eigler <fche@elastic.org> + + * systemtap.base/optim.exp/stp: New test for rhbz# 300121. + 2007-09-18 David Smith <dsmith@redhat.com> * systemtap.base/procfs.exp: New test case. diff --git a/testsuite/systemtap.base/optim.exp b/testsuite/systemtap.base/optim.exp index 23735af6..a2bfd3ab 100644 --- a/testsuite/systemtap.base/optim.exp +++ b/testsuite/systemtap.base/optim.exp @@ -5,9 +5,10 @@ set ok 0 expect { -timeout 120 -re {i=1} { incr ok } + -re {j=2} { incr ok } timeout { fail "$test (timeout)" } eof { } } close wait -if {$ok == 1} { pass $test } { fail $test } +if {$ok == 2} { pass $test } { fail $test } diff --git a/testsuite/systemtap.base/optim.stp b/testsuite/systemtap.base/optim.stp index 6ca722a6..915a65da 100644 --- a/testsuite/systemtap.base/optim.stp +++ b/testsuite/systemtap.base/optim.stp @@ -3,7 +3,12 @@ function func(i) { array[i++] = 0; return i; } +function bart() { # rhbz# 300121 + if (1) var=2 else dummy=0 + return var +} probe begin { printf ("i=%d\n", func(0)) + printf ("j=%d\n", bart()) exit () } |