diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/utrace_p4.exp | 27 | ||||
-rw-r--r-- | testsuite/systemtap.base/utrace_p5.exp | 50 |
3 files changed, 38 insertions, 44 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index e041a934..0c414115 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-06 David Smith <dsmith@redhat.com> + + * systemtap.base/utrace_p4.exp: Updated for utrace probe changes. + * systemtap.base/utrace_p5.exp: Ditto. + 2008-06-03 Frank Ch. Eigler <fche@elastic.org> * systemtap.context/backtrace.tcl: Tolerate "(inexact)" backtraces. diff --git a/testsuite/systemtap.base/utrace_p4.exp b/testsuite/systemtap.base/utrace_p4.exp index eb6ea685..5544ee55 100644 --- a/testsuite/systemtap.base/utrace_p4.exp +++ b/testsuite/systemtap.base/utrace_p4.exp @@ -49,11 +49,12 @@ proc stap_compile { TEST_NAME compile script args } { # Initialize variables set utrace_support_found 0 -set clone_script {"probe process(\"/bin/ls\").clone { print(\"ls clone\") }"} -set death_script {"probe process(\"/bin/ls\").death { print(\"ls death\") }"} +set begin_script {"probe process(\"/bin/ls\").begin { print(\"ls begin\") }"} +set end_script {"probe process(\"/bin/ls\").end { print(\"ls end\") }"} set syscall_script {"probe process(\"/bin/ls\").syscall { printf(\"|%d\", \$syscall) }"} set syscall_return_script {"probe process(\"/bin/ls\").syscall.return { printf(\"|%d\", \$syscall) }"} -set exec_script {"probe process(\"/bin/ls\").exec { print(\"ls exec\") }"} +set thread_begin_script {"probe process(\"/bin/ls\").thread.begin { print(\"ls thread.begin\") }"} +set thread_end_script {"probe process(\"/bin/ls\").thread.end { print(\"ls thread.end\") }"} # Try to find utrace_attach symbol in /proc/kallsyms set path "/proc/kallsyms" @@ -69,16 +70,16 @@ set TEST_NAME "UTRACE_P4_01" if {$utrace_support_found == 0} { untested "$TEST_NAME : no kernel utrace support found" } else { - # Try compiling a clone script - stap_compile $TEST_NAME 1 $clone_script + # Try compiling a begin script + stap_compile $TEST_NAME 1 $begin_script } set TEST_NAME "UTRACE_P4_02" if {$utrace_support_found == 0} { untested "$TEST_NAME : no kernel utrace support found" } else { - # Try compiling a death script - stap_compile $TEST_NAME 1 $death_script + # Try compiling a end script + stap_compile $TEST_NAME 1 $end_script } set TEST_NAME "UTRACE_P4_03" @@ -101,6 +102,14 @@ set TEST_NAME "UTRACE_P4_05" if {$utrace_support_found == 0} { untested "$TEST_NAME : no kernel utrace support found" } else { - # Try compiling an exec script - stap_compile $TEST_NAME 1 $exec_script + # Try compiling an thread.begin script + stap_compile $TEST_NAME 1 $thread_begin_script +} + +set TEST_NAME "UTRACE_P4_06" +if {$utrace_support_found == 0} { + untested "$TEST_NAME : no kernel utrace support found" +} else { + # Try compiling an thread.end script + stap_compile $TEST_NAME 1 $thread_end_script } diff --git a/testsuite/systemtap.base/utrace_p5.exp b/testsuite/systemtap.base/utrace_p5.exp index cbb867d1..46e3181b 100644 --- a/testsuite/systemtap.base/utrace_p5.exp +++ b/testsuite/systemtap.base/utrace_p5.exp @@ -4,23 +4,23 @@ set utrace_support_found 0 set exepath "[pwd]/cat_[pid]" -set death_script { - global death_probes_fired = 0 +set end_script { + global end_probes_fired = 0 probe begin { printf("systemtap starting probe\n") } - probe process("%s").death { death_probes_fired++ } + probe process("%s").end { end_probes_fired++ } probe end { printf("systemtap ending probe\n") - printf("deaths = %%d\n", death_probes_fired) } + printf("end probes = %%d\n", end_probes_fired) } } -set death_script_output "deaths = 1\r\n" +set end_script_output "end probes = 1\r\n" -set exec_script { - global exec_probes_fired = 0 +set begin_script { + global begin_probes_fired = 0 probe begin { printf("systemtap starting probe\n") } - probe process("%s").exec { exec_probes_fired++ } + probe process("%s").begin { begin_probes_fired++ } probe end { printf("systemtap ending probe\n") - printf("execs = %%d\n", exec_probes_fired) } + printf("begin probes = %%d\n", begin_probes_fired) } } -set exec_script_output "execs = 1\r\n" +set begin_script_output "begin probes = 1\r\n" set syscall_script { global syscall_probes_fired = 0 @@ -46,18 +46,6 @@ set syscall_return_script { } set syscall_return_script_output "syscall_returns = \\d+\r\n" -set clone_script { - global clone_probes_fired = 0 - probe begin { printf("systemtap starting probe\n") } - probe process(%d).clone { clone_probes_fired++ } - probe end { printf("systemtap ending probe\n") - if (clone_probes_fired > 0) { - printf("clones = %%d\n", clone_probes_fired) - } - } -} -set clone_script_output "clones = \\d+\r\n" - # Try to find utrace_attach symbol in /proc/kallsyms set path "/proc/kallsyms" if {! [catch {exec grep -q utrace_attach $path} dummy]} { @@ -92,8 +80,8 @@ if {$utrace_support_found == 0} { } elseif {![installtest_p]} { untested "$TEST_NAME" } else { - set script [format $death_script $exepath] - stap_run $TEST_NAME run_cat_5_sec $death_script_output -e $script + set script [format $end_script $exepath] + stap_run $TEST_NAME run_cat_5_sec $end_script_output -e $script } set TEST_NAME "UTRACE_P5_02" @@ -102,8 +90,8 @@ if {$utrace_support_found == 0} { } elseif {![installtest_p]} { untested "$TEST_NAME" } else { - set script [format $exec_script $exepath] - stap_run $TEST_NAME run_cat_5_sec $exec_script_output -e $script + set script [format $begin_script $exepath] + stap_run $TEST_NAME run_cat_5_sec $begin_script_output -e $script } set TEST_NAME "UTRACE_P5_03" @@ -126,15 +114,7 @@ if {$utrace_support_found == 0} { stap_run $TEST_NAME run_cat_5_sec $syscall_return_script_output -e $script } -set TEST_NAME "UTRACE_P5_05" -if {$utrace_support_found == 0} { - untested "$TEST_NAME : no kernel utrace support found" -} elseif {![installtest_p]} { - untested "$TEST_NAME" -} else { - set script [format $clone_script [pid]] - stap_run $TEST_NAME run_cat_5_sec $clone_script_output -e $script -} +# We need thread.begin and thread.end tests! # Cleanup exec rm -f $exepath |