From 344478fec2619d4e787d5a2687cfed5d4f02220f Mon Sep 17 00:00:00 2001 From: "Frank Ch. Eigler" Date: Mon, 16 Jan 2017 10:24:45 -0500 Subject: [PATCH] testsuite infrastructure: change stap_run api Formerly, the stap_run tcl proc accepted a target stap script file name both as its first argument, as well as in the general stap argument list at the end. It passed the former name as an extra file name iff it existed in the $srcdir/$testdir. Some tests happened to use test names that matched files, so triggered this stap_run heuristic, even if the .stp files were specified some other way. This led to extra stap arguments, leading to "unused $0/@0 ..." warnings, leading to test failures. Now, stap_run never does anything clever with its first parameter - it just uses it to construct the dejagnu test case id/name. The .stp file name (if any - if not using -e SCRIPT for example) is now expected to be included by the testcase.exp as arguments at the end. --- testsuite/lib/stap_run.exp | 11 ++++++----- testsuite/lib/stap_run2.exp | 9 ++++----- testsuite/systemtap.base/add.exp | 6 +++--- testsuite/systemtap.base/alias-condition.exp | 6 +++--- testsuite/systemtap.base/alias-epilog.exp | 6 +++--- testsuite/systemtap.base/alias-prolog.exp | 6 +++--- testsuite/systemtap.base/alias_suffixes.exp | 6 +++--- testsuite/systemtap.base/arith.exp | 2 +- testsuite/systemtap.base/arith_limits.exp | 2 +- testsuite/systemtap.base/array_size.exp | 6 +++--- testsuite/systemtap.base/be_order.exp | 6 +++--- testsuite/systemtap.base/beginenderror.exp | 4 +--- testsuite/systemtap.base/bitfield.exp | 2 +- testsuite/systemtap.base/break_and_continue.exp | 8 ++++---- testsuite/systemtap.base/deref.exp | 6 +++--- testsuite/systemtap.base/div0.exp | 6 +++--- testsuite/systemtap.base/equal.exp | 2 +- testsuite/systemtap.base/error_fn.exp | 6 +++--- testsuite/systemtap.base/finloop2.exp | 2 +- testsuite/systemtap.base/func_definition.exp | 6 +++--- testsuite/systemtap.base/global_init.exp | 6 +++--- testsuite/systemtap.base/global_vars.exp | 6 +++--- testsuite/systemtap.base/if.exp | 6 +++--- testsuite/systemtap.base/inc.exp | 6 +++--- testsuite/systemtap.base/inlinedvars.exp | 4 ++-- testsuite/systemtap.base/kfunct.exp | 2 +- testsuite/systemtap.base/kmodule.exp | 4 ++-- testsuite/systemtap.base/kprobes.exp | 2 +- testsuite/systemtap.base/kretprobe-vars.exp | 2 +- testsuite/systemtap.base/logical_and.exp | 6 +++--- testsuite/systemtap.base/not.exp | 6 +++--- testsuite/systemtap.base/optim_voidstmt.exp | 6 +++--- testsuite/systemtap.base/print.exp | 6 +++--- testsuite/systemtap.base/pt_user_mode.exp | 2 +- testsuite/systemtap.base/set_kernel.exp | 2 +- testsuite/systemtap.base/sigusr2.exp | 2 +- testsuite/systemtap.base/simple.exp | 2 +- testsuite/systemtap.base/timers.exp | 2 +- testsuite/systemtap.base/tri.exp | 6 +++--- testsuite/systemtap.base/try_assign.exp | 6 +++--- testsuite/systemtap.base/var_scope.exp | 8 ++++---- testsuite/systemtap.printf/memory1.exp | 4 ++-- testsuite/systemtap.printf/print_user_buffer.exp | 2 +- testsuite/systemtap.samples/tcptest.exp | 2 +- testsuite/systemtap.stress/current.exp | 2 +- 45 files changed, 104 insertions(+), 106 deletions(-) diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index 6f074624d..b8183b823 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -1,12 +1,12 @@ # stap_run TEST_NAME LOAD_GEN_FUNCTION OUTPUT_CHECK_STRING -# TEST_NAME is path to the current test +# TEST_NAME is a test name string # LOAD_GEN_FUNCTION (optional) to produce something to measure # returns 0 if successful # returns 1 if there was a problem # OUTPUT_CHECK_STRING (optional) examines the output of experiment # returns 0 if successful # returns 1 if there was a problem -# Additional arguments are passed to stap as-is. +# Additional arguments are passed to stap as-is, including a test file .stp name. # # As a side-effect, global 'probe_errors' and 'skipped_probes' are set # to the number of probe errors and skipped probes seen while @@ -34,9 +34,10 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } set cmd [concat stap -v $args] - if [file readable $test_file_name] { - lappend cmd $test_file_name - } + + # don't the following: ... $test_file_name could be some transient or leftover file + # if [file readable $test_file_name] { lappend cmd $test_file_name } + send_log "executing: $cmd\n" eval spawn $cmd set mypid [exp_pid -i $spawn_id] diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp index 66ff3ece4..76ba10e6d 100644 --- a/testsuite/lib/stap_run2.exp +++ b/testsuite/lib/stap_run2.exp @@ -19,17 +19,16 @@ proc stap_run2 { TEST_NAME args } { } } -# stap_run3 TEST_NAME TEST_FILE +# stap_run3 TEST_NAME args # TEST_NAME is the name of the test as shown in PASS/FAIL/SKIPPED messages. -# TEST_FILE is the path to the current test -# Additional arguments are passed to stap as-is. +# Additional arguments are passed to stap as-is, including likely a TEST_FILE name. # # global result_string must be set to the expected output -proc stap_run3 { TEST_NAME TEST_FILE args } { +proc stap_run3 { TEST_NAME args } { if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } - set cmd [concat stap $TEST_FILE $args] + set cmd [concat stap $args] send_log "executing: $cmd\n" catch {eval exec $cmd} res diff --git a/testsuite/systemtap.base/add.exp b/testsuite/systemtap.base/add.exp index 775abcb0e..0b215ab9c 100644 --- a/testsuite/systemtap.base/add.exp +++ b/testsuite/systemtap.base/add.exp @@ -3,9 +3,9 @@ set test "add" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/alias-condition.exp b/testsuite/systemtap.base/alias-condition.exp index 3bd8237c3..f1df91e7a 100644 --- a/testsuite/systemtap.base/alias-condition.exp +++ b/testsuite/systemtap.base/alias-condition.exp @@ -4,9 +4,9 @@ set test "alias-condition" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/alias-epilog.exp b/testsuite/systemtap.base/alias-epilog.exp index cefee81f9..5b3bb2738 100644 --- a/testsuite/systemtap.base/alias-epilog.exp +++ b/testsuite/systemtap.base/alias-epilog.exp @@ -5,9 +5,9 @@ if {![installtest_p]} { untested "$test"; return } foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/alias-prolog.exp b/testsuite/systemtap.base/alias-prolog.exp index 787db48ad..6e5bd42ea 100644 --- a/testsuite/systemtap.base/alias-prolog.exp +++ b/testsuite/systemtap.base/alias-prolog.exp @@ -5,9 +5,9 @@ if {![installtest_p]} { untested "$test"; return } foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/alias_suffixes.exp b/testsuite/systemtap.base/alias_suffixes.exp index 2829ed571..63fe1cc77 100644 --- a/testsuite/systemtap.base/alias_suffixes.exp +++ b/testsuite/systemtap.base/alias_suffixes.exp @@ -3,10 +3,10 @@ foreach runtime [get_runtime_list] { foreach ix {01 02 03 04 05} { set test "alias suffixes $ix" if {$runtime != ""} { - stap_run "$file$ix.stp" no_load $all_pass_string \ - --runtime=$runtime + stap_run "alias_suffixes$ix" no_load $all_pass_string \ + --runtime=$runtime "$file$ix.stp" } else { - stap_run "$file$ix.stp" no_load $all_pass_string + stap_run "alias_suffixes$ix" no_load $all_pass_string "$file$ix.stp" } } } diff --git a/testsuite/systemtap.base/arith.exp b/testsuite/systemtap.base/arith.exp index 25405ef1c..f11625ce9 100644 --- a/testsuite/systemtap.base/arith.exp +++ b/testsuite/systemtap.base/arith.exp @@ -3,7 +3,7 @@ if {![installtest_p]} { untested $test; return } foreach runtime [get_runtime_list] { set test "arith" - set args "" + set args "--vp=0" if {$runtime != ""} { lappend test "($runtime)" set args "--runtime=$runtime" diff --git a/testsuite/systemtap.base/arith_limits.exp b/testsuite/systemtap.base/arith_limits.exp index bb6241fcd..a7b69c482 100644 --- a/testsuite/systemtap.base/arith_limits.exp +++ b/testsuite/systemtap.base/arith_limits.exp @@ -3,7 +3,7 @@ if {![installtest_p]} { untested $test; return } foreach runtime [get_runtime_list] { set test "arith_limits" - set args "" + set args "--vp=0" if {$runtime != ""} { lappend test "($runtime)" set args "--runtime=$runtime" diff --git a/testsuite/systemtap.base/array_size.exp b/testsuite/systemtap.base/array_size.exp index cd8fdabcb..afb0dc5a9 100644 --- a/testsuite/systemtap.base/array_size.exp +++ b/testsuite/systemtap.base/array_size.exp @@ -4,9 +4,9 @@ set test "array_size" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - -DMAXMAPENTRIES=1 --runtime=$runtime + stap_run $test no_load $all_pass_string \ + -DMAXMAPENTRIES=1 --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -DMAXMAPENTRIES=1 + stap_run $test no_load $all_pass_string -DMAXMAPENTRIES=1 $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/be_order.exp b/testsuite/systemtap.base/be_order.exp index eeae81841..4c691aa97 100644 --- a/testsuite/systemtap.base/be_order.exp +++ b/testsuite/systemtap.base/be_order.exp @@ -3,9 +3,9 @@ set test "be_order" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/beginenderror.exp b/testsuite/systemtap.base/beginenderror.exp index a7ff8ba5c..10fa5ddbe 100644 --- a/testsuite/systemtap.base/beginenderror.exp +++ b/testsuite/systemtap.base/beginenderror.exp @@ -4,12 +4,10 @@ if {![installtest_p]} {untested $test; return} foreach runtime [get_runtime_list] { set test "beginenderror" + set args "--vp=0" if {$runtime != ""} { lappend test "($runtime)" set args "--runtime=$runtime" - } else { - # set it to transparent nonempty string - set args "--vp=0" } # The VERREL stuff is just for compile-testing that option; it plays no diff --git a/testsuite/systemtap.base/bitfield.exp b/testsuite/systemtap.base/bitfield.exp index 164513691..5086c5492 100644 --- a/testsuite/systemtap.base/bitfield.exp +++ b/testsuite/systemtap.base/bitfield.exp @@ -1,3 +1,3 @@ # test that bitfield r/w works correctly set test "bitfield" -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g +stap_run $test no_load $all_pass_string -g $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/break_and_continue.exp b/testsuite/systemtap.base/break_and_continue.exp index 0ddfdb9a8..248b3d748 100644 --- a/testsuite/systemtap.base/break_and_continue.exp +++ b/testsuite/systemtap.base/break_and_continue.exp @@ -4,10 +4,10 @@ set test "break_and_continue" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime -w + stap_run $test no_load $all_pass_string \ + --runtime=$runtime -w $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - -w + stap_run $test no_load $all_pass_string \ + -w $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/deref.exp b/testsuite/systemtap.base/deref.exp index e87818de3..cb1edcb9f 100644 --- a/testsuite/systemtap.base/deref.exp +++ b/testsuite/systemtap.base/deref.exp @@ -3,9 +3,9 @@ set test "deref" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g \ - --runtime=$runtime + stap_run $test no_load $all_pass_string -g \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g + stap_run $test no_load $all_pass_string -g $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/div0.exp b/testsuite/systemtap.base/div0.exp index 00a0f251b..096a922b6 100644 --- a/testsuite/systemtap.base/div0.exp +++ b/testsuite/systemtap.base/div0.exp @@ -6,10 +6,10 @@ set output_string {ERROR: division by 0 near[^\r\n]+\r\n} foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $output_string \ - --runtime=$runtime + stap_run $test no_load $output_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $output_string + stap_run $test no_load $output_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/equal.exp b/testsuite/systemtap.base/equal.exp index c9762bc91..9421c04dd 100644 --- a/testsuite/systemtap.base/equal.exp +++ b/testsuite/systemtap.base/equal.exp @@ -5,4 +5,4 @@ set test "equal" # better have a count other than zero to show that probe fired set output_string "count = \[1-9\]\[0-9\]*\r\ncount2 = \[1-9\]\[0-9\]*\r\nsystemtap test success\r\n" -stap_run $srcdir/$subdir/$test.stp no_load $output_string +stap_run $test no_load $output_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/error_fn.exp b/testsuite/systemtap.base/error_fn.exp index 766f66bc8..c68a07523 100644 --- a/testsuite/systemtap.base/error_fn.exp +++ b/testsuite/systemtap.base/error_fn.exp @@ -5,10 +5,10 @@ set test "error_fn" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load "ERROR: synthetic error\r\n" \ - --runtime=$runtime + stap_run $test no_load "ERROR: synthetic error\r\n" \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load "ERROR: synthetic error\r\n" + stap_run $test no_load "ERROR: synthetic error\r\n" $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/finloop2.exp b/testsuite/systemtap.base/finloop2.exp index ba31a91eb..e551ecbb7 100644 --- a/testsuite/systemtap.base/finloop2.exp +++ b/testsuite/systemtap.base/finloop2.exp @@ -6,4 +6,4 @@ set test "finloop2" # better have a count other than zero to show that probe fired set output_string "count = \[1-9\]\[0-9\]*\r\nloop_count = \[1-9\]\[0-9\]*\r\nsystemtap test success\r\n" -stap_run $srcdir/$subdir/$test.stp no_load $output_string +stap_run $test no_load $output_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/func_definition.exp b/testsuite/systemtap.base/func_definition.exp index 65abdb571..6598aeea5 100644 --- a/testsuite/systemtap.base/func_definition.exp +++ b/testsuite/systemtap.base/func_definition.exp @@ -5,9 +5,9 @@ if {![installtest_p]} { untested "$test"; return } foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load (${all_pass_string}){5} \ - --runtime=$runtime + stap_run $test no_load (${all_pass_string}){5} \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load (${all_pass_string}){5} + stap_run $test no_load (${all_pass_string}){5} $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/global_init.exp b/testsuite/systemtap.base/global_init.exp index 040ac4417..ff5e69f33 100644 --- a/testsuite/systemtap.base/global_init.exp +++ b/testsuite/systemtap.base/global_init.exp @@ -4,9 +4,9 @@ set test "global_init" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/global_vars.exp b/testsuite/systemtap.base/global_vars.exp index 6e2d8472c..1c8b472aa 100644 --- a/testsuite/systemtap.base/global_vars.exp +++ b/testsuite/systemtap.base/global_vars.exp @@ -4,9 +4,9 @@ set test "global_vars" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/if.exp b/testsuite/systemtap.base/if.exp index 076287348..899f17816 100644 --- a/testsuite/systemtap.base/if.exp +++ b/testsuite/systemtap.base/if.exp @@ -5,9 +5,9 @@ set test "if" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/inc.exp b/testsuite/systemtap.base/inc.exp index 5b56792b9..58557e1a0 100644 --- a/testsuite/systemtap.base/inc.exp +++ b/testsuite/systemtap.base/inc.exp @@ -4,9 +4,9 @@ set test "inc" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/inlinedvars.exp b/testsuite/systemtap.base/inlinedvars.exp index d56cb29f9..97875686f 100644 --- a/testsuite/systemtap.base/inlinedvars.exp +++ b/testsuite/systemtap.base/inlinedvars.exp @@ -32,10 +32,10 @@ for {set i 0} {$i < [all_compile_flags]} {incr i} { if {$runtime != ""} { if {[info procs ${runtime}_kfails] ne ""} { ${runtime}_kfails $i } stap_run3 "$test-$extra_name-$runtime" $srcdir/$subdir/$test.stp \ - $test.exe -c ./$test.exe --runtime=$runtime + -c ./$test.exe --runtime=$runtime } elseif {[uprobes_p]} { stap_run3 "$test-$extra_name" $srcdir/$subdir/$test.stp \ - $test.exe -c ./$test.exe + -c ./$test.exe } else { untested "$test-$extra_name" } diff --git a/testsuite/systemtap.base/kfunct.exp b/testsuite/systemtap.base/kfunct.exp index cb32af280..ee0363616 100644 --- a/testsuite/systemtap.base/kfunct.exp +++ b/testsuite/systemtap.base/kfunct.exp @@ -6,4 +6,4 @@ set test "kfunct" # better have a count other than zero to show that probe fired set output_string "count = \[1-9\]\[0-9\]*\r\n" -stap_run $srcdir/$subdir/$test.stp no_load $output_string +stap_run $test no_load $output_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/kmodule.exp b/testsuite/systemtap.base/kmodule.exp index 3fc2694af..39485edd0 100644 --- a/testsuite/systemtap.base/kmodule.exp +++ b/testsuite/systemtap.base/kmodule.exp @@ -108,10 +108,10 @@ if {[build_and_install_module] == 0} { } # Test 'module("foo").function("bar") -stap_run $srcdir/$subdir/$test.stp kmodule_load $output_string +stap_run $test kmodule_load $output_string $srcdir/$subdir/$test.stp # Test 'kprobe.module("foo").function("bar") -stap_run $srcdir/$subdir/$test2.stp kmodule_load $output_string +stap_run $test2 kmodule_load $output_string $srcdir/$subdir/$test2.stp # Now let's test and see if the same scripts work when the test module # is loaded *after* the systemtap script starts. diff --git a/testsuite/systemtap.base/kprobes.exp b/testsuite/systemtap.base/kprobes.exp index 307dc5e12..d6e307537 100644 --- a/testsuite/systemtap.base/kprobes.exp +++ b/testsuite/systemtap.base/kprobes.exp @@ -1,2 +1,2 @@ set test "kprobes" -stap_run $srcdir/$subdir/$test.stp no_load "probe point hit\r\n" +stap_run $test no_load "probe point hit\r\n" $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/kretprobe-vars.exp b/testsuite/systemtap.base/kretprobe-vars.exp index ec6766d30..302ba35f5 100644 --- a/testsuite/systemtap.base/kretprobe-vars.exp +++ b/testsuite/systemtap.base/kretprobe-vars.exp @@ -1,4 +1,4 @@ # Check that implicitly-saved $target variables have the same # value as those manually saved on entry. set test "kretprobe-vars" -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -c "cat /dev/null" -w +stap_run $test no_load $all_pass_string -c "cat /dev/null" -w $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/logical_and.exp b/testsuite/systemtap.base/logical_and.exp index 0e52e681a..2442649b1 100644 --- a/testsuite/systemtap.base/logical_and.exp +++ b/testsuite/systemtap.base/logical_and.exp @@ -4,9 +4,9 @@ set test "logical_and" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/not.exp b/testsuite/systemtap.base/not.exp index 5245f9693..8831aaec9 100644 --- a/testsuite/systemtap.base/not.exp +++ b/testsuite/systemtap.base/not.exp @@ -4,9 +4,9 @@ set test "not" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/optim_voidstmt.exp b/testsuite/systemtap.base/optim_voidstmt.exp index 38dbf4442..709d7e5f2 100644 --- a/testsuite/systemtap.base/optim_voidstmt.exp +++ b/testsuite/systemtap.base/optim_voidstmt.exp @@ -4,9 +4,9 @@ set test "optim_voidstmt" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime -w -g + stap_run $test no_load $all_pass_string \ + --runtime=$runtime -w -g $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -w -g + stap_run $test no_load $all_pass_string -w -g $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/print.exp b/testsuite/systemtap.base/print.exp index b0387f43e..6636830b6 100644 --- a/testsuite/systemtap.base/print.exp +++ b/testsuite/systemtap.base/print.exp @@ -5,9 +5,9 @@ set test "print" set output_string "(${all_pass_string}){9}" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $output_string \ - --runtime=$runtime + stap_run $test no_load $output_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $output_string + stap_run $test no_load $output_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/pt_user_mode.exp b/testsuite/systemtap.base/pt_user_mode.exp index 79bc11e63..e881e36bd 100644 --- a/testsuite/systemtap.base/pt_user_mode.exp +++ b/testsuite/systemtap.base/pt_user_mode.exp @@ -17,4 +17,4 @@ proc run_test_load {} { return 0 } -stap_run $srcdir/$subdir/$test.stp run_test_load $all_pass_string +stap_run $test run_test_load $all_pass_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/set_kernel.exp b/testsuite/systemtap.base/set_kernel.exp index 99dc99f46..9534c6f67 100644 --- a/testsuite/systemtap.base/set_kernel.exp +++ b/testsuite/systemtap.base/set_kernel.exp @@ -2,4 +2,4 @@ set test "set_kernel" -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g +stap_run $test no_load $all_pass_string -g $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/sigusr2.exp b/testsuite/systemtap.base/sigusr2.exp index 76ec28a54..7c5c20465 100644 --- a/testsuite/systemtap.base/sigusr2.exp +++ b/testsuite/systemtap.base/sigusr2.exp @@ -6,7 +6,7 @@ set test "sigusr2" -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -g +stap_run $test no_load $all_pass_string -g $srcdir/$subdir/$test.stp # PR19525: In bulk-mode (-b), close_relayfs() expects SIGUSR2 to cause EINTR on # the relay threads, so it can't be SIG_IGN. But the output is written to diff --git a/testsuite/systemtap.base/simple.exp b/testsuite/systemtap.base/simple.exp index d83cf0231..b84210293 100644 --- a/testsuite/systemtap.base/simple.exp +++ b/testsuite/systemtap.base/simple.exp @@ -8,7 +8,7 @@ set test "simple" #should be error is something else is printed. foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp "" "" --runtime=$runtime + stap_run $test "" "" --runtime=$runtime $srcdir/$subdir/$test.stp } else { stap_run $srcdir/$subdir/$test.stp } diff --git a/testsuite/systemtap.base/timers.exp b/testsuite/systemtap.base/timers.exp index d50db35a9..ccac2c4cc 100644 --- a/testsuite/systemtap.base/timers.exp +++ b/testsuite/systemtap.base/timers.exp @@ -13,4 +13,4 @@ proc sleep_ten_secs {} { #should be error is something else is printed. set output_string "(\\w+ = \\d+\r\n){17}(${all_pass_string}){10}(WARNING.*skipped.*)?" -stap_run $srcdir/$subdir/$test.stp sleep_ten_secs $output_string +stap_run $test sleep_ten_secs $output_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/tri.exp b/testsuite/systemtap.base/tri.exp index c9802841c..8a8735bcd 100644 --- a/testsuite/systemtap.base/tri.exp +++ b/testsuite/systemtap.base/tri.exp @@ -4,9 +4,9 @@ set test "tri" foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.base/try_assign.exp b/testsuite/systemtap.base/try_assign.exp index df9c1d653..12668fe14 100644 --- a/testsuite/systemtap.base/try_assign.exp +++ b/testsuite/systemtap.base/try_assign.exp @@ -6,10 +6,10 @@ if {! [installtest_p]} { untested $test_file_name; return } foreach runtime [get_runtime_list] { if {$runtime != ""} { lappend test "($runtime)" - stap_run $srcdir/$subdir/$test_file_name.stp no_load $all_pass_string \ - --runtime=$runtime + stap_run $test no_load $all_pass_string \ + --runtime=$runtime $srcdir/$subdir/$test_file_name.stp } else { - stap_run $srcdir/$subdir/$test_file_name.stp no_load $all_pass_string + stap_run $test no_load $all_pass_string $srcdir/$subdir/$test_file_name.stp } } diff --git a/testsuite/systemtap.base/var_scope.exp b/testsuite/systemtap.base/var_scope.exp index be7af3c24..b70c7d086 100644 --- a/testsuite/systemtap.base/var_scope.exp +++ b/testsuite/systemtap.base/var_scope.exp @@ -5,10 +5,10 @@ if {![installtest_p]} { untested "$test"; return } foreach runtime [get_runtime_list] { if {$runtime != ""} { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - --runtime=$runtime -w + stap_run $test no_load $all_pass_string \ + --runtime=$runtime -w $srcdir/$subdir/$test.stp } else { - stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \ - -w + stap_run $test no_load $all_pass_string \ + -w $srcdir/$subdir/$test.stp } } diff --git a/testsuite/systemtap.printf/memory1.exp b/testsuite/systemtap.printf/memory1.exp index c21f4264d..2f255673f 100644 --- a/testsuite/systemtap.printf/memory1.exp +++ b/testsuite/systemtap.printf/memory1.exp @@ -76,7 +76,7 @@ if {[build_and_install_module] == 0} { # Note that we don't test other runtimes here since the script uses a # kernel module -stap_run $srcdir/$subdir/$test.stp memory1_load $result_string -stap_run $srcdir/$subdir/$test.stp memory1_load $result_string -DSTP_LEGACY_PRINT +stap_run $test memory1_load $result_string $srcdir/$subdir/$test.stp +stap_run $test memory1_load $result_string -DSTP_LEGACY_PRINT $srcdir/$subdir/$test.stp cleanup_module diff --git a/testsuite/systemtap.printf/print_user_buffer.exp b/testsuite/systemtap.printf/print_user_buffer.exp index c4eb7276a..bdabd51a6 100644 --- a/testsuite/systemtap.printf/print_user_buffer.exp +++ b/testsuite/systemtap.printf/print_user_buffer.exp @@ -14,4 +14,4 @@ if { $res != ""} { } else { pass "$test compile" } -stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string -c "$exefile > /dev/null" +stap_run $test no_load $all_pass_string -c "$exefile > /dev/null" $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.samples/tcptest.exp b/testsuite/systemtap.samples/tcptest.exp index 23c5301a8..062ccb668 100644 --- a/testsuite/systemtap.samples/tcptest.exp +++ b/testsuite/systemtap.samples/tcptest.exp @@ -9,4 +9,4 @@ proc tcp_gen { } { set output_header "UID\tPID\tSIZE\tNAME\t\t\tPORT\tSOURCE\t\tRTO\tRCVMSS\tSSTHRES\tCWND\tSTATE\r\n" set output_rows "((\\d+\t\\d+\t\\d+\t\\S+\t\t\t\\d+\t\\S*\t\\d+\t\\d+\t\\d+\t\\d+\t\\d+)?\r\n){5}" set output_string "TCP totalbytes: \\d+\r\n$output_header$output_rows" -stap_run $srcdir/$subdir/$test.stp tcp_gen $output_string +stap_run $test tcp_gen $output_string $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.stress/current.exp b/testsuite/systemtap.stress/current.exp index 31750c000..2530cd940 100644 --- a/testsuite/systemtap.stress/current.exp +++ b/testsuite/systemtap.stress/current.exp @@ -5,4 +5,4 @@ set test "current" set output_string "(\\w+ = \\d+\r\n){5}(${all_pass_string}){2}(WARNING.*skipped.*)?" -stap_run $srcdir/$subdir/$test.stp gen_load $output_string -g -w +stap_run $test gen_load $output_string -g -w $srcdir/$subdir/$test.stp -- 2.43.5