diff options
author | Dave Brolley <brolley@redhat.com> | 2010-01-07 14:00:49 -0500 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2010-01-07 14:00:49 -0500 |
commit | af7b183c32c627b1934e9be2d028d7c4ff1a1d2e (patch) | |
tree | a1670ad0f02f3ebb47ef2aca648ff7d6afc4e5db /testsuite/systemtap.context | |
parent | a0626e2e2ea13b6fc974157fb71fe6d48f4c7ec0 (diff) | |
parent | 4bd4d40e19f7ba203d5e380965210181648f560a (diff) | |
download | systemtap-steved-af7b183c32c627b1934e9be2d028d7c4ff1a1d2e.tar.gz systemtap-steved-af7b183c32c627b1934e9be2d028d7c4ff1a1d2e.tar.xz systemtap-steved-af7b183c32c627b1934e9be2d028d7c4ff1a1d2e.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.context')
-rw-r--r-- | testsuite/systemtap.context/fib.exp | 14 | ||||
-rw-r--r-- | testsuite/systemtap.context/fib.stp | 3 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/systemtap.context/fib.exp b/testsuite/systemtap.context/fib.exp index cc4d75a1..5026e5d0 100644 --- a/testsuite/systemtap.context/fib.exp +++ b/testsuite/systemtap.context/fib.exp @@ -35,3 +35,17 @@ expect { } wait if {$fibcalls == 18 && $maincalls == 2} { pass "$test ($fibcalls $maincalls)" } { fail "$test ($fibcalls $maincalls)" } + +spawn stap -c "$testexe 10" -- $teststp --entry +set fibcalls 0 +set maincalls 0 +expect { + -timeout 120 + -re {^fib[^\r\n]*[\r\n]} { incr fibcalls; exp_continue } + -re {^main[^\r\n]*[\r\n]} { incr maincalls; exp_continue } + -re {^[^\r\n]*[\r\n]} {exp_continue} + timeout { fail "$test (timeout)" } + eof { } +} +wait +if {$fibcalls == 55 && $maincalls == 10} { pass "$test ($fibcalls $maincalls)" } { fail "$test ($fibcalls $maincalls)" } diff --git a/testsuite/systemtap.context/fib.stp b/testsuite/systemtap.context/fib.stp index 85c2fc1d..fe2415f5 100644 --- a/testsuite/systemtap.context/fib.stp +++ b/testsuite/systemtap.context/fib.stp @@ -5,13 +5,16 @@ probe process("fib").function("fib").call { depth++ if (depth > max_depth) { max_depth = depth + %( $# > 0 %? print_ubacktrace_brief(); printf("\n") %) } } probe process("fib").function("fib").return { + %( $# == 0 %? if (depth == max_depth) { print_ubacktrace_brief() printf("\n") } + %) depth-- } |