From 36aec63f013db276bb0097446bc0d70a17b8401e Mon Sep 17 00:00:00 2001 From: David Smith Date: Tue, 2 Oct 2012 10:04:05 -0500 Subject: [PATCH] (PR14574 partial fix) Make the systemtap.maps/*.exp tests use dyninst also. * testsuite/systemtap.maps/absentstats.exp: Added dyninst testing. * testsuite/systemtap.maps/elision.exp: Ditto. * testsuite/systemtap.maps/exists.exp: Ditto. * testsuite/systemtap.maps/foreach_fail.exp: Ditto. * testsuite/systemtap.maps/foreach_limit.exp: Ditto. * testsuite/systemtap.maps/foreach_limit2.exp: Ditto. * testsuite/systemtap.maps/hist_in_string.exp: Ditto. * testsuite/systemtap.maps/ii.exp: Ditto. * testsuite/systemtap.maps/iiiiii.exp: Ditto. * testsuite/systemtap.maps/is.exp: Ditto. * testsuite/systemtap.maps/ix.exp: Ditto. * testsuite/systemtap.maps/ix_clear.exp: Ditto. * testsuite/systemtap.maps/ix_clear2.exp: Ditto. * testsuite/systemtap.maps/ix_clear3.exp: Ditto. * testsuite/systemtap.maps/ix_hist.exp: Ditto. * testsuite/systemtap.maps/linear.exp: Ditto. * testsuite/systemtap.maps/linear_0.exp: Ditto. * testsuite/systemtap.maps/linear_bad.exp: Ditto. * testsuite/systemtap.maps/linear_empty.exp: Ditto. * testsuite/systemtap.maps/linear_large.exp: Ditto. * testsuite/systemtap.maps/linear_large_neg.exp: Ditto. * testsuite/systemtap.maps/linear_nearlyempty.exp: Ditto. * testsuite/systemtap.maps/linear_neg.exp: Ditto. * testsuite/systemtap.maps/linear_over.exp: Ditto. * testsuite/systemtap.maps/linear_overunder.exp: Ditto. * testsuite/systemtap.maps/linear_under.exp: Ditto. * testsuite/systemtap.maps/log.exp: Ditto. * testsuite/systemtap.maps/log_edge.exp: Ditto. * testsuite/systemtap.maps/map_hash.exp: Ditto. * testsuite/systemtap.maps/map_wrap.exp: Ditto. * testsuite/systemtap.pass1-4/debugtypes.exp: Ditto. --- testsuite/systemtap.maps/absentstats.exp | 92 +++++++++++-------- testsuite/systemtap.maps/elision.exp | 19 ++-- testsuite/systemtap.maps/exists.exp | 10 +- testsuite/systemtap.maps/foreach_fail.exp | 28 ++++-- testsuite/systemtap.maps/foreach_limit.exp | 10 +- testsuite/systemtap.maps/foreach_limit2.exp | 10 +- testsuite/systemtap.maps/hist_in_string.exp | 8 +- testsuite/systemtap.maps/ii.exp | 10 +- testsuite/systemtap.maps/iiiiii.exp | 10 +- testsuite/systemtap.maps/is.exp | 10 +- testsuite/systemtap.maps/ix.exp | 10 +- testsuite/systemtap.maps/ix_clear.exp | 41 +++++---- testsuite/systemtap.maps/ix_clear2.exp | 40 ++++---- testsuite/systemtap.maps/ix_clear3.exp | 40 ++++---- testsuite/systemtap.maps/ix_hist.exp | 10 +- testsuite/systemtap.maps/linear.exp | 10 +- testsuite/systemtap.maps/linear_0.exp | 40 ++++---- testsuite/systemtap.maps/linear_bad.exp | 39 +++++--- testsuite/systemtap.maps/linear_empty.exp | 8 +- testsuite/systemtap.maps/linear_large.exp | 10 +- testsuite/systemtap.maps/linear_large_neg.exp | 10 +- .../systemtap.maps/linear_nearlyempty.exp | 10 +- testsuite/systemtap.maps/linear_neg.exp | 40 ++++---- testsuite/systemtap.maps/linear_over.exp | 10 +- testsuite/systemtap.maps/linear_overunder.exp | 10 +- testsuite/systemtap.maps/linear_under.exp | 10 +- testsuite/systemtap.maps/log.exp | 10 +- testsuite/systemtap.maps/log_edge.exp | 10 +- testsuite/systemtap.maps/map_hash.exp | 54 +++++++++-- testsuite/systemtap.maps/map_wrap.exp | 17 +++- testsuite/systemtap.pass1-4/debugtypes.exp | 14 ++- 31 files changed, 436 insertions(+), 214 deletions(-) diff --git a/testsuite/systemtap.maps/absentstats.exp b/testsuite/systemtap.maps/absentstats.exp index ab9cd7221..212429e1e 100644 --- a/testsuite/systemtap.maps/absentstats.exp +++ b/testsuite/systemtap.maps/absentstats.exp @@ -1,44 +1,62 @@ # PR 2142+2610 set test "absentstats" +set script $srcdir/$subdir/$test.stp if {![installtest_p]} { untested $test; return } -set ok 0 -set ko 0 - -spawn stap -DMAXERRORS=20 $srcdir/$subdir/$test.stp -# spawn echo hello children 0 -expect { - -timeout 150 - -re {^ERROR: empty aggregate[^\r]*\r} { incr ko ; exp_continue } - -re {^WARNING: Number of errors} { incr ko ; exp_continue } - -re {^0\r} { incr ok ; exp_continue } - -re {\n} { exp_continue } - eof { } +foreach runtime [get_runtime_list] { + set ok 0 + set ko 0 + + set testname $test + if {$runtime != ""} { + spawn stap -DMAXERRORS=20 --runtime=$runtime $script + lappend testname "($runtime)" + } else { + spawn stap -DMAXERRORS=20 $script + } + expect { + -timeout 150 + -re {^ERROR: empty aggregate[^\r]*\r} { incr ko ; exp_continue } + -re {^WARNING: Number of errors} { incr ko ; exp_continue } + -re {^0\r} { incr ok ; exp_continue } + -re {\n} { exp_continue } + eof { } + } + catch close + wait + + # As of stap 1.5, @count and @sum are allowed, the rest fail + if {$ok == 4 && $ko == 11} { + pass $testname + } else { + fail "$testname ($ok $ko)" + } + + set ok 0 + set ko 0 + + if {$runtime != ""} { + spawn stap -DMAXERRORS=20 --runtime=$runtime $script --compatible=1.4 + } else { + spawn stap -DMAXERRORS=20 $script --compatible=1.4 + } + expect { + -timeout 150 + -re {^ERROR: empty aggregate[^\r]*\r} { incr ko ; exp_continue } + -re {^WARNING: Number of errors} { incr ko ; exp_continue } + -re {^0\r} { incr ok ; exp_continue } + -re {\n} { exp_continue } + eof { } + } + catch close + wait + + # In stap <= 1.4, only @count is allowed, the rest fail + if {$ok == 2 && $ko == 13} { + pass "$testname 1.4" + } else { + fail "$testname 1.4 ($ok $ko)" + } } -catch close -wait - -# As of stap 1.5, @count and @sum are allowed, the rest fail -if {$ok == 4 && $ko == 11} then { pass $test } else { fail "$test ($ok $ko)" } - - -set ok 0 -set ko 0 - -spawn stap -DMAXERRORS=20 $srcdir/$subdir/$test.stp --compatible=1.4 -# spawn echo hello children 0 -expect { - -timeout 150 - -re {^ERROR: empty aggregate[^\r]*\r} { incr ko ; exp_continue } - -re {^WARNING: Number of errors} { incr ko ; exp_continue } - -re {^0\r} { incr ok ; exp_continue } - -re {\n} { exp_continue } - eof { } -} -catch close -wait - -# In stap <= 1.4, only @count is allowed, the rest fail -if {$ok == 2 && $ko == 13} then { pass "$test 1.4" } else { fail "$test 1.4 ($ok $ko)" } diff --git a/testsuite/systemtap.maps/elision.exp b/testsuite/systemtap.maps/elision.exp index 60c52bbe5..6c238a88f 100644 --- a/testsuite/systemtap.maps/elision.exp +++ b/testsuite/systemtap.maps/elision.exp @@ -388,10 +388,17 @@ value |-------------------------------------------------- count } -for {set i -1} { $i < 4} {incr i} { - set test "elision-$i" - set ::result_string $myresults($i) - stap_run_exact "elision$i" $srcdir/$subdir/elision.stp -DHIST_ELISION=$i +set script $srcdir/$subdir/elision.stp +foreach runtime [get_runtime_list] { + for {set i -1} { $i < 4} {incr i} { + set test "elision$i" + set ::result_string $myresults($i) + + if {$runtime != ""} { + lappend test "($runtime)" + stap_run_exact $test $script -DHIST_ELISION=$i --runtime=$runtime + } else { + stap_run_exact $test $script -DHIST_ELISION=$i + } + } } - - diff --git a/testsuite/systemtap.maps/exists.exp b/testsuite/systemtap.maps/exists.exp index bbdac737c..3e96b08e4 100644 --- a/testsuite/systemtap.maps/exists.exp +++ b/testsuite/systemtap.maps/exists.exp @@ -11,6 +11,10 @@ emtpy string there hello there emtpy string still there} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/foreach_fail.exp b/testsuite/systemtap.maps/foreach_fail.exp index 75fcfcc4d..f1d3593bd 100644 --- a/testsuite/systemtap.maps/foreach_fail.exp +++ b/testsuite/systemtap.maps/foreach_fail.exp @@ -5,14 +5,22 @@ set test foreach_fail if {![installtest_p]} { untested $test; return } -spawn stap $srcdir/$subdir/$test.stp -expect { - -timeout 60 - timeout { - fail "$test timed out" } - eof { - fail "$test unexpected EOF" } - -re "semantic error:" { pass "$test correctly failed to compile" } +foreach runtime [get_runtime_list] { + set testname $test + if {$runtime != ""} { + spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp + lappend testname "($runtime)" + } else { + spawn stap $srcdir/$subdir/$test.stp + } + expect { + -timeout 60 + timeout { + fail "$testname timed out" } + eof { + fail "$testname unexpected EOF" } + -re "semantic error:" { pass "$testname correctly failed to compile" } + } + close + wait } -close -wait diff --git a/testsuite/systemtap.maps/foreach_limit.exp b/testsuite/systemtap.maps/foreach_limit.exp index 4cc87ec8a..d460cecdd 100644 --- a/testsuite/systemtap.maps/foreach_limit.exp +++ b/testsuite/systemtap.maps/foreach_limit.exp @@ -96,6 +96,10 @@ loop had 71 iterations Done.} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/foreach_limit2.exp b/testsuite/systemtap.maps/foreach_limit2.exp index 7988355c5..7d02e6347 100644 --- a/testsuite/systemtap.maps/foreach_limit2.exp +++ b/testsuite/systemtap.maps/foreach_limit2.exp @@ -84,6 +84,10 @@ x ended up as 5 Done.} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/hist_in_string.exp b/testsuite/systemtap.maps/hist_in_string.exp index 02f201afd..160338f78 100644 --- a/testsuite/systemtap.maps/hist_in_string.exp +++ b/testsuite/systemtap.maps/hist_in_string.exp @@ -5,4 +5,10 @@ set ::result_string {value |-------------------------------------------------- c 0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 128 } -stap_run2 $srcdir/$subdir/$test.stp +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/ii.exp b/testsuite/systemtap.maps/ii.exp index 1f4a972a2..e32cd93ad 100644 --- a/testsuite/systemtap.maps/ii.exp +++ b/testsuite/systemtap.maps/ii.exp @@ -63,6 +63,10 @@ foo[8] = 204 foo[9] = 285 foo[10] = 385} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/iiiiii.exp b/testsuite/systemtap.maps/iiiiii.exp index aeddbbacb..a057250ec 100644 --- a/testsuite/systemtap.maps/iiiiii.exp +++ b/testsuite/systemtap.maps/iiiiii.exp @@ -66,6 +66,10 @@ foo[1,1,1,0,1] = 4 foo[1,1,1,1,0] = 4 foo[1,1,1,1,1] = 5} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/is.exp b/testsuite/systemtap.maps/is.exp index 31e96e776..ea61068dc 100644 --- a/testsuite/systemtap.maps/is.exp +++ b/testsuite/systemtap.maps/is.exp @@ -63,6 +63,10 @@ foo[8] = # 64 foo[9] = # 81 foo[10] = # 100} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/ix.exp b/testsuite/systemtap.maps/ix.exp index 11de73c17..fdd6e8d46 100644 --- a/testsuite/systemtap.maps/ix.exp +++ b/testsuite/systemtap.maps/ix.exp @@ -43,6 +43,10 @@ foo[10]: count:4 sum:118 avg:29 min:-2 max:100 Run a quick foreach without sorting... complete sum of foo:1243} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/ix_clear.exp b/testsuite/systemtap.maps/ix_clear.exp index 074178980..ab66d94ad 100644 --- a/testsuite/systemtap.maps/ix_clear.exp +++ b/testsuite/systemtap.maps/ix_clear.exp @@ -5,21 +5,28 @@ if {![installtest_p]} { untested $test; return } set pass_result {foo\[1\] = 1 1*ERROR: empty aggregate*} - -# spawn test -spawn stap $srcdir/$subdir/$test.stp -expect { - -timeout 150 - $pass_result { - pass "$test passed" - } - timeout { - exec kill -INT -[exp_pid] - fail "$test timed out" - } - eof { - fail "$test unexpected EOF" } - -re "semantic error:" { fail "$test compilation" } +foreach runtime [get_runtime_list] { + # spawn test + set testname $test + if {$runtime != ""} { + spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp + lappend testname "($runtime)" + } else { + spawn stap $srcdir/$subdir/$test.stp + } + expect { + -timeout 150 + $pass_result { + pass "$testname passed" + } + timeout { + exec kill -INT -[exp_pid] + fail "$testname timed out" + } + eof { + fail "$testname unexpected EOF" } + -re "semantic error:" { fail "$testname compilation" } + } + catch { close } + wait } -catch { close } -wait diff --git a/testsuite/systemtap.maps/ix_clear2.exp b/testsuite/systemtap.maps/ix_clear2.exp index a1b68628c..2679483b3 100644 --- a/testsuite/systemtap.maps/ix_clear2.exp +++ b/testsuite/systemtap.maps/ix_clear2.exp @@ -7,20 +7,28 @@ if {![installtest_p]} { untested $test; return } set pass_result {foo\[1\] = 1 1*ERROR: empty aggregate*} -# spawn test -spawn stap $srcdir/$subdir/$test.stp -expect { - -timeout 150 - $pass_result { - pass "$test passed" - } - timeout { - exec kill -INT -[exp_pid] - fail "$test timed out" - } - eof { - fail "$test unexpected EOF" } - -re "semantic error:" { fail "$test compilation" } +foreach runtime [get_runtime_list] { + # spawn test + set testname $test + if {$runtime != ""} { + spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp + lappend testname "($runtime)" + } else { + spawn stap $srcdir/$subdir/$test.stp + } + expect { + -timeout 150 + $pass_result { + pass "$testname passed" + } + timeout { + exec kill -INT -[exp_pid] + fail "$testname timed out" + } + eof { + fail "$testname unexpected EOF" } + -re "semantic error:" { fail "$testname compilation" } + } + catch { close } + wait } -catch { close } -wait diff --git a/testsuite/systemtap.maps/ix_clear3.exp b/testsuite/systemtap.maps/ix_clear3.exp index a29354708..cb51da86a 100644 --- a/testsuite/systemtap.maps/ix_clear3.exp +++ b/testsuite/systemtap.maps/ix_clear3.exp @@ -5,20 +5,28 @@ if {![installtest_p]} { untested $test; return } set pass_result {*ERROR: empty aggregate*} -# spawn test -spawn stap $srcdir/$subdir/$test.stp -expect { - -timeout 150 - $pass_result { - pass "$test passed" - } - timeout { - exec kill -INT -[exp_pid] - fail "$test timed out" - } - eof { - fail "$test unexpected EOF" } - -re "semantic error:" { fail "$test compilation" } +foreach runtime [get_runtime_list] { + # spawn test + set testname $test + if {$runtime != ""} { + spawn stap --runtime=$runtime $srcdir/$subdir/$test.stp + lappend testname "($runtime)" + } else { + spawn stap $srcdir/$subdir/$test.stp + } + expect { + -timeout 150 + $pass_result { + pass "$testname passed" + } + timeout { + exec kill -INT -[exp_pid] + fail "$testname timed out" + } + eof { + fail "$testname unexpected EOF" } + -re "semantic error:" { fail "$testname compilation" } + } + catch { close } + wait } -catch { close } -wait diff --git a/testsuite/systemtap.maps/ix_hist.exp b/testsuite/systemtap.maps/ix_hist.exp index 85ab03472..cc331ee46 100644 --- a/testsuite/systemtap.maps/ix_hist.exp +++ b/testsuite/systemtap.maps/ix_hist.exp @@ -61,6 +61,10 @@ value |-------------------------------------------------- count 4096 | 0 } -stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime -DMAXACTION=10000 + } else { + stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 + } +} diff --git a/testsuite/systemtap.maps/linear.exp b/testsuite/systemtap.maps/linear.exp index 23b5f871e..45759553b 100644 --- a/testsuite/systemtap.maps/linear.exp +++ b/testsuite/systemtap.maps/linear.exp @@ -40,6 +40,10 @@ value |-------------------------------------------------- count 1500 | 0 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/linear_0.exp b/testsuite/systemtap.maps/linear_0.exp index 8e6952a75..18755a7a8 100644 --- a/testsuite/systemtap.maps/linear_0.exp +++ b/testsuite/systemtap.maps/linear_0.exp @@ -4,22 +4,30 @@ set test "linear_0" if {![installtest_p]} { untested $test; return } -set ok 0 - -spawn stap -DMAXACTION=10000 $srcdir/$subdir/$test.stp -expect { - -timeout 150 - "WARNING: histogram: interval cannot be zero." { - incr ok - exp_continue +set script $srcdir/$subdir/$test.stp +foreach runtime [get_runtime_list] { + set ok 0 + set testname $test + if {$runtime != ""} { + spawn stap -DMAXACTION=10000 --runtime=$runtime $script + lappend testname "($runtime)" + } else { + spawn stap -DMAXACTION=10000 $script } - eof { } -} -catch close -wait + expect { + -timeout 150 + "WARNING: histogram: interval cannot be zero." { + incr ok + exp_continue + } + eof { } + } + catch close + wait -if {$ok == 1} { - pass $test -} else { - fail $test + if {$ok == 1} { + pass $testname + } else { + fail $testname + } } diff --git a/testsuite/systemtap.maps/linear_bad.exp b/testsuite/systemtap.maps/linear_bad.exp index d99fd16c6..96a0960bd 100644 --- a/testsuite/systemtap.maps/linear_bad.exp +++ b/testsuite/systemtap.maps/linear_bad.exp @@ -4,22 +4,31 @@ set test "linear_bad" if {![installtest_p]} { untested $test; return } -set ok 0 +set script $srcdir/$subdir/$test.stp +foreach runtime [get_runtime_list] { + set ok 0 + set testname $test + if {$runtime != ""} { + spawn stap -DMAXACTION=10000 --runtime=$runtime $script + lappend testname "($runtime)" + } else { + spawn stap -DMAXACTION=10000 $script + } -spawn stap -DMAXACTION=10000 $srcdir/$subdir/$test.stp -expect { - -timeout 150 - "WARNING: histogram: Number of buckets" { - incr ok - exp_continue + expect { + -timeout 150 + "WARNING: histogram: Number of buckets" { + incr ok + exp_continue + } + eof { } } - eof { } -} -catch close -wait + catch close + wait -if {$ok == 1} { - pass $test -} else { - fail $test + if {$ok == 1} { + pass $testname + } else { + fail $testname + } } diff --git a/testsuite/systemtap.maps/linear_empty.exp b/testsuite/systemtap.maps/linear_empty.exp index 922ff0b95..0c21a01ab 100644 --- a/testsuite/systemtap.maps/linear_empty.exp +++ b/testsuite/systemtap.maps/linear_empty.exp @@ -3,5 +3,11 @@ set test "linear_empty" set ::result_string {count=0} -stap_run2 $srcdir/$subdir/$test.stp -w +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp -w --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp -w + } +} diff --git a/testsuite/systemtap.maps/linear_large.exp b/testsuite/systemtap.maps/linear_large.exp index d2a03f0a5..4da24715c 100644 --- a/testsuite/systemtap.maps/linear_large.exp +++ b/testsuite/systemtap.maps/linear_large.exp @@ -21,6 +21,10 @@ avg=1115333333 >1000000000 |@ 1 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/linear_large_neg.exp b/testsuite/systemtap.maps/linear_large_neg.exp index 470414a31..66fc897ef 100644 --- a/testsuite/systemtap.maps/linear_large_neg.exp +++ b/testsuite/systemtap.maps/linear_large_neg.exp @@ -21,6 +21,10 @@ avg=-1284615384 0 |@ 1 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/linear_nearlyempty.exp b/testsuite/systemtap.maps/linear_nearlyempty.exp index dfb5e9ef3..4266f68e0 100644 --- a/testsuite/systemtap.maps/linear_nearlyempty.exp +++ b/testsuite/systemtap.maps/linear_nearlyempty.exp @@ -20,6 +20,10 @@ value |-------------------------------------------------- count 1050 | 0 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/linear_neg.exp b/testsuite/systemtap.maps/linear_neg.exp index b16400308..4bc6d6e18 100644 --- a/testsuite/systemtap.maps/linear_neg.exp +++ b/testsuite/systemtap.maps/linear_neg.exp @@ -4,22 +4,30 @@ set test "linear_neg" if {![installtest_p]} { untested $test; return } -set ok 0 - -spawn stap -DMAXACTION=10000 $srcdir/$subdir/$test.stp -expect { - -timeout 150 - "Number of buckets" { - incr ok - exp_continue +set script $srcdir/$subdir/$test.stp +foreach runtime [get_runtime_list] { + set ok 0 + set testname $test + if {$runtime != ""} { + spawn stap -DMAXACTION=10000 --runtime=$runtime $script + lappend testname "($runtime)" + } else { + spawn stap -DMAXACTION=10000 $script } - eof { } -} -catch close -wait + expect { + -timeout 150 + "Number of buckets" { + incr ok + exp_continue + } + eof { } + } + catch close + wait -if {$ok == 1} { - pass $test -} else { - fail $test + if {$ok == 1} { + pass $testname + } else { + fail $testname + } } diff --git a/testsuite/systemtap.maps/linear_over.exp b/testsuite/systemtap.maps/linear_over.exp index 25eca1e11..ffc0d7c28 100644 --- a/testsuite/systemtap.maps/linear_over.exp +++ b/testsuite/systemtap.maps/linear_over.exp @@ -12,6 +12,10 @@ value |-------------------------------------------------- count >100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9000 } -stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime -DMAXACTION=10000 + } else { + stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 + } +} diff --git a/testsuite/systemtap.maps/linear_overunder.exp b/testsuite/systemtap.maps/linear_overunder.exp index e52755249..c0a79996d 100644 --- a/testsuite/systemtap.maps/linear_overunder.exp +++ b/testsuite/systemtap.maps/linear_overunder.exp @@ -27,6 +27,10 @@ value |-------------------------------------------------- count >1000 |@@@@@@@ 102 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/linear_under.exp b/testsuite/systemtap.maps/linear_under.exp index 28d248864..80b267891 100644 --- a/testsuite/systemtap.maps/linear_under.exp +++ b/testsuite/systemtap.maps/linear_under.exp @@ -12,6 +12,10 @@ value |-------------------------------------------------- count 1900 | 0 } -stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime -DMAXACTION=10000 + } else { + stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 + } +} diff --git a/testsuite/systemtap.maps/log.exp b/testsuite/systemtap.maps/log.exp index d19082b40..832d77d78 100644 --- a/testsuite/systemtap.maps/log.exp +++ b/testsuite/systemtap.maps/log.exp @@ -132,6 +132,10 @@ set ::result_string { value |------------------------------------- 4611686018427387904 |@ 1 } -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/log_edge.exp b/testsuite/systemtap.maps/log_edge.exp index 6ce546d9a..3ec655bde 100644 --- a/testsuite/systemtap.maps/log_edge.exp +++ b/testsuite/systemtap.maps/log_edge.exp @@ -45,6 +45,10 @@ bucket 65: 1 bucket 66: 2 bucket 67: 1} -stap_run2 $srcdir/$subdir/$test.stp - - +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test.stp --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test.stp + } +} diff --git a/testsuite/systemtap.maps/map_hash.exp b/testsuite/systemtap.maps/map_hash.exp index abc29436a..148929d65 100644 --- a/testsuite/systemtap.maps/map_hash.exp +++ b/testsuite/systemtap.maps/map_hash.exp @@ -2050,7 +2050,14 @@ array[4]=0x1 array[3]=0x1 array[2]=0x1 array[1]=0x1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} #SI Regular Map Test set test "map_hash_SI.stp" @@ -4102,7 +4109,14 @@ array["start-pulseaudio-x11"]=0x1 array["startx"]=0x1 array["stat"]=0x1 array["stdbuf"]=0x1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} #SSI Regular Map Test set test "map_hash_SSI.stp" @@ -6154,7 +6168,14 @@ array["start-pulseaudio-x11","start-pulseaudio-x11"]=0x1 array["startx","startx"]=0x1 array["stat","stat"]=0x1 array["stdbuf","stdbuf"]=0x1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} #II Statistics Map Test set test "map_hash_stat_II.stp" @@ -8206,7 +8227,14 @@ array[2045]: count:1 sum:1 avg:1 min:1 max:1 array[2046]: count:1 sum:1 avg:1 min:1 max:1 array[2047]: count:1 sum:1 avg:1 min:1 max:1 array[2048]: count:1 sum:1 avg:1 min:1 max:1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} #SI Statistics Map Test set test "map_hash_stat_SI.stp" @@ -10258,7 +10286,14 @@ array["start-pulseaudio-x11"]: count:1 sum:1 avg:1 min:1 max:1 array["startx"]: count:1 sum:1 avg:1 min:1 max:1 array["stat"]: count:1 sum:1 avg:1 min:1 max:1 array["stdbuf"]: count:1 sum:1 avg:1 min:1 max:1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} #SSI Statistics Map Test set test "map_hash_stat_SSI.stp" @@ -12310,4 +12345,11 @@ array["start-pulseaudio-x11", "start-pulseaudio-x11"]: count:1 sum:1 avg:1 mi array["startx", "startx"]: count:1 sum:1 avg:1 min:1 max:1 array["stat", "stat"]: count:1 sum:1 avg:1 min:1 max:1 array["stdbuf", "stdbuf"]: count:1 sum:1 avg:1 min:1 max:1} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} diff --git a/testsuite/systemtap.maps/map_wrap.exp b/testsuite/systemtap.maps/map_wrap.exp index 55776d36f..846990f5c 100644 --- a/testsuite/systemtap.maps/map_wrap.exp +++ b/testsuite/systemtap.maps/map_wrap.exp @@ -5,7 +5,14 @@ foo[8]=0x8 foo[7]=0x7 foo[6]=0x6 foo[5]=0x5} -stap_run2 $srcdir/$subdir/$test + +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} # Statistics Valued Array Test set test "map_wrap2.stp" @@ -14,5 +21,11 @@ foo[6]: count:1 sum:6 avg:6 min:6 max:6 foo[7]: count:1 sum:7 avg:7 min:7 max:7 foo[8]: count:1 sum:8 avg:8 min:8 max:8 foo[9]: count:1 sum:9 avg:9 min:9 max:9} -stap_run2 $srcdir/$subdir/$test +foreach runtime [get_runtime_list] { + if {$runtime != ""} { + stap_run2 $srcdir/$subdir/$test --runtime=$runtime + } else { + stap_run2 $srcdir/$subdir/$test + } +} diff --git a/testsuite/systemtap.pass1-4/debugtypes.exp b/testsuite/systemtap.pass1-4/debugtypes.exp index f571a4dae..b1e8ef965 100644 --- a/testsuite/systemtap.pass1-4/debugtypes.exp +++ b/testsuite/systemtap.pass1-4/debugtypes.exp @@ -7,8 +7,14 @@ if {[target_compile $srcdir/$subdir/$test.cxx $test.exe executable \ } pass "compiling $test.cxx" -if {[stap_run_batch $srcdir/$subdir/$test.stp] == 0} { - pass "compiling $test.stp" -} else { - fail "compiling $test.stp" +foreach runtime [get_runtime_list] { + set testname "compiling $test.stp" + if {$runtime != ""} { + set rc [stap_run_batch $srcdir/$subdir/$test.stp --runtime=$runtime] + lappend testname "($runtime)" + } else { + set rc [stap_run_batch $srcdir/$subdir/$test.stp] + } + + if {$rc == 0} { pass $testname } else { fail $testname } } -- 2.43.5