diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/ChangeLog | 11 | ||||
-rwxr-xr-x | testsuite/semok/optimize.stp | 1 | ||||
-rw-r--r-- | testsuite/systemtap.base/global_end.exp | 12 | ||||
-rw-r--r-- | testsuite/systemtap.base/global_end.stp | 11 | ||||
-rw-r--r-- | testsuite/systemtap.base/utrace_p5.exp | 27 |
5 files changed, 55 insertions, 7 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index e6649a36..26573fcb 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2008-09-01 Stan Cox <scox@redhat.com> + + * systemtap.base/global_end.stp: Also check statistics. + * systemtap.base/global_end.exp: Likewise. + +2008-08-29 David Smith <dsmith@redhat.com> + + PR6841 + * systemtap.base/utrace_p5.exp: Added system-wide syscall test for + bug 6841 fix. + 2008-08-27 Stan Cox <scox@redhat.com> * systemtap.base/global_end.exp: New. diff --git a/testsuite/semok/optimize.stp b/testsuite/semok/optimize.stp index a728bd66..621bd1ca 100755 --- a/testsuite/semok/optimize.stp +++ b/testsuite/semok/optimize.stp @@ -10,7 +10,6 @@ function zoo (x) { } probe begin { - b <<< "hello" a = b + 2 zoo (zoo (5)) b = "goodbye" diff --git a/testsuite/systemtap.base/global_end.exp b/testsuite/systemtap.base/global_end.exp index b1931a90..d066cf9d 100644 --- a/testsuite/systemtap.base/global_end.exp +++ b/testsuite/systemtap.base/global_end.exp @@ -9,15 +9,17 @@ set ok 0 expect { -timeout 180 -re {one,0x1.*one,0x2.*two,0x1.*two,0x2} { incr ok; exp_continue } - -re {alpha."one"..1.=0x1} { incr ok; exp_continue } - -re {alpha."one"..2.=0x2} { incr ok; exp_continue } - -re {alpha."two"..1.=0x3} { incr ok; exp_continue } - -re {alpha."two"..2.=0x4} { incr ok; exp_continue } + -re {alpha."one".1.=0x1} { incr ok; exp_continue } + -re {alpha."one".2.=0x2} { incr ok; exp_continue } + -re {alpha."two".1.=0x3} { incr ok; exp_continue } + -re {alpha."two".2.=0x4} { incr ok; exp_continue } -re {gamma="abcdefghijklmnopqrstuvwxyz"} { incr ok; exp_continue } -re {iota."one".="eleven"} { incr ok; exp_continue } -re {iota."two".="twelve"} { incr ok; exp_continue } + -re {epsilon."one",1. @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue } + -re {epsilon."two",2. @count=0x4 @min=0xa @max=0x28 @sum=0x64 @avg=0x19} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } wait -if {$ok == 8} { pass "$test ($ok)" } { fail "$test ($ok)" } +if {$ok == 10} { pass "$test ($ok)" } { fail "$test ($ok)" } diff --git a/testsuite/systemtap.base/global_end.stp b/testsuite/systemtap.base/global_end.stp index e9a1eb8f..b26b7c03 100644 --- a/testsuite/systemtap.base/global_end.stp +++ b/testsuite/systemtap.base/global_end.stp @@ -1,4 +1,4 @@ -global alpha, beta, gamma, iota +global alpha, beta, gamma, iota, epsilon probe begin { gamma = "abcdefghijklmnopqrstuvwxyz" @@ -15,6 +15,15 @@ probe begin { beta["one",2] = 2 beta["two",1] = 3 beta["two",2] = 4 + + epsilon["one",1] <<< 1 + epsilon["one",1] <<< 2 + epsilon["one",1] <<< 3 + epsilon["one",1] <<< 4 + epsilon["two",2] <<< 10 + epsilon["two",2] <<< 20 + epsilon["two",2] <<< 30 + epsilon["two",2] <<< 40 } probe timer.ms(2000) { diff --git a/testsuite/systemtap.base/utrace_p5.exp b/testsuite/systemtap.base/utrace_p5.exp index fcd617fe..33281350 100644 --- a/testsuite/systemtap.base/utrace_p5.exp +++ b/testsuite/systemtap.base/utrace_p5.exp @@ -73,6 +73,23 @@ set thread_end_script { } set thread_end_script_output "thread_ends = \\d+\r\n" +# Script that tests the bug 6841 fix. +set bz6841_script { + global proc,name + probe begin { printf("systemtap starting probe\n") } + probe process.syscall { + proc[pid()] <<< 1 + name[pid()] = execname() + } + probe end { printf("systemtap ending probe\n") + foreach(p+ in proc) { + printf("%s(%d) issues syscall %d times\n", + name[p], p, @sum(proc[p])) + } + } +} +set bz6841_script_output ".+ issues syscall \\d+ times\r\n" + # Try to find utrace_attach symbol in /proc/kallsyms set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { @@ -182,5 +199,15 @@ if {$utrace_support_found == 0} { -e $script } +set TEST_NAME "UTRACE_P5_07" +if {$utrace_support_found == 0} { + untested "$TEST_NAME : no kernel utrace support found" +} elseif {![installtest_p]} { + untested "$TEST_NAME" +} else { + stap_run $TEST_NAME run_utrace_p5_multi $bz6841_script_output \ + -e $bz6841_script +} + # Cleanup exec rm -f $exepath $multi_exepath |