diff options
author | Dave Brolley <brolley@redhat.com> | 2009-09-14 17:47:26 -0400 |
---|---|---|
committer | Dave Brolley <brolley@redhat.com> | 2009-09-14 17:47:26 -0400 |
commit | 9df741675d7e36008869dfff46ccc602875dc091 (patch) | |
tree | 1deafeacb302f9154586708ada7a240470aa6b4a /testsuite | |
parent | b232fab3a271c4c787462295d7ffbeca750c1092 (diff) | |
parent | 775c3771bb4a5f663a763d7c65b1571e24e4b212 (diff) | |
download | systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.gz systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.tar.xz systemtap-steved-9df741675d7e36008869dfff46ccc602875dc091.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Conflicts:
aclocal.m4
configure
doc/SystemTap_Tapset_Reference/Makefile.in
testsuite/aclocal.m4
testsuite/configure
Diffstat (limited to 'testsuite')
67 files changed, 446 insertions, 111 deletions
diff --git a/testsuite/buildok/ipmib-all-probes.stp b/testsuite/buildok/ipmib-all-probes.stp index b6bedcf7..b6bedcf7 100644..100755 --- a/testsuite/buildok/ipmib-all-probes.stp +++ b/testsuite/buildok/ipmib-all-probes.stp diff --git a/testsuite/buildok/linuxmib-all-probes.stp b/testsuite/buildok/linuxmib-all-probes.stp index c79fc7d3..c79fc7d3 100644..100755 --- a/testsuite/buildok/linuxmib-all-probes.stp +++ b/testsuite/buildok/linuxmib-all-probes.stp diff --git a/testsuite/buildok/tcpmib-all-probes.stp b/testsuite/buildok/tcpmib-all-probes.stp index f20ba8bb..f20ba8bb 100644..100755 --- a/testsuite/buildok/tcpmib-all-probes.stp +++ b/testsuite/buildok/tcpmib-all-probes.stp diff --git a/testsuite/semko/nodwf07.stp b/testsuite/semko/nodwf07.stp index 4a2cf4a5..b48562f9 100755 --- a/testsuite/semko/nodwf07.stp +++ b/testsuite/semko/nodwf07.stp @@ -12,4 +12,4 @@ probe kernel.function("*") { probe timer.sec(15) { exit() } -' +' >/dev/null diff --git a/testsuite/semok/bz10475.stp b/testsuite/semok/bz10475.stp index ee79b07d..160263a5 100755 --- a/testsuite/semok/bz10475.stp +++ b/testsuite/semok/bz10475.stp @@ -1,10 +1,9 @@ #! stap -p2 // bz10475: pointer-array confused about array element size -// struct file *do_filp_open(int dfd, const char *pathname, -// int open_flag, int mode, int acc_mode) -probe kernel.function("do_filp_open") +// struct file *filp_open(int dfd, const char *filename, int flags, int mode) +probe kernel.function("filp_open") { // check array access on a "complex" pointer type - println($pathname[0]) + println($filename[0]) } diff --git a/testsuite/systemtap.base/sdt_misc.exp b/testsuite/systemtap.base/sdt_misc.exp index 27f148d0..096ea126 100644 --- a/testsuite/systemtap.base/sdt_misc.exp +++ b/testsuite/systemtap.base/sdt_misc.exp @@ -1,10 +1,11 @@ -set test "static_user_markers" +set test "sdt_misc" # Test miscellaneous features of .mark probes # Compile a C program to use as the user-space probing target set sup_srcpath "[pwd]/static_user_markers.c" set sup_exepath "[pwd]/static_user_markers.x" +set sup_sopath "[pwd]/libsdt.so" set supcplus_exepath "[pwd]/static_user_markers_cplus.x" set fp [open $sup_srcpath "w"] puts $fp " @@ -44,6 +45,7 @@ buz (int parm) DTRACE_PROBE1(static_user_markers,test_probe_4,&bstruct); } +#ifndef NO_MAIN int main () { @@ -51,6 +53,7 @@ main () baz(3,(char*)\"abc\"); buz(4); } +#endif " close $fp @@ -217,6 +220,56 @@ if { $ok != 0} { pass "$test types $pbtype_mssg" } +# Test probe in shared object + +set sup_srcmainpath "[pwd]/static_user_markers_.c" +set fp [open $sup_srcmainpath "w"] +puts $fp " +int +main () +{ + bar(2); + baz(3,(char*)\"abc\"); + buz(4); +} +" +close $fp + +set sup_flags "$sup_flags additional_flags=-shared" +set sup_flags "$sup_flags additional_flags=-fPIC" +set sup_flags "$sup_flags additional_flags=-DNO_MAIN" +set res0 [target_compile $sup_srcpath $sup_sopath executable $sup_flags ] +set sup0_flags "additional_flags=-g additional_flags=-Wl,-rpath,[pwd]" +set sup0_flags "$sup0_flags additional_flags=-L[pwd] additional_flags=-lsdt" +set res [target_compile $sup_srcmainpath $sup_exepath executable $sup0_flags ] +if { $res0 != "" || $res != "" } { + verbose "target_compile failed: $res0 $res" 2 + fail "$test compiling -g -shared $pbtype_mssg" + if { $verbose == 0 } { + catch {exec rm -f $sup_srcpath $sup_srcmainpath} + } + return +} else { + pass "$test compiling -g -shared $pbtype_mssg" +} + +verbose -log "stap -c $sup_exepath -e probe process(\"$sup_sopath\").mark(\"test_probe_2\") {printf(\"In %s probe %#x\\n\", \$\$name, \$arg1)}" +spawn stap -c $sup_exepath -e "probe process(\"$sup_sopath\").mark(\"test_probe_2\") {printf(\"In %s probe %#x\\n\", \$\$name, \$arg1)}" +expect { + -timeout 180 + -re {In test_probe_2 probe 0x2} { incr ok; exp_continue } + timeout { fail "$test (timeout)" } + eof { } +} + +wait + +if {$ok == 2} { + pass "$test shared $pbtype_mssg" +} else { + fail "$test shared ($ok) $pbtype_mssg" +} + # Test .mark probe wildcard matching set ok 0 @@ -238,6 +291,5 @@ if { $ok == 45 } { } if { $verbose == 0 } { -catch {exec rm -f $sup_srcpath $sup_exepath $supcplus_exepath $sup_dpath $sup_hpath $sup_stppath sdt_types.x} +catch {exec rm -f $sup_srcpath $sup_exepath $sup_sopath $supcplus_exepath $sup_dpath $sup_hpath $sup_opath $sup_stppath $sdt_types.x $sup_srcmainpath} } - diff --git a/testsuite/systemtap.base/tracepoints.exp b/testsuite/systemtap.base/tracepoints.exp index a4e38c05..b9014208 100644 --- a/testsuite/systemtap.base/tracepoints.exp +++ b/testsuite/systemtap.base/tracepoints.exp @@ -2,6 +2,7 @@ set tracepoints {} spawn stap -l {kernel.trace("*")} expect { + -timeout 60 -re {^kernel.trace[^\r\n]*\r\n} { append tracepoints $expect_out(0,string) exp_continue @@ -11,13 +12,26 @@ expect { } catch {close}; catch { wait } +# Use this to test each tracepoint individually. +#foreach tp $tracepoints { +# set test "tracepoint $tp -p4" +# if {[catch {exec stap -w -p4 -e "probe $tp { println($\$name, $\$vars) }"} res]} { +# fail "$test $res" +# } else { +# pass "$test" +# } +#} + +# This tests all tracepoints all at once (much faster than the above) +set script "probe begin {}" foreach tp $tracepoints { - set test "tracepoint $tp -p4" - if {[catch {exec stap -w -p4 -e "probe $tp { println($\$name, $\$vars) }"} res]} { - fail "$test $res" - } else { - pass "$test" - } + set script "$script probe $tp { println($\$name, $\$vars) }" +} +send_log "Trying stap -w -p4 -e $script\n" +if {[catch {exec stap -w -p4 -e "$script"} res]} { + fail "tracepoints $res" +} else { + pass "tracepoints" } set test "tracepoints" diff --git a/testsuite/systemtap.base/utrace_syscall_args.exp b/testsuite/systemtap.base/utrace_syscall_args.exp index 98bc457e..e3c90191 100644 --- a/testsuite/systemtap.base/utrace_syscall_args.exp +++ b/testsuite/systemtap.base/utrace_syscall_args.exp @@ -37,7 +37,8 @@ if {$do_64_bit_pass} { set res [target_compile $srcpath $exepath executable $flags] if { $res != "" } { verbose "target_compile for $exepath failed: $res" 2 - fail "$testname: unable to compile $srcpath" + send_log "$testname: unable to compile $srcpath\n" + untested $testname return } @@ -72,7 +73,8 @@ if {$do_32_bit_pass} { set res [target_compile $srcpath $exepath executable $flags] if { $res != "" } { verbose "target_compile for $exepath failed: $res" 2 - fail "$testname: unable to compile $srcpath" + send_log "$testname: unable to compile $srcpath\n" + untested $testname return } diff --git a/testsuite/systemtap.examples/check.exp b/testsuite/systemtap.examples/check.exp index 482738cc..0fad597d 100644 --- a/testsuite/systemtap.examples/check.exp +++ b/testsuite/systemtap.examples/check.exp @@ -32,7 +32,7 @@ proc extract_tag { META_DATA TAG } { return $value } -proc run_command { test command } { +proc run_command { test action command } { #FIXME tcl says that single quotes not dealt with if { $command != "" } then { verbose -log "attempting command $command" @@ -42,13 +42,16 @@ proc run_command { test command } { set res [catch {eval exec "$command |& cat"} value] verbose -log "OUT $value" verbose -log "RC $res" - if {$res != 0 } { - fail $test + if { $res != 0 } { # allow failure for support + if { $action != "support" } { fail "$test $action" } + return $res } else { - pass $test + pass "$test $action" + return $res } } else { - untested $test + untested "$test $action" + return 0 } } @@ -64,16 +67,33 @@ foreach file $meta_files { cd $dir set meta_data [get_meta_data $file] - set test_check [extract_tag "$meta_data" "test_check"] - set command $test_check - run_command "$test build" $command + set test_support [extract_tag "$meta_data" "test_support"] + set command $test_support + set supported_p 1 + if { $command != "" } { # need to test support + set res [run_command "$test" "support" $command] + if { $res != 0 } { set supported_p 0 } + } + + if { $supported_p == 1 } { + set test_check [extract_tag "$meta_data" "test_check"] + set command $test_check + run_command "$test" "build" $command + } else { + untested "$test build" + } + set test_installcheck [extract_tag "$meta_data" "test_installcheck"] # The pass/fail logic too simple and fails for some examples # FIXME would like to be able to run more complicated test code if {[info procs installtest_p] != "" && [installtest_p] && $test_installcheck != "" } then { - set command $test_installcheck - run_command "$test run" $command + if { $supported_p == 1 } { + set command $test_installcheck + run_command "$test" "run" $command + } else { + untested "$test run" + } } } diff --git a/testsuite/systemtap.examples/general/graphs.meta b/testsuite/systemtap.examples/general/graphs.meta index 60a522b3..273162e8 100644 --- a/testsuite/systemtap.examples/general/graphs.meta +++ b/testsuite/systemtap.examples/general/graphs.meta @@ -10,4 +10,4 @@ output: plot data scope: system-wide description: The script tracks the disk and CPU utilization. The resulting output of the script can be piped into gnuplot to generate a graph of disk and CPU USE. test_check: stap -p4 graphs.stp -test_installcheck: stap graphs.stp -c "sleep 1" +test_installcheck: stap graphs.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/index.html b/testsuite/systemtap.examples/index.html index 664bf420..b079f5b8 100644 --- a/testsuite/systemtap.examples/index.html +++ b/testsuite/systemtap.examples/index.html @@ -67,6 +67,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC <li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> +<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> +<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> <li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> diff --git a/testsuite/systemtap.examples/index.txt b/testsuite/systemtap.examples/index.txt index ce481d3b..376c545e 100644 --- a/testsuite/systemtap.examples/index.txt +++ b/testsuite/systemtap.examples/index.txt @@ -81,6 +81,14 @@ keywords: io line. +io/iostat-scsi.stp - iostat for SCSI Devices +keywords: io profiling scsi + + The iostat-scsi.stp script provides a breakdown of the number of blks + read and written on the various machines's SCSI devices. The script + takes one argument which is the number of seconds between reports. + + io/iostats.stp - List Executables Reading and Writing the Most Data keywords: io profiling diff --git a/testsuite/systemtap.examples/interrupt/scf.meta b/testsuite/systemtap.examples/interrupt/scf.meta index 1d6ec3d8..9ea5aafe 100644 --- a/testsuite/systemtap.examples/interrupt/scf.meta +++ b/testsuite/systemtap.examples/interrupt/scf.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The Linux kernel function smp_call_function causes expensive inter-processor interrupts (IPIs). The scf.stp script tallies the processes and backtraces causing the interprocessor interrupts to identify the cause of the expensive IPI. On exit the script prints the tallies in descending frequency. test_check: stap -p4 scf.stp -test_installcheck: stap scf.stp -c "sleep 1" +test_installcheck: stap scf.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/disktop.meta b/testsuite/systemtap.examples/io/disktop.meta index b063075b..1d0ce04b 100644 --- a/testsuite/systemtap.examples/io/disktop.meta +++ b/testsuite/systemtap.examples/io/disktop.meta @@ -10,4 +10,4 @@ output: timed scope: system-wide description: Get the status of reading/writing disk every 5 seconds, output top ten entries during that period. test_check: stap -p4 disktop.stp -test_installcheck: stap disktop.stp -c "sleep 1" +test_installcheck: stap disktop.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/io_submit.meta b/testsuite/systemtap.examples/io/io_submit.meta index 911cb837..7bbc33a1 100644 --- a/testsuite/systemtap.examples/io/io_submit.meta +++ b/testsuite/systemtap.examples/io/io_submit.meta @@ -10,4 +10,4 @@ output: sorted on-exit scope: system-wide description: When a reschedule occurs during an AIO io_submit call, accumulate the traceback in a histogram. When the script exits prints out a sorted list from most common to least common backtrace. test_check: stap -p4 io_submit.stp -test_installcheck: stap io_submit.stp -c "sleep 1" +test_installcheck: stap io_submit.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/ioblktime.meta b/testsuite/systemtap.examples/io/ioblktime.meta index 18a8b168..09425b29 100644 --- a/testsuite/systemtap.examples/io/ioblktime.meta +++ b/testsuite/systemtap.examples/io/ioblktime.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line. test_check: stap -p4 ioblktime.stp -test_installcheck: stap ioblktime.stp -c "sleep 1" +test_installcheck: stap ioblktime.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/iostat-scsi.meta b/testsuite/systemtap.examples/io/iostat-scsi.meta new file mode 100644 index 00000000..a992bd51 --- /dev/null +++ b/testsuite/systemtap.examples/io/iostat-scsi.meta @@ -0,0 +1,14 @@ +title: iostat for SCSI Devices +name: iostat-scsi.stp +version: 1.0 +author: anonymous +keywords: io profiling scsi +subsystem: io +status: production +exit: user-controlled +output: timed +scope: system-wide +description: The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports. +test_support: stap -l module("st").function("st_do_scsi")!,kernel.function("st_do_scsi") +test_check: stap -g -p4 iostat-scsi.stp 1 +test_installcheck: stap -g iostat-scsi.stp 1 -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/iostat-scsi.stp b/testsuite/systemtap.examples/io/iostat-scsi.stp index 15833af8..f6715a42 100755 --- a/testsuite/systemtap.examples/io/iostat-scsi.stp +++ b/testsuite/systemtap.examples/io/iostat-scsi.stp @@ -19,20 +19,29 @@ probe module("sd_mod").function("sd_init_command") !, kernel.function("sd_init_c reads[device] <<< nr_sectors * sector_size } %: + +function get_sector_size:long (data:long) { + return @cast(data, "scsi_device", "kernel<scsi/scsi_device.h>")->sector_size +} + +%(kernel_v>="2.6.31" %? %{ -#include <scsi/scsi_device.h> +#include <linux/blkdev.h> %} -function get_sector_size:long (data:long) %{ /* pure */ - struct scsi_device *sdp = (struct scsi_device *)((long)THIS->data); - THIS->__retvalue = kread(&(sdp->sector_size)); - CATCH_DEREF_FAULT(); +function get_nr_sectors:long(rq:long) %{ /* pure */ + THIS->__retvalue = blk_rq_sectors((const struct request *)(long)THIS->rq); %} +%) probe module("sd_mod").function("sd_prep_fn") !, kernel.function("sd_prep_fn") { device=kernel_string($rq->rq_disk->disk_name) sector_size=get_sector_size($q->queuedata) +%(kernel_v>="2.6.31" %? + nr_sectors=get_nr_sectors($rq) +%: nr_sectors=$rq->nr_sectors +%) devices[device] = 1 if ($rq->cmd_flags & 1) writes[device] <<< nr_sectors * sector_size diff --git a/testsuite/systemtap.examples/io/iostats.meta b/testsuite/systemtap.examples/io/iostats.meta index a74c9fe4..2f0a2c50 100644 --- a/testsuite/systemtap.examples/io/iostats.meta +++ b/testsuite/systemtap.examples/io/iostats.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written. test_check: stap -p4 iostats.stp -test_installcheck: stap iostats.stp -c "sleep 1" +test_installcheck: stap iostats.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/iotime.meta b/testsuite/systemtap.examples/io/iotime.meta index f656ff85..cde49974 100644 --- a/testsuite/systemtap.examples/io/iotime.meta +++ b/testsuite/systemtap.examples/io/iotime.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The script watches each open, close, read, and write syscalls on the system. For each file the scripts observes opened it accumulates the amount of wall clock time spend in read and write operations and the number of bytes read and written. When a file is closed the script prints out a pair of lines for the file. Both lines begin with a timestamp in microseconds, the PID number, and the executable name in parenthesese. The first line with the "access" keyword lists the file name, the attempted number of bytes for the read and write operations. The second line with the "iotime" keyword list the file name and the number of microseconds accumulated in the read and write syscalls. test_check: stap -p4 iotime.stp -test_installcheck: stap iotime.stp -c "sleep 1" +test_installcheck: stap iotime.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/iotop.meta b/testsuite/systemtap.examples/io/iotop.meta index d5331eda..52a8e2f3 100644 --- a/testsuite/systemtap.examples/io/iotop.meta +++ b/testsuite/systemtap.examples/io/iotop.meta @@ -10,4 +10,4 @@ output: timed scope: system-wide description: Every five seconds print out the top ten executables generating I/O traffic during that interval sorted in descending order. test_check: stap -p4 iotop.stp -test_installcheck: stap iotop.stp -c "sleep 1" +test_installcheck: stap iotop.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/traceio.meta b/testsuite/systemtap.examples/io/traceio.meta index da0b99f3..77e7f5df 100644 --- a/testsuite/systemtap.examples/io/traceio.meta +++ b/testsuite/systemtap.examples/io/traceio.meta @@ -10,4 +10,4 @@ output: timed scope: system-wide description: Every second print out the top ten executables sorted in descending order based on cumulative I/O traffic observed. test_check: stap -p4 traceio.stp -test_installcheck: stap traceio.stp -c "sleep 1" +test_installcheck: stap traceio.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/traceio2.meta b/testsuite/systemtap.examples/io/traceio2.meta index 4b63108c..432978ca 100644 --- a/testsuite/systemtap.examples/io/traceio2.meta +++ b/testsuite/systemtap.examples/io/traceio2.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: Print out the executable name and process number as reads and writes to the specified device occur. test_check: stap -p4 traceio2.stp 0x0801 -test_installcheck: stap traceio2.stp 0x0801 -c "sleep 1" +test_installcheck: stap traceio2.stp 0x0801 -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/io/ttyspy.meta b/testsuite/systemtap.examples/io/ttyspy.meta index e29add1b..b190eafd 100644 --- a/testsuite/systemtap.examples/io/ttyspy.meta +++ b/testsuite/systemtap.examples/io/ttyspy.meta @@ -3,4 +3,4 @@ name: ttyspy.stp keywords: io tty per-process monitor description: The ttyspy.stp script uses tty_audit hooks to monitor recent typing activity on the system, printing a scrolling record of recent keystrokes, on a per-tty basis. test_check: stap -gp4 ttyspy.stp -test_installcheck: stap --skip-badvars -g ttyspy.stp -c "sleep 7" +test_installcheck: stap --skip-badvars -g ttyspy.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/keyword-index.html b/testsuite/systemtap.examples/keyword-index.html index 7523c302..a57b967e 100644 --- a/testsuite/systemtap.examples/keyword-index.html +++ b/testsuite/systemtap.examples/keyword-index.html @@ -39,7 +39,7 @@ </ul> <h2>Examples by Keyword</h2> -<p><tt><a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITOR">MONITOR</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> +<p><tt><a href="#AUTOFS">AUTOFS</a> <a href="#BACKTRACE">BACKTRACE</a> <a href="#BUFFER">BUFFER</a> <a href="#CALLGRAPH">CALLGRAPH</a> <a href="#CPU">CPU</a> <a href="#DISK">DISK</a> <a href="#FORMAT">FORMAT</a> <a href="#FREE">FREE</a> <a href="#FUNCTIONS">FUNCTIONS</a> <a href="#FUTEX">FUTEX</a> <a href="#GRAPH">GRAPH</a> <a href="#INTERRUPT">INTERRUPT</a> <a href="#IO">IO</a> <a href="#LOCKING">LOCKING</a> <a href="#MEMORY">MEMORY</a> <a href="#MONITOR">MONITOR</a> <a href="#NETWORK">NETWORK</a> <a href="#NFS">NFS</a> <a href="#NUMA">NUMA</a> <a href="#PER-PROCESS">PER-PROCESS</a> <a href="#PROCESS">PROCESS</a> <a href="#PROFILING">PROFILING</a> <a href="#READ">READ</a> <a href="#SCHEDULER">SCHEDULER</a> <a href="#SCSI">SCSI</a> <a href="#SIGNALS">SIGNALS</a> <a href="#SIMPLE">SIMPLE</a> <a href="#SLEEP">SLEEP</a> <a href="#SOCKET">SOCKET</a> <a href="#STATISTICS">STATISTICS</a> <a href="#SYSCALL">SYSCALL</a> <a href="#TCP">TCP</a> <a href="#TIME">TIME</a> <a href="#TRACE">TRACE</a> <a href="#TRACEPOINT">TRACEPOINT</a> <a href="#TRAFFIC">TRAFFIC</a> <a href="#TTY">TTY</a> <a href="#USE">USE</a> <a href="#WAIT4">WAIT4</a> <a href="#WRITE">WRITE</a> </tt></p> <h3><a name="AUTOFS">AUTOFS</a></h3> <ul> <li><a href="network/autofs4.stp">network/autofs4.stp</a> - Watch autofs4 operations<br> @@ -135,6 +135,9 @@ keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#BAC <li><a href="io/ioblktime.stp">io/ioblktime.stp</a> - Average Time Block IO Requests Spend in Queue <br> keywords: <a href="keyword-index.html#IO">IO</a> <br> <p>The ioblktime.stp script tracks the amount of time that each block IO requests spend waiting for completion. The script computes the average time waiting time for block IO per device and prints list every 10 seconds. In some cases there can be too many oustanding block IO operations and the script may exceed the default number of MAXMAPENTRIES allowed. In this case the allowed number can be increased with "-DMAXMAPENTRIES=10000" option on the stap command line.</p></li> +<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> +<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> <li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> @@ -264,6 +267,9 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde </ul> <h3><a name="PROFILING">PROFILING</a></h3> <ul> +<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> +<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> <li><a href="io/iostats.stp">io/iostats.stp</a> - List Executables Reading and Writing the Most Data<br> keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <br> <p> The iostat.stp script measures the amount of data successfully read and written by all the executables on the system. The output is sorted from most greatest sum of bytes read and written by an executable to the least. The output contains the count of operations (opens, reads, and writes), the totals and averages for the number of bytes read and written.</p></li> @@ -307,6 +313,12 @@ keywords: <a href="keyword-index.html#PROCESS">PROCESS</a> <a href="keyword-inde keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#SCHEDULER">SCHEDULER</a> <a href="keyword-index.html#BACKTRACE">BACKTRACE</a> <br> <p>The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay.</p></li> </ul> +<h3><a name="SCSI">SCSI</a></h3> +<ul> +<li><a href="io/iostat-scsi.stp">io/iostat-scsi.stp</a> - iostat for SCSI Devices<br> +keywords: <a href="keyword-index.html#IO">IO</a> <a href="keyword-index.html#PROFILING">PROFILING</a> <a href="keyword-index.html#SCSI">SCSI</a> <br> +<p>The iostat-scsi.stp script provides a breakdown of the number of blks read and written on the various machines's SCSI devices. The script takes one argument which is the number of seconds between reports.</p></li> +</ul> <h3><a name="SIGNALS">SIGNALS</a></h3> <ul> <li><a href="process/sig_by_pid.stp">process/sig_by_pid.stp</a> - Signal Counts by Process ID<br> diff --git a/testsuite/systemtap.examples/keyword-index.txt b/testsuite/systemtap.examples/keyword-index.txt index f9c27e3a..4f1ce8f2 100644 --- a/testsuite/systemtap.examples/keyword-index.txt +++ b/testsuite/systemtap.examples/keyword-index.txt @@ -192,6 +192,14 @@ keywords: io line. +io/iostat-scsi.stp - iostat for SCSI Devices +keywords: io profiling scsi + + The iostat-scsi.stp script provides a breakdown of the number of blks + read and written on the various machines's SCSI devices. The script + takes one argument which is the number of seconds between reports. + + io/iostats.stp - List Executables Reading and Writing the Most Data keywords: io profiling @@ -539,6 +547,14 @@ keywords: process scheduler time tracepoint = PROFILING = +io/iostat-scsi.stp - iostat for SCSI Devices +keywords: io profiling scsi + + The iostat-scsi.stp script provides a breakdown of the number of blks + read and written on the various machines's SCSI devices. The script + takes one argument which is the number of seconds between reports. + + io/iostats.stp - List Executables Reading and Writing the Most Data keywords: io profiling @@ -667,6 +683,16 @@ keywords: io scheduler backtrace so is the total delay. += SCSI = + +io/iostat-scsi.stp - iostat for SCSI Devices +keywords: io profiling scsi + + The iostat-scsi.stp script provides a breakdown of the number of blks + read and written on the various machines's SCSI devices. The script + takes one argument which is the number of seconds between reports. + + = SIGNALS = process/sig_by_pid.stp - Signal Counts by Process ID diff --git a/testsuite/systemtap.examples/locks/bkl.meta b/testsuite/systemtap.examples/locks/bkl.meta index e4afabde..61bd4eb7 100644 --- a/testsuite/systemtap.examples/locks/bkl.meta +++ b/testsuite/systemtap.examples/locks/bkl.meta @@ -7,4 +7,4 @@ status: production exit: user-controlled description: The bkl.stp script can help determine whether the Big Kernel Lock (BKL) is causing serialization on a multiprocessor system due to excessive contention of the BKL. The bkl.stp script takes one argument which is the number of processes waiting for the Big Kernel Lock (BKL). When the number of processes waiting for the BKL is reached or exceeded, the script will print a time stamp, the number of processes waiting for the BKL, the holder of the BKL, and the amount of time the BKL was held. test_check: stap -p4 bkl.stp 1 -test_installcheck: stap bkl.stp -c "sleep 1" 1 +test_installcheck: stap bkl.stp -c "sleep 0.2" 1 diff --git a/testsuite/systemtap.examples/locks/bkl_stats.meta b/testsuite/systemtap.examples/locks/bkl_stats.meta index 00d55c68..6db6c72f 100644 --- a/testsuite/systemtap.examples/locks/bkl_stats.meta +++ b/testsuite/systemtap.examples/locks/bkl_stats.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The bkl_stats.stp script can indicate which processes have excessive waits for the Big Kernel Lock (BKL) and which processes are taking the BKL for long periods of time. The bkl_stats.stp script prints lists of all the processes that require the BKL. Every five seconds two tables are printed out. The first table lists the processes that waited for the BKL followed by the number of times that the process waited, the minimum time of the wait, the average and the maximum time waited. The second table lists has similar information for the time spent holding the lock for each of the processes. test_check: stap -p4 bkl_stats.stp -test_installcheck: stap bkl_stats.stp -c "sleep 1" +test_installcheck: stap bkl_stats.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/kmalloc-top.meta b/testsuite/systemtap.examples/memory/kmalloc-top.meta index 93308909..f4c2a9d1 100644 --- a/testsuite/systemtap.examples/memory/kmalloc-top.meta +++ b/testsuite/systemtap.examples/memory/kmalloc-top.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The kmalloc-top perl program runs a small systemtap script to collect stack traces for each call to the kmalloc function and counts the time that each stack trace is observed. When kmalloc-top exits it prints out sorted list. The output can be be filtered to print only only the first stack traces (-t) stack traces with more a minimum counts (-m), or exclude certain stack traces (-e). test_check: ./kmalloc-top -o "-p4" -c "sleep 0" -test_installcheck: ./kmalloc-top -c "sleep 1" +test_installcheck: ./kmalloc-top -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/mmanonpage.meta b/testsuite/systemtap.examples/memory/mmanonpage.meta index 496d10d8..eb2e9f57 100644 --- a/testsuite/systemtap.examples/memory/mmanonpage.meta +++ b/testsuite/systemtap.examples/memory/mmanonpage.meta @@ -9,5 +9,6 @@ exit: user-controlled output: sorted-list scope: system-wide description: The mmanonpage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, user space frees, page ins, copy on writes and unmaps for anonymous pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. This script displays the anonymous page statistics for each process that ran while the script is active. Its useful in debugging leaks in the anonymous regions of a process. +test_support: stap -l kernel.trace("mm_page_allocation"),kernel.trace("mm_page_free"),kernel.trace("mm_anon_fault"),kernel.trace("mm_anon_pgin"),kernel.trace("mm_anon_cow"),kernel.trace("mm_anon_unmap"),kernel.trace("mm_anon_userfree") test_check: stap -p4 mmanonpage.stp -test_installcheck: stap mmanonpage.stp -c "sleep 1" +test_installcheck: stap mmanonpage.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/mmfilepage.meta b/testsuite/systemtap.examples/memory/mmfilepage.meta index 3fb6ba55..c26f0601 100644 --- a/testsuite/systemtap.examples/memory/mmfilepage.meta +++ b/testsuite/systemtap.examples/memory/mmfilepage.meta @@ -9,5 +9,6 @@ exit: user-controlled output: sorted-list scope: system-wide description: The mmfilepage.stp script uses the virtual memory tracepoints available in some kernels to track the number of faults, copy on writes mapping, and unmapping operations for file backed pages. When the script is terminated the counts are printed for each process that allocated pages while the script was running. The mmfilepage.stp script is useful in debugging leaks in the mapped file regions of a process. +test_support: stap -l kernel.trace("mm_page_allocation"),kernel.trace("mm_page_free"),kernel.trace("mm_filemap_fault"),kernel.trace("mm_filemap_cow"),kernel.trace("mm_filemap_unmap"),kernel.trace("mm_filemap_userunmap") test_check: stap -p4 mmfilepage.stp -test_installcheck: stap mmfilepage.stp -c "sleep 1" +test_installcheck: stap mmfilepage.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/mmreclaim.meta b/testsuite/systemtap.examples/memory/mmreclaim.meta index f9c9b523..c3b9cfc6 100644 --- a/testsuite/systemtap.examples/memory/mmreclaim.meta +++ b/testsuite/systemtap.examples/memory/mmreclaim.meta @@ -9,5 +9,6 @@ exit: user-controlled output: sorted-list scope: system-wide description: The mmreclaim.stp script uses the virtual memory tracepoints available in some kernels to track page reclaim activity that occured while the script was running. Its useful is debugging performance problems that occur due to page reclamation. +test_support: stap -l kernel.trace("mm_directreclaim_reclaimall"),kernel.trace("mm_pagereclaim_shrinkinactive"),kernel.trace("mm_pagereclaim_free"),kernel.trace("mm_pagereclaim_pgout"),kernel.trace("mm_pagereclaim_shrinkactive_a2a"),kernel.trace("mm_pagereclaim_shrinkinactive_i2a"),kernel.trace("mm_pagereclaim_shrinkactive_a2i"),kernel.trace("mm_pagereclaim_shrinkinactive_i2i") test_check: stap -p4 mmreclaim.stp -test_installcheck: stap mmreclaim.stp -c "sleep 1" +test_installcheck: stap mmreclaim.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/mmwriteback.meta b/testsuite/systemtap.examples/memory/mmwriteback.meta index aab0f910..1ad4947c 100644 --- a/testsuite/systemtap.examples/memory/mmwriteback.meta +++ b/testsuite/systemtap.examples/memory/mmwriteback.meta @@ -9,5 +9,6 @@ exit: user-controlled output: sorted-list scope: system-wide description: The mmwriteback.stp script uses the virtual memory tracepoints available in some kernels to report all of the file writebacks that occur form kupdate, pdflush and kjournald while the script is running. Its useful in determining where writes are coming from on a supposedly idle system that is experiencing upexpected IO. +test_support: stap -l kernel.trace("mm_pdflush_bgwriteout"),kernel.trace("mm_pdflush_kupdate"),kernel.trace("mm_pagereclaim_pgout") test_check: stap -p4 mmwriteback.stp -test_installcheck: stap mmwriteback.stp -c "sleep 1" +test_installcheck: stap mmwriteback.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/numa_faults.meta b/testsuite/systemtap.examples/memory/numa_faults.meta index 34034bef..51da3fc7 100644 --- a/testsuite/systemtap.examples/memory/numa_faults.meta +++ b/testsuite/systemtap.examples/memory/numa_faults.meta @@ -10,4 +10,4 @@ output: list scope: system-wide description: The numa_faults.stp script tracks the read and write pages faults for each process. When the script exits it prints out the total read and write pages faults for each process. The script also providea a break down of page faults per node for each process. This script is useful for determining whether the program has good locality (page faults limited to a single node) on a NUMA computer. test_check: stap -p4 numa_faults.stp -test_installcheck: stap numa_faults.stp -c "sleep 1" +test_installcheck: stap numa_faults.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/memory/pfaults.meta b/testsuite/systemtap.examples/memory/pfaults.meta index 149d83fa..480e3b24 100644 --- a/testsuite/systemtap.examples/memory/pfaults.meta +++ b/testsuite/systemtap.examples/memory/pfaults.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The pfaults.stp script generates a simple log for each major and minor page fault that occurs on the system. Each line contains a timestamp (in microseconds) when the page fault servicing was completed, the pid of the process, the address of the page fault, the type of access (read or write), the type of fault (major or minor), and the elapsed time for page fault. This log can be examined to determine where the page faults are occuring. test_check: stap -p4 pfaults.stp -test_installcheck: stap pfaults.stp -c "sleep 1" +test_installcheck: stap pfaults.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/autofs4.meta b/testsuite/systemtap.examples/network/autofs4.meta index 16ae7297..e0036481 100644 --- a/testsuite/systemtap.examples/network/autofs4.meta +++ b/testsuite/systemtap.examples/network/autofs4.meta @@ -4,5 +4,6 @@ name: autofs4.stp author: Jeff Moyer keywords: network autofs nfs subsystem: network +test_support: stap -l module("autofs4").function("autofs4_lookup"),module("autofs4").function("autofs4_follow_link"),module("autofs4").function("autofs4_expire_indirect").return,module("autofs4").function("autofs4_wait").return test_check: stap -p4 autofs4.stp -test_installcheck: stap autofs4.stp -c "sleep 10" +test_installcheck: stap autofs4.stp -c "sleep 1" diff --git a/testsuite/systemtap.examples/network/dropwatch.meta b/testsuite/systemtap.examples/network/dropwatch.meta index 176ba236..06d338c5 100644 --- a/testsuite/systemtap.examples/network/dropwatch.meta +++ b/testsuite/systemtap.examples/network/dropwatch.meta @@ -9,5 +9,6 @@ exit: user-controlled output: timed scope: system-wide description: Every five seconds the dropwatch.stp script lists the number of socket buffers freed at locations in the kernel. +test_support: stap -l kernel.trace("kfree_skb") test_check: stap -p4 dropwatch.stp -test_installcheck: stap dropwatch.stp -c "sleep 1" +test_installcheck: stap dropwatch.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/nettop.meta b/testsuite/systemtap.examples/network/nettop.meta index 61d1c153..1c3923c7 100644 --- a/testsuite/systemtap.examples/network/nettop.meta +++ b/testsuite/systemtap.examples/network/nettop.meta @@ -10,4 +10,4 @@ output: timed scope: system-wide description: Every five seconds the nettop.stp script prints out a list of processed (PID and command) with the number of packets sent/received and the amount of data sent/received by the process during that interval. test_check: stap -p4 nettop.stp -test_installcheck: stap nettop.stp -c "sleep 1" +test_installcheck: stap nettop.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta b/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta index bc798f72..186203a1 100644 --- a/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta +++ b/testsuite/systemtap.examples/network/sk_stream_wait_memory.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The sk_stream-wait_memory.stp prints a time stamp, executable, and pid each time a process blocks due to the send buffer being full. A similar entry is printed each time a process continues because there is room in the buffer. test_check: stap -p4 sk_stream_wait_memory.stp -test_installcheck: stap sk_stream_wait_memory.stp -c "sleep 1" +test_installcheck: stap sk_stream_wait_memory.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/socket-trace.meta b/testsuite/systemtap.examples/network/socket-trace.meta index 0b26f2fe..f73731b5 100644 --- a/testsuite/systemtap.examples/network/socket-trace.meta +++ b/testsuite/systemtap.examples/network/socket-trace.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The script instrument each of the functions inn the Linux kernel's net/socket.c file. The script prints out trace. The first element of a line is time delta in microseconds from the previous entry. This is followed by the command name and the PID. The "->" and "<-" indicates function entry and function exit, respectively. The last element of the line is the function name. test_check: stap -p4 socket-trace.stp -test_installcheck: stap socket-trace.stp -c "sleep 1" +test_installcheck: stap socket-trace.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/tcp_connections.meta b/testsuite/systemtap.examples/network/tcp_connections.meta index 0bc9bcb1..df24850d 100644 --- a/testsuite/systemtap.examples/network/tcp_connections.meta +++ b/testsuite/systemtap.examples/network/tcp_connections.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The tcp_connections.stp script prints information for each new incoming TCP connection accepted by the computer. The information includes the UID, the command accepting the connection, the PID of the command, the port the connection is on, and the IP address of the originator of the request. test_check: stap -p4 tcp_connections.stp -test_installcheck: stap tcp_connections.stp -c "sleep 1" +test_installcheck: stap tcp_connections.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/network/tcpdumplike.meta b/testsuite/systemtap.examples/network/tcpdumplike.meta index 0de45d5e..f5975aa6 100644 --- a/testsuite/systemtap.examples/network/tcpdumplike.meta +++ b/testsuite/systemtap.examples/network/tcpdumplike.meta @@ -10,4 +10,4 @@ output: timed scope: system-wide description: The tcpdumplike.stp prints out a line for each TCP packet received. Each line includes the source and destination IP addresses, the source and destination ports, and flags. test_check: stap -p4 tcpdumplike.stp -test_installcheck: stap tcpdumplike.stp -c "sleep 1" +test_installcheck: stap tcpdumplike.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/chng_cpu.meta b/testsuite/systemtap.examples/process/chng_cpu.meta index 944f417a..7be73b78 100644 --- a/testsuite/systemtap.examples/process/chng_cpu.meta +++ b/testsuite/systemtap.examples/process/chng_cpu.meta @@ -11,4 +11,4 @@ scope: pid description: The chng_cpu.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name is found running on a different processor, the script prints out the thread id (tid), the executable name, the processor now running the task, the thread state, and a backtrace showing the kernel functions that triggered the running of the task on the processor. arg_1: The name of the executable to monitor test_check: stap -p4 chng_cpu.stp bash -test_installcheck: stap chng_cpu.stp -c "sleep 1" bash +test_installcheck: stap chng_cpu.stp -c "sleep 0.2" bash diff --git a/testsuite/systemtap.examples/process/errsnoop.meta b/testsuite/systemtap.examples/process/errsnoop.meta index 34b8cb7c..8afcdd96 100644 --- a/testsuite/systemtap.examples/process/errsnoop.meta +++ b/testsuite/systemtap.examples/process/errsnoop.meta @@ -4,4 +4,4 @@ keywords: process syscall subsystem: general description: The script prints a periodic tabular report about failing system calls, by process and by syscall failure. The first optional argument specifies the reporting interval (in seconds, default 5); the second optional argument gives a screen height (number of lines in the report, default 20). test_check: stap -p4 errsnoop.stp -test_installcheck: stap errsnoop.stp 1 10 -c "sleep 3" +test_installcheck: stap errsnoop.stp 1 10 -c "sleep 1" diff --git a/testsuite/systemtap.examples/process/forktracker.meta b/testsuite/systemtap.examples/process/forktracker.meta index 87d43d7a..2ba3a659 100644 --- a/testsuite/systemtap.examples/process/forktracker.meta +++ b/testsuite/systemtap.examples/process/forktracker.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The forktracker.stp script prints out a time-stamped entry showing each fork and exec operation on the machine. This can be useful for determine what process is creating a flurry of short-lived processes. test_check: stap -p4 forktracker.stp -test_installcheck: stap forktracker.stp -c "sleep 1" +test_installcheck: stap forktracker.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/futexes.meta b/testsuite/systemtap.examples/process/futexes.meta index ff303122..404f576d 100644 --- a/testsuite/systemtap.examples/process/futexes.meta +++ b/testsuite/systemtap.examples/process/futexes.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: The script watches the futex syscall on the system. On exit the futexes address, the number of contentions, and the average time for each contention on the futex are printed from lowest pid number to highest. test_check: stap -p4 futexes.stp -test_installcheck: stap futexes.stp -c "sleep 1" +test_installcheck: stap futexes.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/migrate.meta b/testsuite/systemtap.examples/process/migrate.meta index 09a25de0..24e8bdc9 100644 --- a/testsuite/systemtap.examples/process/migrate.meta +++ b/testsuite/systemtap.examples/process/migrate.meta @@ -11,4 +11,4 @@ scope: pid description: The migrate.stp script takes an argument which is the executable name of the task it should monitor. Each time a task with that executable name migrates between processors an entry is printed with the process id (pid), the executable name, the processor off loading the task, and the process taking the task. Note that the task may or may not be executing at the time of the migration. arg_1: The name of the executable to watch test_check: stap -p4 migrate.stp bash -test_installcheck: stap migrate.stp -c "sleep 1" bash +test_installcheck: stap migrate.stp -c "sleep 0.2" bash diff --git a/testsuite/systemtap.examples/process/pf2.meta b/testsuite/systemtap.examples/process/pf2.meta index d0a534bd..8fa14d04 100644 --- a/testsuite/systemtap.examples/process/pf2.meta +++ b/testsuite/systemtap.examples/process/pf2.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The pf2.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top ten kernel functions with samples. test_check: stap -p4 pf2.stp -test_installcheck: stap pf2.stp -c "sleep 1" +test_installcheck: stap pf2.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/schedtimes.meta b/testsuite/systemtap.examples/process/schedtimes.meta index 0074731f..960d8eda 100644 --- a/testsuite/systemtap.examples/process/schedtimes.meta +++ b/testsuite/systemtap.examples/process/schedtimes.meta @@ -9,5 +9,6 @@ exit: user-controlled output: sorted-list scope: system-wide description: The schedtimes.stp script instruments the scheduler to track the amount of time that each process spends running, sleeping, queued, and waiting for io. On exit the script prints out the accumulated time for each state of processes observed. Optionally, this script can be used with the '-c' or '-x' options to focus on a specific PID. +test_support: stap -l kernel.trace("sched_switch"),kernel.trace("sched_wakeup") test_check: stap -p4 schedtimes.stp -test_installcheck: stap schedtimes.stp -c "sleep 1" +test_installcheck: stap schedtimes.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/sig_by_pid.meta b/testsuite/systemtap.examples/process/sig_by_pid.meta index 03b02fba..7f371151 100644 --- a/testsuite/systemtap.examples/process/sig_by_pid.meta +++ b/testsuite/systemtap.examples/process/sig_by_pid.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: Print signal counts by process ID in descending order. test_check: stap -p4 sig_by_pid.stp -test_installcheck: stap sig_by_pid.stp -c "sleep 1" +test_installcheck: stap sig_by_pid.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/sig_by_proc.meta b/testsuite/systemtap.examples/process/sig_by_proc.meta index eea42be4..8a454373 100644 --- a/testsuite/systemtap.examples/process/sig_by_proc.meta +++ b/testsuite/systemtap.examples/process/sig_by_proc.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: Print signal counts by process name in descending order. test_check: stap -p4 sig_by_proc.stp -test_installcheck: stap sig_by_proc.stp -c "sleep 1" +test_installcheck: stap sig_by_proc.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/sigkill.meta b/testsuite/systemtap.examples/process/sigkill.meta index 57032224..b0e04ce8 100644 --- a/testsuite/systemtap.examples/process/sigkill.meta +++ b/testsuite/systemtap.examples/process/sigkill.meta @@ -11,4 +11,4 @@ scope: systemwide description: The script traces any SIGKILL signals. When that SIGKILL signal is sent to a process, the script prints out the signal name, the desination executable and process ID, the executable name user ID that sent the signal. arg_1: The name of the signal to look for on selected process. test_check: stap -p4 sigkill.stp -test_installcheck: stap sigkill.stp -c "sleep 1" +test_installcheck: stap sigkill.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/sigmon.meta b/testsuite/systemtap.examples/process/sigmon.meta index fe192248..03c54f96 100644 --- a/testsuite/systemtap.examples/process/sigmon.meta +++ b/testsuite/systemtap.examples/process/sigmon.meta @@ -11,4 +11,4 @@ scope: pid description: The script watches for a particular signal sent to a specific process. When that signal is sent to the specified process, the script prints out the PID and executable of the process sending the signal, the PID and executable name of the process receiving the signal, and the signal number and name. arg_1: The name of the signal to look for on selected process. test_check: stap -p4 sigmon.stp SIGKILL -test_installcheck: stap sigmon.stp -c "sleep 1" SIGKILL +test_installcheck: stap sigmon.stp -c "sleep 0.2" SIGKILL diff --git a/testsuite/systemtap.examples/process/sleepingBeauties.meta b/testsuite/systemtap.examples/process/sleepingBeauties.meta index 3338edbf..b2692ba0 100644 --- a/testsuite/systemtap.examples/process/sleepingBeauties.meta +++ b/testsuite/systemtap.examples/process/sleepingBeauties.meta @@ -4,4 +4,4 @@ keywords: io scheduler backtrace subsystem: scheduler description: The script monitors the time that threads spend waiting for IO operations (in "D" state) in the wait_for_completion function. If a thread spends over 10ms, its name and backtrace is printed, and later so is the total delay. test_check: stap -p4 sleepingBeauties.stp -test_installcheck: stap sleepingBeauties.stp -c "sleep 1" +test_installcheck: stap sleepingBeauties.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/sleeptime.meta b/testsuite/systemtap.examples/process/sleeptime.meta index d6c59345..7318c7aa 100644 --- a/testsuite/systemtap.examples/process/sleeptime.meta +++ b/testsuite/systemtap.examples/process/sleeptime.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The script watches each nanosleep syscall on the system. At the end of each nanosleep syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "nanosleep:" key, and the duration of the sleep in microseconds. test_check: stap -p4 sleeptime.stp -test_installcheck: stap sleeptime.stp -c "sleep 1" +test_installcheck: stap sleeptime.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/syscalls_by_pid.meta b/testsuite/systemtap.examples/process/syscalls_by_pid.meta index 590652b3..65bb97ac 100644 --- a/testsuite/systemtap.examples/process/syscalls_by_pid.meta +++ b/testsuite/systemtap.examples/process/syscalls_by_pid.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each PID ordered from greatest to least number of syscalls. test_check: stap -p4 syscalls_by_pid.stp -test_installcheck: stap syscalls_by_pid.stp -c "sleep 1" +test_installcheck: stap syscalls_by_pid.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/syscalls_by_proc.meta b/testsuite/systemtap.examples/process/syscalls_by_proc.meta index 79aa3e87..42668bc8 100644 --- a/testsuite/systemtap.examples/process/syscalls_by_proc.meta +++ b/testsuite/systemtap.examples/process/syscalls_by_proc.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: The script watches all syscall on the system. On exit the script prints a list showing the number of systemcalls executed by each executable ordered from greates to least number of syscalls. test_check: stap -p4 syscalls_by_proc.stp -test_installcheck: stap syscalls_by_proc.stp -c "sleep 1" +test_installcheck: stap syscalls_by_proc.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/process/wait4time.meta b/testsuite/systemtap.examples/process/wait4time.meta index a939d466..e798014b 100644 --- a/testsuite/systemtap.examples/process/wait4time.meta +++ b/testsuite/systemtap.examples/process/wait4time.meta @@ -10,4 +10,4 @@ output: trace scope: system-wide description: The script watches each wait4 syscall on the system. At the end of each wait4 syscall the script prints out a line with a timestamp in microseconds, the pid, the executable name in paretheses, the "wait4:" key, the duration of the wait and the PID that the wait4 was waiting for. If the waited for PID is not specified , it is "-1". test_check: stap -p4 wait4time.stp -test_installcheck: stap wait4time.stp -c "sleep 1" +test_installcheck: stap wait4time.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/profiling/functioncallcount.meta b/testsuite/systemtap.examples/profiling/functioncallcount.meta index 4d419528..682b2f95 100644 --- a/testsuite/systemtap.examples/profiling/functioncallcount.meta +++ b/testsuite/systemtap.examples/profiling/functioncallcount.meta @@ -10,4 +10,4 @@ output: sorted-list on-exit scope: system-wide description: The functioncallcount.stp script takes one argument, a list of functions to probe. The script will run and count the number of times that each of the functions on the list is called. On exit the script will print a sorted list from most frequently to least frequently called function. test_check: stap -p4 functioncallcount.stp "*@mm/*.c" -test_installcheck: stap functioncallcount.stp "*@mm/*.c" -c "sleep 1" +test_installcheck: stap functioncallcount.stp "*@mm/*.c" -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/profiling/thread-times.meta b/testsuite/systemtap.examples/profiling/thread-times.meta index fcbf062e..3cb3e93d 100644 --- a/testsuite/systemtap.examples/profiling/thread-times.meta +++ b/testsuite/systemtap.examples/profiling/thread-times.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The thread-times.stp script sets up time-based sampling. Every five seconds it prints out a sorted list with the top twenty processes with samples broken down into percentage total time spent in user-space and kernel-space. test_check: stap -p4 thread-times.stp -test_installcheck: stap thread-times.stp -c "sleep 1" +test_installcheck: stap thread-times.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/profiling/timeout.meta b/testsuite/systemtap.examples/profiling/timeout.meta index aa683c0a..a91ea1ec 100644 --- a/testsuite/systemtap.examples/profiling/timeout.meta +++ b/testsuite/systemtap.examples/profiling/timeout.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The timeout.stp script is based on a blog entry (http://udrepper.livejournal.com/19041.html) mentioning a need for a tool to help developers find applications that are polling. The timeout.stp script monitors systemcall used for polling and records the systemcalls that timed out rather than returned because some action occurred. The script updates the screen once a second with the top twenty processes. test_check: stap -p4 timeout.stp -test_installcheck: stap timeout.stp -c "sleep 1" +test_installcheck: stap timeout.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.examples/profiling/topsys.meta b/testsuite/systemtap.examples/profiling/topsys.meta index 3642713d..f764ee49 100644 --- a/testsuite/systemtap.examples/profiling/topsys.meta +++ b/testsuite/systemtap.examples/profiling/topsys.meta @@ -10,4 +10,4 @@ output: sorted-list scope: system-wide description: The topsys.stp script lists out the top twenty systemcalls for the previous 5 seconds. The output is sorted from most frequent to least frequent. test_check: stap -p4 topsys.stp -test_installcheck: stap topsys.stp -c "sleep 1" +test_installcheck: stap topsys.stp -c "sleep 0.2" diff --git a/testsuite/systemtap.exelib/exelib.exp b/testsuite/systemtap.exelib/exelib.exp index bd9c687e..1337d545 100644 --- a/testsuite/systemtap.exelib/exelib.exp +++ b/testsuite/systemtap.exelib/exelib.exp @@ -2,7 +2,11 @@ # (with gcc/g++, -O0/-O3, prelinked/pie, seperate debuginfo) # Then runs tests with a list of execs. -set subtestlist {lib mark uname ustack cleanup} +# Don't enable all sub-tests by default, enable them separately when +# you want to track down an issue. +# Enable just the all-in-one test for regular test runs to safe time +#set subtestlist {lib mark uname ustack cleanup} +set subtestlist {libmarkunamestack cleanup} proc seperate_debuginfo {elffile} { set objcopy [list "objcopy" "--only-keep-debug"] @@ -44,9 +48,9 @@ foreach arch $arches { # and exploded the test search case a bit. foreach compiler {gcc} { # Add g++ - # Just try -O0 and -O3. - # Adding -O, -O2, -Os and mixing lib/exe is a bit overdone - foreach opt {-O0 -O3} { + # Just try -O3. + # Adding -O0, -O, -O2, -Os and mixing lib/exe is a bit overdone + foreach opt {-O3} { foreach libprelink {no yes} { diff --git a/testsuite/systemtap.exelib/libmarkunamestack.stp b/testsuite/systemtap.exelib/libmarkunamestack.stp new file mode 100644 index 00000000..0efbae0e --- /dev/null +++ b/testsuite/systemtap.exelib/libmarkunamestack.stp @@ -0,0 +1,72 @@ +// Jumbo stp script +// Arguments: @1 uprobes_exe, @2 libuprobes_lib.so + +# lib +probe process(@1).function("main") { + printf("main\n"); +} + +probe process(@1).function("main_func") { + printf("main_func\n"); +} + +probe process(@2).function("lib_main") { + printf("lib_main\n"); +} + +probe process(@2).function("lib_func") { + printf("lib_func\n"); +} + +#mark +probe process(@1).mark("main_count") { + printf("main_count: %d\n", $arg1); +} + +probe process(@2).mark("func_count") { + printf("func_count: %d\n", $arg1); +} + +#uname +probe process(@1).function("*") { + printf("exe: %s=%s\n",probefunc(), usymname(uaddr())); +} + +probe process(@2).function("*") { + printf("lib: %s=%s\n",probefunc(), usymname(uaddr())); +} + +# ustack +global hits = 0; + +probe process(@1).function("main_func") +{ + if (hits == 0) + { + log("print_ubacktrace exe 0"); + print_ubacktrace(); + hits++; + } + else if (hits == 1) + { + log("print_ustack exe 1"); + print_ustack(ubacktrace()); + hits++; + } +} + +probe process(@2).function("lib_func") +{ + if (hits == 2) + { + log("print_ubacktrace lib 2"); + print_ubacktrace(); + hits++; + } + else if (hits == 3) + { + log("print_ustack lib 3"); + print_ustack(ubacktrace()); + hits++; + } +} diff --git a/testsuite/systemtap.exelib/libmarkunamestack.tcl b/testsuite/systemtap.exelib/libmarkunamestack.tcl new file mode 100644 index 00000000..55dc10ee --- /dev/null +++ b/testsuite/systemtap.exelib/libmarkunamestack.tcl @@ -0,0 +1,104 @@ +# Only run on make installcheck +if {! [installtest_p]} { untested "libmarkunamestack-$testname"; return } +if {! [uprobes_p]} { untested "libmarkunamestack-$testname"; return } + +# Big jumbo test, for tracking down bugs, use the individual tests. + +# Output for ustack part is: +#print_ubacktrace exe 0 +# 0x080484ba : main_func+0xa/0x29 [.../uprobes_exe] +# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] +#print_ustack exe 1 +# 0x080484ba : main_func+0xa/0x29 [.../uprobes_exe] +# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] +# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] +#print_ubacktrace lib 2 +# 0x00db2422 : lib_func+0x16/0x2b [.../libuprobes_lib.so] +# 0x00db2455 : lib_main+0x1e/0x29 [.../libuprobes_lib.so] +# 0x080484d0 : main_func+0x20/0x29 [.../uprobes_exe] +# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] +# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] +# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] +#print_ustack lib 3 +# 0x00db2422 : lib_func+0x16/0x2b [.../libuprobes_lib.so] +# 0x00db2431 : lib_func+0x25/0x2b [.../libuprobes_lib.so] +# 0x00db2455 : lib_main+0x1e/0x29 [.../libuprobes_lib.so] +# 0x080484d0 : main_func+0x20/0x29 [.../uprobes_exe] +# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] +# 0x080484c9 : main_func+0x19/0x29 [.../uprobes_exe] +# 0x080484f6 : main+0x1d/0x37 [.../uprobes_exe] + +set lib 0 +set mark 0 +set uname 0 + +set print 0 +set main 0 +set main_func 0 +set lib_main 0 +set lib_func 0 +send_log "Running: stap $srcdir/$subdir/libmarkunamestack.stp $testexe $testlib -c $testexe\n" +spawn stap $srcdir/$subdir/libmarkunamestack.stp $testexe $testlib -c $testexe + +wait -i $spawn_id +expect { + -timeout 60 + -re {^print_[^\r\n]+\r\n} {incr print; exp_continue} + +# lib + -re {^main\r\n} {incr lib; exp_continue} + -re {^main_func\r\n} {incr lib; exp_continue} + -re {^lib_main\r\n} {incr lib; exp_continue} + -re {^lib_func\r\n} {incr lib; exp_continue} + +# mark + -re {^main_count: [1-3]\r\n} {incr mark; exp_continue} + -re {^func_count: [1-3]\r\n} {incr mark; exp_continue} + +# uname + -re {^exe: main=main\r\n} {incr uname; exp_continue} + -re {^exe: main_func=main_func\r\n} {incr uname; exp_continue} + -re {^lib: lib_main=lib_main\r\n} {incr uname; exp_continue} + -re {^lib: lib_func=lib_func\r\n} {incr uname; exp_continue} + +# ustack + -re {^ 0x[a-f0-9]+ : main\+0x[^\r\n]+\r\n} {incr main; exp_continue} + -re {^ 0x[a-f0-9]+ : main_func\+0x[^\r\n]+\r\n} {incr main_func; exp_continue} + -re {^ 0x[a-f0-9]+ : lib_main\+0x[^\r\n]+\r\n} {incr lib_main; exp_continue} + -re {^ 0x[a-f0-9]+ : lib_func\+0x[^\r\n]+\r\n} {incr lib_func; exp_continue} + + timeout { fail "libmarkunamestack-$testname (timeout)" } + eof { } +} + +if {$lib == 8} { pass "lib-$testname" } { + fail "lib-$testname ($lib)" +} + +if {$mark == 6} { pass "mark-$testname" } { + fail "mark-$testname ($mark)" +} + +if {$uname == 8} { pass "uname-$testname" } { + fail "uname-$testname ($uname)" +} + +if {$print == 4} { pass "ustack-$testname print" } { + fail "ustack-$testname print ($print)" +} + +if {$main == 4} { pass "ustack-$testname main" } { + fail "ustack-$testname main ($main)" +} + +if {$main_func == 9} { pass "ustack-$testname main_func" } { + fail "ustack-$testname main_func ($main_func)" +} + +if {$lib_main == 2} { pass "ustack-$testname lib_main" } { + fail "ustack-$testname lib_main ($lib_main)" +} + +if {$lib_func == 3} { pass "ustack-$testname lib_func" } { + fail "ustack-$testname lib_func ($lib_func)" +} diff --git a/testsuite/systemtap.syscall/syscall.exp b/testsuite/systemtap.syscall/syscall.exp index 22e9dc07..a4978997 100644 --- a/testsuite/systemtap.syscall/syscall.exp +++ b/testsuite/systemtap.syscall/syscall.exp @@ -32,17 +32,9 @@ proc test_procedure {} { if {$do_64_bit_pass} { foreach filename [lsort [glob $pattern]] { set testname [file tail [string range $filename 0 end-2]] - if {![installtest_p]} { untested $testname; continue } + if {![installtest_p]} { untested "64-bit $testname"; continue } send_log "Testing 64-bit ${testname}\n" - set res [run_one_test $filename $flags] - if {$res == "PASS"} { - pass "$testname" - } elseif {$res == "UNSUPP"} { - unsupported "$testname not supported on this arch" - } else { - fail "64-bit $testname" - send_log "$res\n" - } + run_one_test $filename $flags 64 } } @@ -56,17 +48,9 @@ proc test_procedure {} { if {$do_32_bit_pass} { foreach filename [lsort [glob $pattern]] { set testname [file tail [string range $filename 0 end-2]] - if {![installtest_p]} { untested $testname; continue } + if {![installtest_p]} { untested "32-bit $testname"; continue } send_log "Testing 32-bit ${testname}\n" - set res [run_one_test $filename $flags] - if {$res == "PASS"} { - pass "32-bit $testname" - } elseif {$res == "UNSUPP"} { - unsupported "$testname not supported on this arch" - } else { - fail "32-bit $testname" - send_log "$res\n" - } + run_one_test $filename $flags 32 } } } diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl index 8a5801af..b9d3c0d9 100755 --- a/testsuite/systemtap.syscall/test.tcl +++ b/testsuite/systemtap.syscall/test.tcl @@ -26,19 +26,23 @@ proc bgerror {error} { } trap {cleanup_and_exit} SIGINT -proc run_one_test {filename flags} { +proc run_one_test {filename flags bits} { global dir current_dir set testname [file tail [string range $filename 0 end-2]] - set result "UNSUPP" if {[catch {exec mktemp -d [pwd]/staptestXXXXXX} dir]} { puts stderr "Failed to create temporary directory: $dir" cleanup } - target_compile $filename $dir/$testname executable $flags - + set res [target_compile $filename $dir/$testname executable $flags] + if { $res != "" } { + send_log "$bits-bit $testname : no corresponding devel environment found\n" + untested "$bits-bit $testname" + return + } + set sys_prog "[file dirname [file normalize $filename]]/sys.stp" set cmd "stap --skip-badvars -c $dir/${testname} ${sys_prog}" @@ -74,7 +78,8 @@ proc run_one_test {filename flags} { if {$ind == 0} { # unsupported cleanup - return $result + unsupported "$bits-bit $testname not supported on this arch" + return } set current_dir [pwd] @@ -91,10 +96,9 @@ proc run_one_test {filename flags} { } } if {$i >= $ind} { - set result "PASS" # puts "PASS $testname" + pass "$bits-bit $testname" } else { - set result "FAIL $testname" send_log "$testname FAILED. output of \"$cmd\" was:" send_log "\n------------------------------------------\n" send_log $output @@ -118,7 +122,8 @@ proc run_one_test {filename flags} { for {} {$i < $ind} {incr i} { send_log "$results($i)\n" } + fail "$bits-bit $testname" } cleanup - return $result + return } |