diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-03-08 23:23:35 +0100 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-03-09 10:14:11 +0100 |
commit | 1d4cb9b5f957bd3825fd1f0cfa1df1c24a07164d (patch) | |
tree | 373f0d1e899860c03b52aa9f1585341d7d7c4125 /testsuite | |
parent | da573399d560fc659ee45ae041dcb2bf5b9b0bf6 (diff) | |
download | systemtap-steved-1d4cb9b5f957bd3825fd1f0cfa1df1c24a07164d.tar.gz systemtap-steved-1d4cb9b5f957bd3825fd1f0cfa1df1c24a07164d.tar.xz systemtap-steved-1d4cb9b5f957bd3825fd1f0cfa1df1c24a07164d.zip |
Make stap_run2 count exact number of lines.
* testsuite/lib/stap_run2.exp: Compare found and expected number of lines.
* testsuite/systemtap.*/*.exp (result_string): Make number of lines exact.
Diffstat (limited to 'testsuite')
39 files changed, 38 insertions, 71 deletions
diff --git a/testsuite/lib/stap_run2.exp b/testsuite/lib/stap_run2.exp index 9849aefb..cb1c6615 100644 --- a/testsuite/lib/stap_run2.exp +++ b/testsuite/lib/stap_run2.exp @@ -29,5 +29,10 @@ proc stap_run2 { TEST_NAME args } { } incr n } - pass "$TEST_NAME" + if {[expr $n == [llength $expected]]} { + pass "$TEST_NAME" + } else { + fail "$TEST_NAME" + send_log "too few lines of output, got $n, expected [llength $expected]\n" + } } diff --git a/testsuite/systemtap.base/ctime.exp b/testsuite/systemtap.base/ctime.exp index f6db096a..d5ae07d5 100644 --- a/testsuite/systemtap.base/ctime.exp +++ b/testsuite/systemtap.base/ctime.exp @@ -13,6 +13,5 @@ a long, long time ago... Tue Jan 19 03:14:07 2038 far far in the future... a long, long time ago... -far far in the future... -} +far far in the future...} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/limits.exp b/testsuite/systemtap.base/limits.exp index c5328e8f..c04d507d 100644 --- a/testsuite/systemtap.base/limits.exp +++ b/testsuite/systemtap.base/limits.exp @@ -32,7 +32,6 @@ Minimum signed 64-bit number -9223372036854775808 0x8000000000000000 -9223372036854775808 0x8000000000000000 -9223372036854775808 0x8000000000000000 --9223372036854775808 0x8000000000000000 -} +-9223372036854775808 0x8000000000000000} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/stmt_rel.exp b/testsuite/systemtap.base/stmt_rel.exp index 25156d9b..be51fef9 100644 --- a/testsuite/systemtap.base/stmt_rel.exp +++ b/testsuite/systemtap.base/stmt_rel.exp @@ -3,7 +3,6 @@ set test "stmt_rel" set ::result_string {PASS bio_init PASS line number -PASS wildcard -} +PASS wildcard} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/exists.exp b/testsuite/systemtap.maps/exists.exp index ea043a6b..bbdac737 100755 --- a/testsuite/systemtap.maps/exists.exp +++ b/testsuite/systemtap.maps/exists.exp @@ -9,8 +9,7 @@ comlete list for b: [0,0] [1,10] [2,20] [3,30] [4,40] [5,50] [6,60] [7,70] [8,80 [0,0] is still there emtpy string there hello there -emtpy string still there -} +emtpy string still there} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_foreach.exp b/testsuite/systemtap.maps/foreach_foreach.exp index f79d290a..07a2d871 100644 --- a/testsuite/systemtap.maps/foreach_foreach.exp +++ b/testsuite/systemtap.maps/foreach_foreach.exp @@ -114,8 +114,7 @@ bar[21] = 9261 bar[22] = 10648 bar[23] = 12167 bar[24] = 13824 -foo[10] = 100 -} +foo[10] = 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_limit.exp b/testsuite/systemtap.maps/foreach_limit.exp index 97305c4b..4cc87ec8 100644 --- a/testsuite/systemtap.maps/foreach_limit.exp +++ b/testsuite/systemtap.maps/foreach_limit.exp @@ -94,8 +94,7 @@ bucket 69: 13 bucket 70: 28 loop had 71 iterations -Done. -} +Done.} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/foreach_limit2.exp b/testsuite/systemtap.maps/foreach_limit2.exp index 00696fe1..224a0aa7 100644 --- a/testsuite/systemtap.maps/foreach_limit2.exp +++ b/testsuite/systemtap.maps/foreach_limit2.exp @@ -82,8 +82,7 @@ agg_array[6]: count:2 sum:18 avg:9 min:6 max:12 loop had 4 iterations x ended up as 5 -Done. -} +Done.} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ii.exp b/testsuite/systemtap.maps/ii.exp index f7ce95fb..1f4a972a 100644 --- a/testsuite/systemtap.maps/ii.exp +++ b/testsuite/systemtap.maps/ii.exp @@ -61,8 +61,7 @@ foo[6] = 91 foo[7] = 140 foo[8] = 204 foo[9] = 285 -foo[10] = 385 -} +foo[10] = 385} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/iiiiii.exp b/testsuite/systemtap.maps/iiiiii.exp index 3c8dbaf0..aeddbbac 100644 --- a/testsuite/systemtap.maps/iiiiii.exp +++ b/testsuite/systemtap.maps/iiiiii.exp @@ -64,8 +64,7 @@ foo[1,1,0,1,1] = 4 foo[1,1,1,0,0] = 3 foo[1,1,1,0,1] = 4 foo[1,1,1,1,0] = 4 -foo[1,1,1,1,1] = 5 -} +foo[1,1,1,1,1] = 5} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/is.exp b/testsuite/systemtap.maps/is.exp index 5dffb850..31e96e77 100644 --- a/testsuite/systemtap.maps/is.exp +++ b/testsuite/systemtap.maps/is.exp @@ -61,8 +61,7 @@ foo[6] = # 36 foo[7] = # 49 foo[8] = # 64 foo[9] = # 81 -foo[10] = # 100 -} +foo[10] = # 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ix.exp b/testsuite/systemtap.maps/ix.exp index 578e8e38..11de73c1 100644 --- a/testsuite/systemtap.maps/ix.exp +++ b/testsuite/systemtap.maps/ix.exp @@ -41,8 +41,7 @@ foo[9]: count:4 sum:117 avg:29 min:-2 max:100 foo[10]: count:4 sum:118 avg:29 min:-2 max:100 Run a quick foreach without sorting... -complete sum of foo:1243 -} +complete sum of foo:1243} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear.exp b/testsuite/systemtap.maps/linear.exp index 5519ee11..23b5f871 100644 --- a/testsuite/systemtap.maps/linear.exp +++ b/testsuite/systemtap.maps/linear.exp @@ -38,7 +38,6 @@ value |-------------------------------------------------- count 1400 | 3 1450 | 3 1500 | 0 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_empty.exp b/testsuite/systemtap.maps/linear_empty.exp index 88a53a31..922ff0b9 100644 --- a/testsuite/systemtap.maps/linear_empty.exp +++ b/testsuite/systemtap.maps/linear_empty.exp @@ -1,8 +1,7 @@ # Test empty linear histogram set test "linear_empty" -set ::result_string {count=0 -} +set ::result_string {count=0} stap_run2 $srcdir/$subdir/$test.stp -w diff --git a/testsuite/systemtap.maps/linear_large.exp b/testsuite/systemtap.maps/linear_large.exp index 51df3c92..d2a03f0a 100644 --- a/testsuite/systemtap.maps/linear_large.exp +++ b/testsuite/systemtap.maps/linear_large.exp @@ -19,7 +19,6 @@ avg=1115333333 900000000 | 0 1000000000 |@@@@ 4 >1000000000 |@ 1 - } 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 bdffba7b..470414a3 100644 --- a/testsuite/systemtap.maps/linear_large_neg.exp +++ b/testsuite/systemtap.maps/linear_large_neg.exp @@ -19,7 +19,6 @@ avg=-1284615384 -200000000 | 0 -100000000 |@@ 2 0 |@ 1 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_over.exp b/testsuite/systemtap.maps/linear_over.exp index 5b0fafa4..25eca1e1 100644 --- a/testsuite/systemtap.maps/linear_over.exp +++ b/testsuite/systemtap.maps/linear_over.exp @@ -10,7 +10,6 @@ value |-------------------------------------------------- count 90 | 0 100 | 0 >100 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 9000 - } 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 80b74c72..e5275524 100644 --- a/testsuite/systemtap.maps/linear_overunder.exp +++ b/testsuite/systemtap.maps/linear_overunder.exp @@ -25,7 +25,6 @@ value |-------------------------------------------------- count 950 |@ 27 1000 |@ 23 >1000 |@@@@@@@ 102 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/linear_under.exp b/testsuite/systemtap.maps/linear_under.exp index 8efc45be..28d24886 100644 --- a/testsuite/systemtap.maps/linear_under.exp +++ b/testsuite/systemtap.maps/linear_under.exp @@ -10,7 +10,6 @@ value |-------------------------------------------------- count <1800 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 100 1800 | 0 1900 | 0 - } stap_run2 $srcdir/$subdir/$test.stp -DMAXACTION=10000 diff --git a/testsuite/systemtap.maps/log.exp b/testsuite/systemtap.maps/log.exp index 2bc54a33..d19082b4 100644 --- a/testsuite/systemtap.maps/log.exp +++ b/testsuite/systemtap.maps/log.exp @@ -130,7 +130,6 @@ set ::result_string { value |------------------------------------- 1152921504606846976 |@ 1 2305843009213693952 |@ 1 4611686018427387904 |@ 1 - } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/log_edge.exp b/testsuite/systemtap.maps/log_edge.exp index 051021b1..6ce546d9 100644 --- a/testsuite/systemtap.maps/log_edge.exp +++ b/testsuite/systemtap.maps/log_edge.exp @@ -43,8 +43,7 @@ value |-------------------------------------------------- count bucket 65: 1 bucket 66: 2 -bucket 67: 1 -} +bucket 67: 1} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/si.exp b/testsuite/systemtap.maps/si.exp index 600687ed..eb1b05c7 100644 --- a/testsuite/systemtap.maps/si.exp +++ b/testsuite/systemtap.maps/si.exp @@ -61,8 +61,7 @@ foo[6] = 91 foo[7] = 140 foo[8] = 204 foo[9] = 285 -foo[10] = 385 -} +foo[10] = 385} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.maps/ss.exp b/testsuite/systemtap.maps/ss.exp index 548a888e..9978ead0 100644 --- a/testsuite/systemtap.maps/ss.exp +++ b/testsuite/systemtap.maps/ss.exp @@ -61,7 +61,6 @@ foo[6] = # 36 foo[7] = # 49 foo[8] = # 64 foo[9] = # 81 -foo[10] = # 100 -} +foo[10] = # 100} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/basic3.exp b/testsuite/systemtap.printf/basic3.exp index e3beb9ed..5c4f7e79 100644 --- a/testsuite/systemtap.printf/basic3.exp +++ b/testsuite/systemtap.printf/basic3.exp @@ -1,5 +1,4 @@ set test "basic3" set ::result_string {Hello -World -} +World} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/bin6.exp b/testsuite/systemtap.printf/bin6.exp Binary files differindex 0de41e78..4c5e7f2b 100644 --- a/testsuite/systemtap.printf/bin6.exp +++ b/testsuite/systemtap.printf/bin6.exp diff --git a/testsuite/systemtap.printf/char1.exp b/testsuite/systemtap.printf/char1.exp index 0e9232e9..35aa479f 100644 --- a/testsuite/systemtap.printf/char1.exp +++ b/testsuite/systemtap.printf/char1.exp @@ -1,4 +1,3 @@ set test "char1" -set ::result_string {stap -} -stap_run2 $srcdir/$subdir/$test.stp
\ No newline at end of file +set ::result_string {stap} +stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/int1.exp b/testsuite/systemtap.printf/int1.exp index bb30b4f3..b308848c 100644 --- a/testsuite/systemtap.printf/int1.exp +++ b/testsuite/systemtap.printf/int1.exp @@ -19,6 +19,5 @@ set ::result_string {1,10,9000000000000,-1,-1024 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1,12,202757163310000,1777777777777777777777,1777777777777777776000 1, 12, 202757163310000,1777777777777777777777,1777777777777777776000 -0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000 -} +0000000000000001,0000000000000012,0202757163310000,1777777777777777777777,1777777777777777776000} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/memory1.exp b/testsuite/systemtap.printf/memory1.exp index 7b55a3d7..c5f03610 100644 --- a/testsuite/systemtap.printf/memory1.exp +++ b/testsuite/systemtap.printf/memory1.exp @@ -1,4 +1,3 @@ set test "memory1" -set ::result_string {Test passed -} +set ::result_string {Test passed} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/print.exp b/testsuite/systemtap.printf/print.exp index 3a4de529..151de10d 100644 --- a/testsuite/systemtap.printf/print.exp +++ b/testsuite/systemtap.printf/print.exp @@ -13,6 +13,5 @@ foo99 888 123456789 hello999 -999hello -} +999hello} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/print_char.exp b/testsuite/systemtap.printf/print_char.exp index bab056dd..a9d63be6 100644 --- a/testsuite/systemtap.printf/print_char.exp +++ b/testsuite/systemtap.printf/print_char.exp @@ -1,5 +1,4 @@ set test "print_char" set ::result_string {ABC -ABCDEFGHIJKLMNOPQRSTUVWXYZ -} +ABCDEFGHIJKLMNOPQRSTUVWXYZ} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/println.exp b/testsuite/systemtap.printf/println.exp index 8deba53f..fcbe0c82 100644 --- a/testsuite/systemtap.printf/println.exp +++ b/testsuite/systemtap.printf/println.exp @@ -13,6 +13,5 @@ foo99 99foo 123456789 hello999 -999hello -} +999hello} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/ptr.exp b/testsuite/systemtap.printf/ptr.exp index f25a7a02..3eb412a7 100644 --- a/testsuite/systemtap.printf/ptr.exp +++ b/testsuite/systemtap.printf/ptr.exp @@ -29,8 +29,7 @@ if {$::tcl_platform(wordSize) == 8} { 0x000001X 0x12345678X 0x12345678abcdef00X -0x12345678X -" +0x12345678X" } else { set ::result_string "0x00000000 0x00000001 @@ -60,7 +59,6 @@ if {$::tcl_platform(wordSize) == 8} { 0x000001X 0x12345678X 0xabcdef00X -0x12345678X -" +0x12345678X" } stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.printf/string1.exp b/testsuite/systemtap.printf/string1.exp index aee0b71a..7c94d645 100644 --- a/testsuite/systemtap.printf/string1.exp +++ b/testsuite/systemtap.printf/string1.exp @@ -1,6 +1,5 @@ set test "string1" set ::result_string {The string is <Foobar!> Foobar!XYZZY -XYZZYFoobar!XYZZYFoobar! -} +XYZZYFoobar!XYZZYFoobar!} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/dot.exp b/testsuite/systemtap.string/dot.exp index b1d38172..14f329db 100644 --- a/testsuite/systemtap.string/dot.exp +++ b/testsuite/systemtap.string/dot.exp @@ -5,6 +5,5 @@ helloworld 0 100 -42 -66 -} +66} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/isinstr.exp b/testsuite/systemtap.string/isinstr.exp index 986043e8..ed0474de 100644 --- a/testsuite/systemtap.string/isinstr.exp +++ b/testsuite/systemtap.string/isinstr.exp @@ -1,6 +1,5 @@ set test "isinstr" set ::result_string {"foo" is in "abcfoobad" "foo" is NOT in "abcdefg" -"" is in "" -} +"" is in ""} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/sprint.exp b/testsuite/systemtap.string/sprint.exp index c8f9826a..b4f0b453 100644 --- a/testsuite/systemtap.string/sprint.exp +++ b/testsuite/systemtap.string/sprint.exp @@ -3,6 +3,5 @@ set ::result_string {helloworld helloworld EQUAL EQUAL -hello-world helloworld FOO helloworld -} +hello-world helloworld FOO helloworld} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/strlen.exp b/testsuite/systemtap.string/strlen.exp index 40c790fe..b93564ef 100644 --- a/testsuite/systemtap.string/strlen.exp +++ b/testsuite/systemtap.string/strlen.exp @@ -2,6 +2,5 @@ set test "strlen" set ::result_string {strlen("") = 0 strlen("1") = 1 strlen("0123456789") = 10 -strlen("012345678901234567890123456789012345678901234567890123456789012") = 63 -} +strlen("012345678901234567890123456789012345678901234567890123456789012") = 63} stap_run2 $srcdir/$subdir/$test.stp -DMAXSTRINGLEN=64 diff --git a/testsuite/systemtap.string/strtol.exp b/testsuite/systemtap.string/strtol.exp index 12d63f0d..25cc21a0 100644 --- a/testsuite/systemtap.string/strtol.exp +++ b/testsuite/systemtap.string/strtol.exp @@ -10,6 +10,5 @@ set ::result_string {1 1000 4096 512 -8 -0} +8} stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.string/substr.exp b/testsuite/systemtap.string/substr.exp index c9884935..5f1b662b 100644 --- a/testsuite/systemtap.string/substr.exp +++ b/testsuite/systemtap.string/substr.exp @@ -13,6 +13,5 @@ set ::result_string {Hello World! 12,1: 0,10: Hello Worl 0,100: Hello World! -0,100000: Hello World! -} +0,100000: Hello World!} stap_run2 $srcdir/$subdir/$test.stp |