summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base
diff options
context:
space:
mode:
authorfche <fche>2007-09-21 18:03:28 +0000
committerfche <fche>2007-09-21 18:03:28 +0000
commit739a3e814f64578666c4d2e25a2bab2b771a8559 (patch)
tree2e9c5913775866a3dbddd4cb954c06f5a678a256 /testsuite/systemtap.base
parent5d1374bb3ac11d922f22d4904b43242a1a6eb94f (diff)
downloadsystemtap-steved-739a3e814f64578666c4d2e25a2bab2b771a8559.tar.gz
systemtap-steved-739a3e814f64578666c4d2e25a2bab2b771a8559.tar.xz
systemtap-steved-739a3e814f64578666c4d2e25a2bab2b771a8559.zip
rhbz 300121: optimization bug
Diffstat (limited to 'testsuite/systemtap.base')
-rw-r--r--testsuite/systemtap.base/optim.exp3
-rw-r--r--testsuite/systemtap.base/optim.stp5
2 files changed, 7 insertions, 1 deletions
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 ()
}