diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-09-19 19:14:33 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-09-19 19:14:33 +0200 |
commit | 2f41f39496d9f9f82947eeebd169a8aa9db8245a (patch) | |
tree | d99665811aca38fb1fa18b193478f5c5b6300275 /testsuite/systemtap.base/maxactive.exp | |
parent | 1d12a9b21c8cbfc995ec3a84e09e613375a1bc5c (diff) | |
download | systemtap-steved-2f41f39496d9f9f82947eeebd169a8aa9db8245a.tar.gz systemtap-steved-2f41f39496d9f9f82947eeebd169a8aa9db8245a.tar.xz systemtap-steved-2f41f39496d9f9f82947eeebd169a8aa9db8245a.zip |
Use less idle time in testsuite.
A lot of tests wait, sleep or use a timer for multiple seconds when that
is not necessary. Reduce the time waited so save test time.
* testsuite/systemtap.base/backtrace.stp: Exit after 100ms.
* testsuite/systemtap.base/badkprobe.exp: Likewise.
* testsuite/systemtap.base/global_end.stp: Likewise.
* testsuite/systemtap.base/itrace.exp: Wait 1 sec instead of 5 for each test.
* testsuite/systemtap.base/maxactive.exp: Likewise.
* testsuite/systemtap.base/onoffprobe.exp: Match and use modname, so
build script can be cached.
* testsuite/systemtap.base/onoffprobe.stp: Wait miliseconds instead of
seconds in each alias. Output module_name.
* testsuite/systemtap.base/poll_map.stp: Start after 100ms.
Diffstat (limited to 'testsuite/systemtap.base/maxactive.exp')
-rw-r--r-- | testsuite/systemtap.base/maxactive.exp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/testsuite/systemtap.base/maxactive.exp b/testsuite/systemtap.base/maxactive.exp index 79ede897..c31c6386 100644 --- a/testsuite/systemtap.base/maxactive.exp +++ b/testsuite/systemtap.base/maxactive.exp @@ -5,28 +5,28 @@ if {![installtest_p]} { untested "MAXACTIVE"; return } -proc sleep_five_sec {} { - after 5000; +proc sleep_one_sec {} { + after 1000; return 0; } -# Script1. For 5 seconds, probe the return of "vfs_read" and +# Script1. For 1 second, probe the return of "vfs_read" and # "do_select". See if we skip any probes. set script1 { global foo probe kernel.function("vfs_read").return, kernel.function("do_select").return { foo++ } - probe timer.ms(5000) { exit(); } + probe timer.ms(1000) { exit(); } probe begin { log("systemtap starting probe"); log("systemtap ending probe");} } # Run script1 and save the number of skipped probes (which will most # likely be 0). -stap_run "MAXACTIVE01" sleep_five_sec "" -e $script1 +stap_run "MAXACTIVE01" sleep_one_sec "" -e $script1 set skipped1 $skipped_probes -# Script2. For 5 seconds, probe the return of "vfs_read" and +# Script2. For 1 second, probe the return of "vfs_read" and # "do_select", with a limit of 1 probe active at a time. See if we # skip any probes. set script2 { @@ -34,13 +34,13 @@ set script2 { probe kernel.function("vfs_read").return.maxactive(1), kernel.function("do_select").return.maxactive(1) { foo++ } - probe timer.ms(5000) { exit(); } + probe timer.ms(1000) { exit(); } probe begin { log("systemtap starting probe"); log("systemtap ending probe");} } # Run script2 and save the number of skipped probes. set output_string "(WARNING: Number of errors: 0, skipped probes: \\d+\r\n)?" -stap_run "MAXACTIVE02" sleep_five_sec $output_string -e $script2 +stap_run "MAXACTIVE02" sleep_one_sec $output_string -e $script2 set skipped2 $skipped_probes # If the number of skipped probes for script 1 is less than the number @@ -50,6 +50,7 @@ set skipped2 $skipped_probes # Note that this isn't 100% accurate based on the system load at the # time of the scripts. set test "MAXACTIVE03" +verbose -log "skipped1: $skipped1, skipped2: $skipped2\n" if {$skipped1 <= $skipped2} { pass $test } else { |