* ARM port of testsuite and general testsuite fixes @ 2007-06-06 0:36 Quentin Barnes 2007-06-06 16:02 ` David Smith 2007-06-08 16:27 ` Quentin Barnes 0 siblings, 2 replies; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 0:36 UTC (permalink / raw) To: systemtap The ARM version of the test suite of 20070602 just completed. I'll post the specifics later. With the earlier patches plus the patch below, here's the summary using a 2.6.21.1 kernel in case anyone's curious: ======= === systemtap Summary === # of expected passes 277 # of unexpected failures 37 # of unexpected successes 1 # of expected failures 129 # of known failures 7 # of untested testcases 30 # of unsupported tests 3 ======= Below is the patch necessary to fix all timeout problems when running on an ARM processor and other porting issues related to ARM. I didn't go with a strategy that makes the hardcoded timeout values variable. Once I fixed various testsuite bugs, the timeout values didn't increase all that much after all. I felt the difference wasn't enough warrant switching to a new scheme for. If people feel otherwise, we should discuss it further. There are various bug fixes scattered throughout the patch. Please review them carefully, but most should be self-explanatory. One to note that isn't a bug fix but just a more robust style is in syscall.exp where I changed it from using an if-statement to a switch statement when adding the case for ARM. If any of these changes are not acceptable, please let me know. Quentin Index: systemtap-20070602/testsuite/systemtap.maps/absentstats.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/absentstats.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/absentstats.exp (.../branches/kprobes/usr/src) (revision 214) @@ -10,7 +10,7 @@ set ko 0 spawn stap -DMAXERRORS=20 $srcdir/$subdir/$test.stp # spawn echo hello children 0 expect { - -timeout 60 + -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 } Index: systemtap-20070602/testsuite/systemtap.maps/pmap_agg_overflow.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/pmap_agg_overflow.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/pmap_agg_overflow.exp (.../branches/kprobes/usr/src) (revision 214) @@ -9,13 +9,14 @@ set skip_result "^WARNING: This test onl # spawn test spawn stap -DMAXERRORS=1 -g $srcdir/$subdir/$test.stp expect { + -timeout 240 -re $pass_result { pass "$test passed" } -re $skip_result { unsupported "$test requires smp" } - -timeout 30 { + timeout { send "\003" fail "$test timed out" } Index: systemtap-20070602/testsuite/systemtap.maps/foreach_fail.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/foreach_fail.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/foreach_fail.exp (.../branches/kprobes/usr/src) (revision 214) @@ -7,6 +7,7 @@ if {![installtest_p]} { untested $test; spawn stap $srcdir/$subdir/$test.stp expect { + -timeout 60 timeout { fail "$test timed out" } eof { Index: systemtap-20070602/testsuite/systemtap.maps/ix_clear.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/ix_clear.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/ix_clear.exp (.../branches/kprobes/usr/src) (revision 214) @@ -9,10 +9,11 @@ set pass_result {foo\[1\] = 1 1*ERROR: e # spawn test spawn stap $srcdir/$subdir/$test.stp expect { + -timeout 150 $pass_result { pass "$test passed" } - -timeout 30 { + timeout { send "\003" fail "$test timed out" } Index: systemtap-20070602/testsuite/systemtap.maps/ix_clear2.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/ix_clear2.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/ix_clear2.exp (.../branches/kprobes/usr/src) (revision 214) @@ -10,10 +10,11 @@ set pass_result {foo\[1\] = 1 1*ERROR: e # spawn test spawn stap $srcdir/$subdir/$test.stp expect { + -timeout 150 $pass_result { pass "$test passed" } - -timeout 30 { + timeout { send "\003" fail "$test timed out" } Index: systemtap-20070602/testsuite/systemtap.maps/ix_clear3.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.maps/ix_clear3.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.maps/ix_clear3.exp (.../branches/kprobes/usr/src) (revision 214) @@ -8,10 +8,11 @@ set pass_result {*ERROR: empty aggregate # spawn test spawn stap $srcdir/$subdir/$test.stp expect { + -timeout 150 $pass_result { pass "$test passed" } - -timeout 30 { + timeout { send "\003" fail "$test timed out" } Index: systemtap-20070602/testsuite/systemtap.samples/primes.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/primes.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/primes.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap $srcdir/$subdir/primes.stp set ok 0 expect { - -timeout 30 + -timeout 150 -ex {odds[0] = 1} { incr ok; exp_continue } -ex {odds[1] = 3} { incr ok; exp_continue } -ex {odds[3] = 7} { incr ok; exp_continue } Index: systemtap-20070602/testsuite/systemtap.samples/lket.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/lket.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/lket.exp (.../branches/kprobes/usr/src) (revision 214) @@ -9,7 +9,7 @@ if {[info procs installtest_p]!="" && ![ eval spawn stap -v -DMAXSKIPPED=100000 -bM $srcdir/$subdir/lket.stp set failed 1 -set timeout 180 +set timeout 1800 expect { -re {^Pass\ ([1234]):\ [^\r]*\r\n} { set detail "pass$expect_out(1,string)"; @@ -19,7 +19,7 @@ expect { set detail "stap runtime"; exp_continue } - -re {Pass\ 5:[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms.\r\n} { + -re {Pass\ 5:[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} { set failed 0 } -re {parse error|semantic error} {set detail "$expect_out(0,string)"} Index: systemtap-20070602/testsuite/systemtap.samples/poll_map.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/poll_map.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/poll_map.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -g $srcdir/$subdir/poll_map.stp set ok 0 expect { - -timeout 90 + -timeout 400 -ex "SUCCESS" { incr ok } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/arith.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/arith.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/arith.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -DMAXNESTING=5 $srcdir/$subdir/arith.stp set ok 0 expect { - -timeout 30 + -timeout 150 -re {passes: [0-9]* failures: 0} { incr ok } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/pfaults.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/pfaults.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/pfaults.exp (.../branches/kprobes/usr/src) (revision 214) @@ -5,9 +5,8 @@ spawn stap -g $srcdir/$subdir/pfaults.st set pid $spawn_id set ok 0 expect { - -timeout 30 + -timeout 180 -re {Page fault tracking, start time[^\r\n]+\r\n} { incr ok; exp_continue } - -timeout 30 -re {Page fault tracking, end time[^\r\n]+\r\n} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/symbols.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/symbols.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/symbols.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -g $srcdir/$subdir/symbols.stp set ok 0 expect { - -timeout 30 + -timeout 120 -re { 0x[a-f0-9]+[^\r]*\r} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/queue_demo.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/queue_demo.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/queue_demo.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap $srcdir/$subdir/queue_demo.stp set ok 0 expect { - -timeout 30 + -timeout 240 -re {block-[^\r]*} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/arith_limits.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/arith_limits.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/arith_limits.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -DMAXNESTING=5 $srcdir/$subdir/arith_limits.stp set ok 0 expect { - -timeout 30 + -timeout 150 -re {passes: [0-9]* failures: 0} { incr ok } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/args.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/args.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/args.exp (.../branches/kprobes/usr/src) (revision 214) @@ -15,7 +15,7 @@ set modname "args_[pid]" spawn stap -k -p4 -m $modname $srcdir/$subdir/args.stp set tmpdir NO_SUCH_FILE expect { - -timeout 30 + -timeout 120 -re {Keeping temporary directory "([/a-zA-Z0-9_]*)"} { pass "$test compile"; set tmpdir $expect_out(1,string) } timeout { fail "$test compile (timeout)" } @@ -40,7 +40,7 @@ if [file exists $modpath] { spawn sudo $staprunpath -d [pid] $modpath foo=hello bar=999 set ok 0 expect { - -timeout 30 + -timeout 120 -re {foo=hello bar=999} { incr ok } timeout { } eof { } @@ -55,7 +55,7 @@ if {$ok == 1} { spawn sudo $staprunpath -d [pid] $modpath foo=goodbye bar=0 set ok 0 expect { - -timeout 30 + -timeout 120 -re {foo=goodbye bar=0} { incr ok } timeout { } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/transport.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/transport.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/transport.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport1.stp set ok 0 expect { - -timeout 60 + -timeout 150 timeout { fail "$test (timeout)" } eof { spawn $srcdir/$subdir/transport-counts probe.out expect { @@ -22,7 +22,7 @@ set test "transport normal - relayfs" spawn stap -b -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport1.stp set ok 0 expect { - -timeout 60 + -timeout 150 timeout { fail "$test (timeout)" } eof { spawn $srcdir/$subdir/transport-counts probe.out expect { @@ -40,7 +40,7 @@ set test "transport fill staging buffer spawn stap -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport2.stp set ok 0 expect { - -timeout 60 + -timeout 150 timeout { fail "$test (timeout)" } eof { spawn $srcdir/$subdir/transport-counts probe.out expect { @@ -58,7 +58,7 @@ set test "transport fill staging buffer spawn stap -b -o probe.out -DMAXACTION=1000000 $srcdir/$subdir/transport2.stp set ok 0 expect { - -timeout 60 + -timeout 150 timeout { fail "$test (timeout)" } eof { spawn $srcdir/$subdir/transport-counts probe.out expect { Index: systemtap-20070602/testsuite/systemtap.samples/system_func.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/system_func.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/system_func.exp (.../branches/kprobes/usr/src) (revision 214) @@ -6,10 +6,15 @@ set done 0 set saw_user 0 set user [exec whoami] expect { - -timeout 30 - -re "^$user\[^\r\]*\[\r\n\]*" {incr saw_user; exp_continue} - -re {^sys_open[^\r]*[\r\n]*} {incr open; exp_continue } - -re {DONE[^\r]*[\r\n]*} {incr done; exp_continue } + -timeout 240 + -re "($user|sys_open|DONE)\r" { + switch $expect_out(1,string) { + sys_open {incr open} + DONE {incr done} + default {incr saw_user} + } + exp_continue + } timeout { fail "$test (timeout)" } eof { } } Index: systemtap-20070602/testsuite/systemtap.samples/profile.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/profile.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/profile.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,8 @@ if {![installtest_p]} { untested $test; spawn stap $srcdir/$subdir/profile.stp set ok 0 expect { - -timeout 60 -re {kernel.function[^\r]*ttime=[0-9]*\r} { incr ok; exp_continue } + -timeout 360 + -re {kernel.function[^\r]*ttime=[0-9]*\r} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } Index: systemtap-20070602/testsuite/systemtap.samples/control_limits.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/control_limits.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/control_limits.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,8 @@ if {![installtest_p]} { untested $test; spawn stap -u -DMAXNESTING=5 $srcdir/$subdir/control_limits.stp set ok 0 expect { - -timeout 60 -re {ERROR.*MAXNESTING} { incr ok; exp_continue } + -timeout 150 + -re {ERROR.*MAXNESTING} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } @@ -14,7 +15,8 @@ set test "control_limits MAXACTION" spawn stap -u -DMAXACTION_INTERRUPTIBLE=500 $srcdir/$subdir/control_limits.stp set ok 0 expect { - -timeout 60 -re {ERROR.*MAXACTION} { incr ok; exp_continue } + -timeout 150 + -re {ERROR.*MAXACTION} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } @@ -24,7 +26,8 @@ set test "control_limits MAXSTRINGLEN sm spawn stap -u -DMAXSTRINGLEN=50 $srcdir/$subdir/control_limits.stp set ok 0 expect { - -timeout 60 -re {ERROR.*MAXSTRINGLEN reduced} { incr ok; exp_continue } + -timeout 150 + -re {ERROR.*MAXSTRINGLEN reduced} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } @@ -34,7 +37,8 @@ set test "control_limits MAXSTRINGLEN la spawn stap -u -DMAXSTRINGLEN=500 $srcdir/$subdir/control_limits.stp set ok 0 expect { - -timeout 60 -re {ERROR.*MAXSTRINGLEN enlarged} { incr ok; exp_continue } + -timeout 150 + -re {ERROR.*MAXSTRINGLEN enlarged} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } Index: systemtap-20070602/testsuite/systemtap.samples/syscalls1.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/syscalls1.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/syscalls1.exp (.../branches/kprobes/usr/src) (revision 214) @@ -4,7 +4,7 @@ if {![installtest_p]} { untested $test; spawn stap -p2 $srcdir/$subdir/syscalls.stp set ok 0 expect { - -timeout 30 + -timeout 180 -re {kernel.function[^\r]*sys_[^\r]*\r} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } Index: systemtap-20070602/testsuite/systemtap.samples/syscalls2.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.samples/syscalls2.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.samples/syscalls2.exp (.../branches/kprobes/usr/src) (revision 214) @@ -3,7 +3,8 @@ if {![installtest_p]} { untested $test; spawn stap $srcdir/$subdir/syscalls.stp set ok 0 expect { - -timeout 60 -re {[0-9]* kernel.function[^\r]*\r} { incr ok; exp_continue } + -timeout 240 + -re {[0-9]* kernel.function[^\r]*\r} { incr ok; exp_continue } timeout { fail "$test (timeout)" } eof { } } Index: systemtap-20070602/testsuite/systemtap.base/cache.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.base/cache.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.base/cache.exp (.../branches/kprobes/usr/src) (revision 214) @@ -27,10 +27,10 @@ proc stap_compile { TEST_NAME flags scri set cached 0 set compile_errors 0 expect { - -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms.\r\n} {exp_continue} + -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms\.\r\n} {exp_continue} -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} # pass-4 output - -re {^/[^\r\n]+.ko\r\n} {exp_continue} + -re {^/[^\r\n]+\.ko\r\n} {exp_continue} -re "compilation failed" {incr compile_errors 1; exp_continue} -re "semantic error:" {incr compile_errors 1; exp_continue} } Index: systemtap-20070602/testsuite/systemtap.base/overload.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.base/overload.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.base/overload.exp (.../branches/kprobes/usr/src) (revision 214) @@ -25,8 +25,9 @@ proc stap_run_overload { TEST_NAME EXPEC set cmd [concat {stap -v} $args] eval spawn $cmd expect { - -re {^Pass\ [1234]: .+real\ ms.\r\n} {exp_continue} - -re {^Pass\ ([34]): using cached .+\r\n} {exp_continue} + -timeout 150 + -re {^Pass\ [1234]: [^\r]+real\ ms\.\r\n} {exp_continue} + -re {^Pass\ ([34]): using cached [^\r]+\r\n} {exp_continue} -re {^Pass 5: starting run.\r\n} {exp_continue} -re {ERROR: probe overhead exceeded threshold\r\n} { if {$EXPECT_OVERLOAD} { @@ -35,10 +36,11 @@ proc stap_run_overload { TEST_NAME EXPEC fail "$TEST_NAME unexpected overload" } } - -timeout 30 -re "^systemtap starting probe\r\n" { + -re "^systemtap starting probe\r\n" { send "\003" expect { + -timeout 10 -re {^systemtap ending probe\r\n} { if {$EXPECT_OVERLOAD} { fail "$TEST_NAME didn't receive expected overload" Index: systemtap-20070602/testsuite/systemtap.syscall/syscall.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.syscall/syscall.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.syscall/syscall.exp (.../branches/kprobes/usr/src) (revision 214) @@ -12,13 +12,16 @@ proc test_procedure {} { # Add any other 64-bit arcvhitecture you want tested below. # To find tcl's platform name for your machine, run the following: # echo "puts $::tcl_platform(machine)" | tclsh - set do_64_bit_pass 0 - if {$::tcl_platform(machine) == "x86_64" || $::tcl_platform(machine) == "ppc64" || $::tcl_platform(machine) == "s390x" } { - set do_64_bit_pass 1 - set flags "additional_flags=-m64" - } - if { $::tcl_platform(machine) == "ia64" } { - set do_64_bit_pass 1 + + switch -regexp $::tcl_platform(machine) { + ^ia64$ + { set do_64_bit_pass 1; set flags "" } + ^(x86_64|ppc64|s390x)$ + { set do_64_bit_pass 1; set flags "additional_flags=-m64" } + ^armv + - + default + { set do_64_bit_pass 0 } } if {$do_64_bit_pass} { @@ -40,15 +43,17 @@ proc test_procedure {} { } } - set do_32_bit_pass 1 - set flags "additional_flags=-m32" - # add any 64-bit only machines to this statement - if { $::tcl_platform(machine) == "ia64" } { - set do_32_bit_pass 0 - } - - if { $::tcl_platform(machine) == "s390x" } { - set flags "additional_flags=-m31" + switch -regexp $::tcl_platform(machine) { + ^(x86_64|ppc64)$ + { set do_32_bit_pass 1; set flags "additional_flags=-m32" } + ^s390x$ + { set do_32_bit_pass 1; set flags "additional_flags=-m31" } + ^armv + { set do_32_bit_pass 1; set flags "" } + ^ia64$ + - + default + { set do_32_bit_pass 0 } } if {$do_32_bit_pass} { Index: systemtap-20070602/testsuite/lib/systemtap.exp =================================================================== --- systemtap-20070602/testsuite/lib/systemtap.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/lib/systemtap.exp (.../branches/kprobes/usr/src) (revision 214) @@ -82,9 +82,9 @@ proc stap_run_batch {args} { } expect { + -timeout -1 -re {[^\r]*\r} { verbose -log $expect_out(0,string); exp_continue } eof { } - timeout { exp_continue } } set results [wait] verbose -log "wait results: $results" Index: systemtap-20070602/testsuite/lib/stap_run.exp =================================================================== --- systemtap-20070602/testsuite/lib/stap_run.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/lib/stap_run.exp (.../branches/kprobes/usr/src) (revision 214) @@ -58,6 +58,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNC -re $output { pass "$TEST_NAME shutdown and output" expect { + -timeout -1 -re {^Pass\ ([5]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)" verbose -log "metric:\t$TEST_NAME $pass1$pass2$pass3$pass4$pass5"} Index: systemtap-20070602/testsuite/lib/stap_run2.exp =================================================================== --- systemtap-20070602/testsuite/lib/stap_run2.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/lib/stap_run2.exp (.../branches/kprobes/usr/src) (revision 214) @@ -29,13 +29,14 @@ proc stap_run2 { TEST_NAME args } { -timeout 180 -re {^Pass\ ([1234]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)"; exp_continue} - -re {^Pass\ ([34]): using cached .+\r\n} + -re {^Pass\ ([34]): using cached [^\r]+\r\n} {set pass$expect_out(1,string) "\t0\t0\t0"; exp_continue} -re {^Pass 5: starting run.\r\n} {exp_continue} -ex $output { pass "$TEST_NAME" expect { - -re {^Pass\ ([5]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms.\r\n} + -timeout 20 + -re {^Pass\ ([5]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)" verbose -log "metric:\t$TEST_NAME $pass1$pass2$pass3$pass4$pass5"} } Index: systemtap-20070602/testsuite/systemtap.stress/conversions.exp =================================================================== --- systemtap-20070602/testsuite/systemtap.stress/conversions.exp (.../vendor/usr/src) (revision 214) +++ systemtap-20070602/testsuite/systemtap.stress/conversions.exp (.../branches/kprobes/usr/src) (revision 214) @@ -11,10 +11,11 @@ foreach value {0 0xffffffff 0xffffffffff set errs 0 verbose -log "exp $test $errs" expect { + -timeout 180 -re {ERROR[^\r\n]*\r\n} { incr errs; exp_continue } -re {WARNING[^\r\n]*\r\n} { incr errs; exp_continue } eof { } - timeout { } + timeout { fail "$test (timeout)" } } verbose -log "done exp $test $errs" wait ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 0:36 ARM port of testsuite and general testsuite fixes Quentin Barnes @ 2007-06-06 16:02 ` David Smith 2007-06-06 17:11 ` Quentin Barnes 2007-06-08 16:27 ` Quentin Barnes 1 sibling, 1 reply; 17+ messages in thread From: David Smith @ 2007-06-06 16:02 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: > The ARM version of the test suite of 20070602 just completed. I'll > post the specifics later. With the earlier patches plus the patch > below, here's the summary using a 2.6.21.1 kernel in case anyone's > curious: > > ======= > === systemtap Summary === > > # of expected passes 277 > # of unexpected failures 37 > # of unexpected successes 1 > # of expected failures 129 > # of known failures 7 > # of untested testcases 30 > # of unsupported tests 3 > ======= Of course it is amazing that you got this working at all, but 37 failures is still quite high. > Below is the patch necessary to fix all timeout problems when running > on an ARM processor and other porting issues related to ARM. > > I didn't go with a strategy that makes the hardcoded timeout values > variable. Once I fixed various testsuite bugs, the timeout values > didn't increase all that much after all. I felt the difference > wasn't enough warrant switching to a new scheme for. If people feel > otherwise, we should discuss it further. Hmm. Looking over the timeout value changes/additions, I see several different values: 20 (1 instance) 60 (1 instance) 120 (4 instances) 150 (17 instances) 180 (3 instances) 240 (4 instances) 360 (1 instance) 400 (1 instance) 1800 (1 instance) It seems like we ought to standardize a bit and have 4 (or some other number) standard timeout values (that we could customize per platform if needed). I think you (or someone else) suggested this earlier. (Note that I don't have a problem with you checking your patch in as is and then we can go back later and improve things.) > There are various bug fixes scattered throughout the patch. Please > review them carefully, but most should be self-explanatory. One question I have is that you changed several instances of "." to "\." in regular expressions. Out of curiosity did you actually see a problem here or were you just cleaning up? -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 16:02 ` David Smith @ 2007-06-06 17:11 ` Quentin Barnes 2007-06-06 18:22 ` David Smith 0 siblings, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 17:11 UTC (permalink / raw) To: David Smith; +Cc: systemtap On Wed, Jun 06, 2007 at 11:01:33AM -0500, David Smith wrote: >Quentin Barnes wrote: >>The ARM version of the test suite of 20070602 just completed. I'll >>post the specifics later. With the earlier patches plus the patch >>below, here's the summary using a 2.6.21.1 kernel in case anyone's >>curious: >> >>======= >> === systemtap Summary === >> >># of expected passes 277 >># of unexpected failures 37 >># of unexpected successes 1 >># of expected failures 129 >># of known failures 7 >># of untested testcases 30 >># of unsupported tests 3 >>======= > >Of course it is amazing that you got this working at all, but 37 >failures is still quite high. Some of them are due to my kernel configuration. I run a stripped down kernel with many things configured off. I've noticed some failures were relying on features being enabled. I've gone back and turned on some of these, but not all. Also, I don't know how many of them are due the tests needing updating to later kernels. These more detailed summaries I see posted listing specific failures, are these processed by a script or are they just hand massaged output from the log by people each time? Here's the list of my tests failures: ======= $ egrep '^(FAIL|XPASS)' systemtap.log FAIL: BASIC2 wasn't cached FAIL: OPTION2 wasn't cached FAIL: BULK2 wasn't cached FAIL: MERGE2 wasn't cached FAIL: RUNTIME2 wasn't cached FAIL: BASIC4 wasn't cached FAIL: systemtap.base/deref.stp startup (eof) FAIL: systemtap.base/optim.stp shutdown (eof) FAIL: OVERLOAD2 didn't receive expected overload FAIL: probefunc:kernel.statement(0xc0035c54).absolute shutdown (eof) FAIL: prologues -P FAIL: prologues no-P FAIL: buildok/eighteen.stp FAIL: buildok/four.stp FAIL: buildok/memory.stp FAIL: buildok/scsi.stp FAIL: buildok/tcp_test.stp FAIL: buildok/twenty.stp FAIL: buildok/twentyfive.stp FAIL: buildok/twentythree.stp FAIL: buildok/udp_test.stp XPASS: semko/thirtytwo.stp FAIL: semok/twelve.stp FAIL: semok/twenty.stp FAIL: systemtap.samples/lket(semantic error) FAIL: pfaults (0) FAIL: profile FAIL: systemtap.samples/tcptest.stp compilation FAIL: transport fill staging buffer - relayfs (0) FAIL: systemtap.stress/current.stp compilation FAIL: 32-bit acct FAIL: 32-bit forkwait FAIL: 32-bit mmap FAIL: 32-bit net1 FAIL: 32-bit openclose FAIL: 32-bit stat ======= If someone wants to make a quick pass over this list to flag which failures definitely are unexpected for my kernel and architecture, I'll give those priority in analyzing. I just didn't want to waste a lot of time dealing with already known problems. >>Below is the patch necessary to fix all timeout problems when running >>on an ARM processor and other porting issues related to ARM. >> >>I didn't go with a strategy that makes the hardcoded timeout values >>variable. Once I fixed various testsuite bugs, the timeout values >>didn't increase all that much after all. I felt the difference >>wasn't enough warrant switching to a new scheme for. If people feel >>otherwise, we should discuss it further. > >Hmm. Looking over the timeout value changes/additions, I see several >different values: > >20 (1 instance) >60 (1 instance) >120 (4 instances) >150 (17 instances) >180 (3 instances) >240 (4 instances) >360 (1 instance) >400 (1 instance) >1800 (1 instance) There's also a couple of "-1"s in there. I put these in when the expect statement had no timeout clause, but they all have timeouts. Someone might want to review and tweak these if there is ever a chance that those could get stuck and need an explicit timeout. >It seems like we ought to standardize a bit and have 4 (or some other >number) standard timeout values (that we could customize per platform if >needed). I think you (or someone else) suggested this earlier. I tried to make them on some rounded boundaries that I knew would work based on the timing data from the run but not too large. I generally went for rounded up multiples of 30. >(Note that I don't have a problem with you checking your patch in as is >and then we can go back later and improve things.) > >>There are various bug fixes scattered throughout the patch. Please >>review them carefully, but most should be self-explanatory. > >One question I have is that you changed several instances of "." to "\." >in regular expressions. Out of curiosity did you actually see a problem >here or were you just cleaning up? Nope, just cleanup. If I was studying a line related to a failure I was analyzing and I saw an unescaped meta character that should have been escaped, I escaped it. Then, I would grep for similar lines in the rest of the scripts figuring on yank-and-put propagation of the mistake and fix those too. The change from if to switch that I mentioned was just for robustness, but the other pattern changes involving ".*" to "[^\r]*" and the rewrite in system_func.exp were actual bug related. >-- >David Smith >dsmith@redhat.com >Red Hat >http://www.redhat.com >256.217.0141 (direct) >256.837.0057 (fax) Quentin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 17:11 ` Quentin Barnes @ 2007-06-06 18:22 ` David Smith 2007-06-06 18:39 ` Martin Hunt 2007-06-06 19:25 ` Quentin Barnes 0 siblings, 2 replies; 17+ messages in thread From: David Smith @ 2007-06-06 18:22 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: > On Wed, Jun 06, 2007 at 11:01:33AM -0500, David Smith wrote: >> Quentin Barnes wrote: >>> The ARM version of the test suite of 20070602 just completed. I'll >>> post the specifics later. With the earlier patches plus the patch >>> below, here's the summary using a 2.6.21.1 kernel in case anyone's >>> curious: >>> >>> ======= >>> === systemtap Summary === >>> >>> # of expected passes 277 >>> # of unexpected failures 37 >>> # of unexpected successes 1 >>> # of expected failures 129 >>> # of known failures 7 >>> # of untested testcases 30 >>> # of unsupported tests 3 >>> ======= >> >> Of course it is amazing that you got this working at all, but 37 >> failures is still quite high. > > Some of them are due to my kernel configuration. I run a stripped > down kernel with many things configured off. I've noticed some > failures were relying on features being enabled. I've gone back and > turned on some of these, but not all. Also, I don't know how many > of them are due the tests needing updating to later kernels. > > Here's the list of my tests failures: I'll comment on a few test cases that I'm familiar with. > ======= > $ egrep '^(FAIL|XPASS)' systemtap.log > FAIL: BASIC2 wasn't cached > FAIL: OPTION2 wasn't cached > FAIL: BULK2 wasn't cached > FAIL: MERGE2 wasn't cached > FAIL: RUNTIME2 wasn't cached > FAIL: BASIC4 wasn't cached Hmm, those are odd. Those are related to caching problems, which should be platform agnostic. Can you send me the full log of the run of systemtap.base/cache.exp? > FAIL: OVERLOAD2 didn't receive expected overload This one probably needs adjusting for arm. It expects the background system processing to cause the systemtap script to overload (since the overload parameters have been dramatically lowered). Can you send me the full log of the run of systemtap.base/overload.exp? -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 18:22 ` David Smith @ 2007-06-06 18:39 ` Martin Hunt 2007-06-06 19:25 ` Quentin Barnes 1 sibling, 0 replies; 17+ messages in thread From: Martin Hunt @ 2007-06-06 18:39 UTC (permalink / raw) To: David Smith; +Cc: Quentin Barnes, systemtap On Wed, 2007-06-06 at 13:22 -0500, David Smith wrote: > > > FAIL: OVERLOAD2 didn't receive expected overload > > This one probably needs adjusting for arm. It expects the background > system processing to cause the systemtap script to overload (since the > overload parameters have been dramatically lowered). You might take a look at http://sources.redhat.com/bugzilla/show_bug.cgi?id=4569 Martin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 18:22 ` David Smith 2007-06-06 18:39 ` Martin Hunt @ 2007-06-06 19:25 ` Quentin Barnes 2007-06-06 19:51 ` David Smith 1 sibling, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 19:25 UTC (permalink / raw) To: David Smith; +Cc: systemtap >I'll comment on a few test cases that I'm familiar with. > >>======= >>$ egrep '^(FAIL|XPASS)' systemtap.log >>FAIL: BASIC2 wasn't cached >>FAIL: OPTION2 wasn't cached >>FAIL: BULK2 wasn't cached >>FAIL: MERGE2 wasn't cached >>FAIL: RUNTIME2 wasn't cached >>FAIL: BASIC4 wasn't cached > >Hmm, those are odd. Those are related to caching problems, which should >be platform agnostic. Can you send me the full log of the run of >systemtap.base/cache.exp? There wasn't that much in the log: ===== testcase /usr/src/systemtap-20070602/testsuite/systemtap.base/bench.exp completed in 143 seconds Running /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp ... PASS: BASIC1 wasn't cached FAIL: BASIC2 wasn't cached PASS: OPTION1 wasn't cached FAIL: OPTION2 wasn't cached PASS: BULK1 wasn't cached FAIL: BULK2 wasn't cached PASS: MERGE1 wasn't cached FAIL: MERGE2 wasn't cached PASS: RUNTIME1 wasn't cached FAIL: RUNTIME2 wasn't cached Warning: failed to create systemtap data directory ("/dev/null"): Not a directory^M Disabling cache support.^M PASS: DISABLED1 wasn't cached Warning: failed to create systemtap data directory ("/dev/null"): Not a directory^M Disabling cache support.^M PASS: DISABLED2 wasn't cached Warning: using '-m' disables cache support.^M PASS: MODNAM1 wasn't cached Warning: using '-m' disables cache support.^M PASS: MODNAM2 wasn't cached PASS: ERROR1 wasn't cached PASS: ERROR2 wasn't cached PASS: BASIC3 wasn't cached FAIL: BASIC4 wasn't cached testcase /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp completed in 183 seconds ===== In hopes of getting more info, I reran it with: ===== # runtest --all --verbose --verbose --tool_opts=install \ --tool systemtap --srcdir "/usr/src/systemtap-20070602/testsuite" \ systemtap.base/cache.exp Running /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp ... PASS: BASIC1 wasn't cached FAIL: BASIC2 wasn't cached PASS: OPTION1 wasn't cached FAIL: OPTION2 wasn't cached PASS: BULK1 wasn't cached FAIL: BULK2 wasn't cached PASS: MERGE1 wasn't cached FAIL: MERGE2 wasn't cached ERROR: tcl error sourcing /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp. ERROR: can't read "env(SYSTEMTAP_RUNTIME)": no such variable while executing "exec /bin/ln -s $env(SYSTEMTAP_RUNTIME) $new_runtime" (file "/usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" line 105) invoked from within "source /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" ("uplevel" body line 1) invoked from within "uplevel #0 source /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" invoked from within "catch "uplevel #0 source $test_file_name"" ===== Grumble. It looks like this test is expecting to be invoked from the Makefile only. Is this a legal assumption? There's no supported way to run some tests directly outside of the Makefile, or is this test busted? >>FAIL: OVERLOAD2 didn't receive expected overload > >This one probably needs adjusting for arm. It expects the background >system processing to cause the systemtap script to overload (since the >overload parameters have been dramatically lowered). > >Can you send me the full log of the run of systemtap.base/overload.exp? There's Martin's note on this that may be the problem, but here is the log just in case. Not much here: ===== Running /usr/src/systemtap-20070602/testsuite/systemtap.base/overload.exp ... Pass 1: parsed user script and 53 library script(s) in 8530usr/8900sys/17441real ms.^M Pass 2: analyzed script: 4 probe(s), 0 function(s), 0 embed(s), 1 global(s) in 4420usr/36630sys/86859real ms.^M Pass 3: translated to C into "/tmp/stap7ZpRAI/stap_49444f1d762d7dd03f9f1261927c6901_685.c" in 20usr/410sys/593real ms.^M Pass 4: compiled C into "stap_49444f1d762d7dd03f9f1261927c6901_685.ko" in 87270usr/25880sys/124170real ms.^M Pass 5: starting run.^M systemtap starting probe^M systemtap ending probe^M Pass 5: run completed in 380usr/2200sys/4515real ms.^M PASS: OVERLOAD1 didn't overload Pass 1: parsed user script and 53 library script(s) in 8690usr/9790sys/19363real ms.^M Pass 2: analyzed script: 4 probe(s), 0 function(s), 0 embed(s), 1 global(s) in 4570usr/29450sys/79570real ms.^M Pass 3: translated to C into "/tmp/stapNwKXnw/stap_1e3558f4d38ba9c8739da2d566aeac82_741.c" in 50usr/500sys/617real ms.^M Pass 4: compiled C into "stap_1e3558f4d38ba9c8739da2d566aeac82_741.ko" in 87560usr/27490sys/120262real ms.^M Pass 5: starting run.^M systemtap starting probe^M systemtap ending probe^M Pass 5: run completed in 400usr/2750sys/6657real ms.^M FAIL: OVERLOAD2 didn't receive expected overload Pass 1: parsed user script and 53 library script(s) in 8580usr/9820sys/18982real ms.^M Pass 2: analyzed script: 4 probe(s), 0 function(s), 0 embed(s), 1 global(s) in 4050usr/29450sys/38291real ms.^M Pass 3: translated to C into "/tmp/stappxKjB8/stap_9b34ad72d58a658e7a328026dcd15944_756.c" in 30usr/410sys/503real ms.^M Pass 4: compiled C into "stap_9b34ad72d58a658e7a328026dcd15944_756.ko" in 86170usr/27310sys/117645real ms.^M Pass 5: starting run.^M systemtap starting probe^M systemtap ending probe^M PASS: OVERLOAD3 didn't overload testcase /usr/src/systemtap-20070602/testsuite/systemtap.base/overload.exp completed in 656 seconds ===== Is this helpful? Is there a way to rerun it to get more info out of it? >-- >David Smith >dsmith@redhat.com >Red Hat >http://www.redhat.com >256.217.0141 (direct) >256.837.0057 (fax) Quentin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 19:25 ` Quentin Barnes @ 2007-06-06 19:51 ` David Smith 2007-06-06 20:00 ` Quentin Barnes 0 siblings, 1 reply; 17+ messages in thread From: David Smith @ 2007-06-06 19:51 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: >> I'll comment on a few test cases that I'm familiar with. >> >>> ======= >>> $ egrep '^(FAIL|XPASS)' systemtap.log >>> FAIL: BASIC2 wasn't cached >>> FAIL: OPTION2 wasn't cached >>> FAIL: BULK2 wasn't cached >>> FAIL: MERGE2 wasn't cached >>> FAIL: RUNTIME2 wasn't cached >>> FAIL: BASIC4 wasn't cached >> >> Hmm, those are odd. Those are related to caching problems, which >> should be platform agnostic. Can you send me the full log of the run >> of systemtap.base/cache.exp? > > There wasn't that much in the log: I need the output from systemtap.log, not systemtap.sum. The former has the complete output. > In hopes of getting more info, I reran it with: > ===== > # runtest --all --verbose --verbose --tool_opts=install \ > --tool systemtap --srcdir "/usr/src/systemtap-20070602/testsuite" \ > systemtap.base/cache.exp > Running /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp ... > PASS: BASIC1 wasn't cached > FAIL: BASIC2 wasn't cached > PASS: OPTION1 wasn't cached > FAIL: OPTION2 wasn't cached > PASS: BULK1 wasn't cached > FAIL: BULK2 wasn't cached > PASS: MERGE1 wasn't cached > FAIL: MERGE2 wasn't cached > ERROR: tcl error sourcing > /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp. > ERROR: can't read "env(SYSTEMTAP_RUNTIME)": no such variable > while executing > "exec /bin/ln -s $env(SYSTEMTAP_RUNTIME) $new_runtime" > (file > "/usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" line 105) > invoked from within > "source /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" > ("uplevel" body line 1) > invoked from within > "uplevel #0 source > /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp" > invoked from within > "catch "uplevel #0 source $test_file_name"" > ===== > > Grumble. It looks like this test is expecting to be invoked > from the Makefile only. Is this a legal assumption? There's no > supported way to run some tests directly outside of the Makefile, > or is this test busted? To run this test outside of the makefile, you'd do: # SYSTEMTAP_RUNTIME=/usr/local/share/systemtap/runtime \ SYSTEMTAP_TAPSET=/usr/local/share/systemtap/tapset \ LD_LIBRARY_PATH=/usr/local/lib/systemtap \ runtest --tool_opts install --tool systemtap \ --srcdir `pwd` systemtap.base/cache.exp (You might need to customize the above command line for the way you compile - the above assumes an install location of /usr/local and that you compile in your source directory.) Most other tests probably wouldn't need the environment variables, but this one does. BTW, the above command line is just running the test the way the makefile would - do "make -n installcheck". >>> FAIL: OVERLOAD2 didn't receive expected overload >> >> This one probably needs adjusting for arm. It expects the background >> system processing to cause the systemtap script to overload (since the >> overload parameters have been dramatically lowered). >> >> Can you send me the full log of the run of systemtap.base/overload.exp? > > There's Martin's note on this that may be the problem, but here is the > log just in case. Not much here: Martin is correct - this is a get_cycles() problem, since the overload stuff is based on cycle counts. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 19:51 ` David Smith @ 2007-06-06 20:00 ` Quentin Barnes 2007-06-06 20:07 ` David Smith 0 siblings, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 20:00 UTC (permalink / raw) To: David Smith; +Cc: systemtap >>There wasn't that much in the log: > >I need the output from systemtap.log, not systemtap.sum. The former has >the complete output. That _was_ from systemtap.log. That was as complete as the log gets for this test. Is there a way to get it to put more in the log? (Systemtap.sum is nearly the same. It is only missing the four warning messages and the "testcase .. completed in ..." message that show up in systemtap.log.) >>Grumble. It looks like this test is expecting to be invoked >>from the Makefile only. Is this a legal assumption? There's no >>supported way to run some tests directly outside of the Makefile, >>or is this test busted? > >To run this test outside of the makefile, you'd do: > ># SYSTEMTAP_RUNTIME=/usr/local/share/systemtap/runtime \ >SYSTEMTAP_TAPSET=/usr/local/share/systemtap/tapset \ >LD_LIBRARY_PATH=/usr/local/lib/systemtap \ >runtest --tool_opts install --tool systemtap \ >--srcdir `pwd` systemtap.base/cache.exp > >(You might need to customize the above command line for the way you >compile - the above assumes an install location of /usr/local and that >you compile in your source directory.) > >Most other tests probably wouldn't need the environment variables, but >this one does. > >BTW, the above command line is just running the test the way the >makefile would - do "make -n installcheck". Okay, I'll adjust my script. Quentin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 20:00 ` Quentin Barnes @ 2007-06-06 20:07 ` David Smith 2007-06-06 20:39 ` Quentin Barnes 0 siblings, 1 reply; 17+ messages in thread From: David Smith @ 2007-06-06 20:07 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: >>> There wasn't that much in the log: >> >> I need the output from systemtap.log, not systemtap.sum. The former >> has the complete output. > > That _was_ from systemtap.log. That was as complete as the log > gets for this test. Is there a way to get it to put more in the log? Odd. Here's the start of what I get in systemtap.log when I run cache.exp: ==== Running /home/dsmith/src/systemtap/src/testsuite/systemtap.base/cache.exp ... Pass 1: parsed user script and 54 library script(s) in 510usr/30sys/534real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 10usr/0sys/11real ms.^M Pass 3: translated to C into "/tmp/stap8DZ2HR/stap_8e7402c8418c2026eb9438cf74d7ebf2_143.c" in 0usr/0sys/1real ms.^M /home/dsmith/src/systemtap/src/testsuite/.cache_test/cache/8e/stap_8e7402c8418c2026eb9438cf74d7ebf2_143.ko^M Pass 4: compiled C into "stap_8e7402c8418c2026eb9438cf74d7ebf2_143.ko" in 3040usr/930sys/3832real ms.^M PASS: BASIC1 wasn't cached ==== I'm unsure as why you aren't getting the full information. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 20:07 ` David Smith @ 2007-06-06 20:39 ` Quentin Barnes 2007-06-06 21:01 ` David Smith 0 siblings, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 20:39 UTC (permalink / raw) To: David Smith; +Cc: systemtap On Wed, Jun 06, 2007 at 03:07:26PM -0500, David Smith wrote: >Quentin Barnes wrote: >>>>There wasn't that much in the log: >>> >>>I need the output from systemtap.log, not systemtap.sum. The former >>>has the complete output. >> >>That _was_ from systemtap.log. That was as complete as the log >>gets for this test. Is there a way to get it to put more in the log? > >Odd. Here's the start of what I get in systemtap.log when I run cache.exp: > >==== >Running >/home/dsmith/src/systemtap/src/testsuite/systemtap.base/cache.exp ... >Pass 1: parsed user script and 54 library script(s) in >510usr/30sys/534real ms.^M >Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 >global(s) in 10usr/0sys/11real ms.^M >Pass 3: translated to C into >"/tmp/stap8DZ2HR/stap_8e7402c8418c2026eb9438cf74d7ebf2_143.c" in >0usr/0sys/1real ms.^M >/home/dsmith/src/systemtap/src/testsuite/.cache_test/cache/8e/stap_8e7402c8418c2026eb9438cf74d7ebf2_143.ko^M >Pass 4: compiled C into "stap_8e7402c8418c2026eb9438cf74d7ebf2_143.ko" >in 3040usr/930sys/3832real ms.^M >PASS: BASIC1 wasn't cached >==== > >I'm unsure as why you aren't getting the full information. Ah, ha! I do now. It's another expect test script bug. It is missing its timeout parameter. (Patch below log output.) Still the same six failures though. Here's the output from cache.exp after adding the timeout patch: ===== Running /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp ... Pass 1: parsed user script and 53 library script(s) in 8400usr/9330sys/17801real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 120usr/140sys/261real ms.^M Pass 3: translated to C into "/tmp/stapf82Z9z/stap_ea86208e9a0e159926d52fe9d08590cf_132.c" in 0usr/30sys/53real ms.^M PASS: BASIC1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8550usr/8770sys/17322real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 170usr/60sys/222real ms.^M Pass 3: translated to C into "/tmp/stapUl2TCg/stap_ea86208e9a0e159926d52fe9d08590cf_132.c" in 0usr/30sys/35real ms.^M FAIL: BASIC2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8310usr/9060sys/17389real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 100usr/130sys/230real ms.^M Pass 3: translated to C into "/tmp/stapQnfpEe/stap_b44211db289fab36974b74999b647020_137.c" in 30usr/10sys/37real ms.^M PASS: OPTION1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8650usr/8670sys/17318real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 110usr/120sys/227real ms.^M Pass 3: translated to C into "/tmp/stapLeTwRf/stap_b44211db289fab36974b74999b647020_137.c" in 10usr/10sys/40real ms.^M FAIL: OPTION2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8450usr/8930sys/17378real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 130usr/100sys/223real ms.^M Pass 3: translated to C into "/tmp/stapoagcph/stap_e341abf452ea8c3d30ee724d513400c1_132.c" in 10usr/10sys/35real ms.^M PASS: BULK1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8720usr/8590sys/17325real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 160usr/70sys/223real ms.^M Pass 3: translated to C into "/tmp/stapDviH0r/stap_e341abf452ea8c3d30ee724d513400c1_132.c" in 0usr/30sys/34real ms.^M FAIL: BULK2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8230usr/9140sys/17371real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 160usr/70sys/224real ms.^M Pass 3: translated to C into "/tmp/stapUBa1qz/stap_8cc00e3d47f912c8f34fe70279405613_132.c" in 0usr/40sys/35real ms.^M PASS: MERGE1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8430usr/8870sys/17303real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 130usr/90sys/226real ms.^M Pass 3: translated to C into "/tmp/staptDbJWE/stap_8cc00e3d47f912c8f34fe70279405613_132.c" in 10usr/30sys/34real ms.^M FAIL: MERGE2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8560usr/8800sys/17365real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 130usr/100sys/223real ms.^M Pass 3: translated to C into "/tmp/stapHcuKwX/stap_53f464cf5c18e6dd496a4425f9f5dc5e_155.c" in 0usr/30sys/33real ms.^M PASS: RUNTIME1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8420usr/8950sys/17381real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 130usr/100sys/223real ms.^M Pass 3: translated to C into "/tmp/stap2wg8j5/stap_53f464cf5c18e6dd496a4425f9f5dc5e_155.c" in 0usr/40sys/37real ms.^M FAIL: RUNTIME2 wasn't cached Warning: failed to create systemtap data directory ("/dev/null"): Not a directory^M Disabling cache support.^M Pass 1: parsed user script and 53 library script(s) in 8600usr/8780sys/17396real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 70usr/160sys/229real ms.^M Pass 3: translated to C into "/tmp/stapbmimxe/stap_12000.c" in 10usr/10sys/40real ms.^M PASS: DISABLED1 wasn't cached Warning: failed to create systemtap data directory ("/dev/null"): Not a directory^M Disabling cache support.^M Pass 1: parsed user script and 53 library script(s) in 8740usr/8550sys/17292real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 120usr/110sys/231real ms.^M Pass 3: translated to C into "/tmp/stapiPc9Og/stap_12097.c" in 10usr/10sys/38real ms.^M PASS: DISABLED2 wasn't cached Warning: using '-m' disables cache support.^M Pass 1: parsed user script and 53 library script(s) in 8680usr/8650sys/17339real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 170usr/50sys/226real ms.^M Pass 3: translated to C into "/tmp/stapPBb0Ib/modnam.c" in 0usr/40sys/36real ms.^M PASS: MODNAM1 wasn't cached Warning: using '-m' disables cache support.^M Pass 1: parsed user script and 53 library script(s) in 8200usr/9160sys/17355real ms.^M Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 130usr/90sys/227real ms.^M Pass 3: translated to C into "/tmp/stapiETKfd/modnam.c" in 10usr/20sys/35real ms.^M PASS: MODNAM2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8430usr/8890sys/17334real ms.^M semantic error: probe point mismatch at position 0 (alternatives: _addevent _lket_internal _signal addevent begin begin(number) end end(number) generic ioblock ioscheduler kernel lket_internal module(string) netdev never nfs nfsd perfmon process process(number) register_event scheduler scsi signal socket sunrpc syscall tcp timer udp vfs vm) while resolving probe point XbeginX^M Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 140usr/150sys/297real ms.^M Pass 2: analysis failed. Try again with more '-v' (verbose) options.^M PASS: ERROR1 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8610usr/8720sys/17330real ms.^M semantic error: probe point mismatch at position 0 (alternatives: _addevent _lket_internal _signal addevent begin begin(number) end end(number) generic ioblock ioscheduler kernel lket_internal module(string) netdev never nfs nfsd perfmon process process(number) register_event scheduler scsi signal socket sunrpc syscall tcp timer udp vfs vm) while resolving probe point XbeginX^M Pass 2: analyzed script: 0 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 100usr/120sys/232real ms.^M Pass 2: analysis failed. Try again with more '-v' (verbose) options.^M PASS: ERROR2 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8500usr/8890sys/17387real ms.^M Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 80usr/150sys/225real ms.^M Pass 3: translated to C into "/tmp/stap5w570l/stap_3b976153d06020741dca6ae5a4999cc5_165.c" in 10usr/30sys/38real ms.^M PASS: BASIC3 wasn't cached Pass 1: parsed user script and 53 library script(s) in 8940usr/8380sys/17335real ms.^M Pass 2: analyzed script: 2 probe(s), 0 function(s), 0 embed(s), 0 global(s) in 110usr/120sys/230real ms.^M Pass 3: translated to C into "/tmp/stapWuZstx/stap_3b976153d06020741dca6ae5a4999cc5_165.c" in 0usr/30sys/41real ms.^M FAIL: BASIC4 wasn't cached testcase /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp completed in 735 seconds ===== Index: systemtap.base/cache.exp =================================================================== --- systemtap.base/cache.exp (revision 211) +++ systemtap.base/cache.exp (working copy) @@ -27,6 +27,7 @@ set cached 0 set compile_errors 0 expect { + -timeout 30 -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms\.\r\n} {exp_continue} -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} # pass-4 output >David Smith >dsmith@redhat.com >Red Hat >http://www.redhat.com >256.217.0141 (direct) >256.837.0057 (fax) Quentin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 20:39 ` Quentin Barnes @ 2007-06-06 21:01 ` David Smith 2007-06-06 21:35 ` Quentin Barnes 0 siblings, 1 reply; 17+ messages in thread From: David Smith @ 2007-06-06 21:01 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: > On Wed, Jun 06, 2007 at 03:07:26PM -0500, David Smith wrote: >> Quentin Barnes wrote: > >> I'm unsure as why you aren't getting the full information. > > Ah, ha! I do now. It's another expect test script bug. It is > missing its timeout parameter. (Patch below log output.) Still > the same six failures though. Here's the output from cache.exp > after adding the timeout patch: > ===== > Running /usr/src/systemtap-20070602/testsuite/systemtap.base/cache.exp ... > Pass 1: parsed user script and 53 library script(s) in > 8400usr/9330sys/17801real ms.^M > Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 > global(s) in 120usr/140sys/261real ms.^M > Pass 3: translated to C into > "/tmp/stapf82Z9z/stap_ea86208e9a0e159926d52fe9d08590cf_132.c" in > 0usr/30sys/53real ms.^M > PASS: BASIC1 wasn't cached > Pass 1: parsed user script and 53 library script(s) in > 8550usr/8770sys/17322real ms.^M > Pass 2: analyzed script: 1 probe(s), 0 function(s), 0 embed(s), 0 > global(s) in 170usr/60sys/222real ms.^M > Pass 3: translated to C into > "/tmp/stapUl2TCg/stap_ea86208e9a0e159926d52fe9d08590cf_132.c" in > 0usr/30sys/35real ms.^M > FAIL: BASIC2 wasn't cached Well, you've improved things, but you're still missing the "Pass 4" output line. As to what we *can* see, something odd is going on. BASIC1 just tests that the first compile of a script isn't cached. So far so good in your output. BASIC2 compiles the same script, expecting it to be cached. Yours wasn't (since the Pass 3 line didn't say "using cached"). Let's try some simple tests by hand. Here's what I get when I compile the same simple script twice: # stap -v -p4 -e 'probe begin { log("hello") }' Pass 1: parsed user script and 54 library script(s) in 520usr/20sys/542real ms. Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 10usr/0sys/11real ms. Pass 3: translated to C into "/tmp/stapHTajTu/stap_18fff0808dbc7fac961586069aa96877_233.c" in 0usr/0sys/1real ms. /home/dsmith/.systemtap/cache/18/stap_18fff0808dbc7fac961586069aa96877_233.ko Pass 4: compiled C into "stap_18fff0808dbc7fac961586069aa96877_233.ko" in 3090usr/810sys/3770real ms. # stap -v -p4 -e 'probe begin { log("hello") }' Pass 1: parsed user script and 54 library script(s) in 510usr/20sys/536real ms. Pass 2: analyzed script: 1 probe(s), 1 function(s), 0 embed(s), 0 global(s) in 10usr/0sys/11real ms. /home/dsmith/.systemtap/cache/18/stap_18fff0808dbc7fac961586069aa96877_233.ko Pass 3: using cached /home/dsmith/.systemtap/cache/18/stap_18fff0808dbc7fac961586069aa96877_233.c Pass 4: using cached /home/dsmith/.systemtap/cache/18/stap_18fff0808dbc7fac961586069aa96877_233.ko -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 21:01 ` David Smith @ 2007-06-06 21:35 ` Quentin Barnes 2007-06-06 21:51 ` David Smith 0 siblings, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 21:35 UTC (permalink / raw) To: David Smith; +Cc: systemtap >Well, you've improved things, but you're still missing the "Pass 4" >output line. That's because of another bug in the expect script. (I've fixed a dozen of these bugs now so I'm rather disappointed with myself that I missed this one until now.) Patched attached. With the patch, systemtap.base/cache.exp passes all 18 tests just fine now. I had to bump the timeout up too. I added a "timeout" condition to be complete. As an aside, any reason that spaces are escaped in these regular expressions? I didn't change it in this patch, but why are the regular expressions written like this: -re {^Pass\ [1234]:[^\r]*\ in\ [^\r]*\ ms\.\r\n} {exp_continue} -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} And not like this?: -re {^Pass [1234]:[^\r]* in [^\r]* ms\.\r\n} {exp_continue} -re {^Pass [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} Quentin Index: systemtap.base/cache.exp =================================================================== --- systemtap.base/cache.exp (revision 211) +++ systemtap.base/cache.exp (working copy) @@ -27,12 +27,14 @@ set cached 0 set compile_errors 0 expect { - -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms\.\r\n} {exp_continue} + -timeout 90 + -re {^Pass\ [1234]:[^\r]*\ in\ [^\r]*\ ms\.\r\n} {exp_continue} -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} # pass-4 output -re {^/[^\r\n]+\.ko\r\n} {exp_continue} -re "compilation failed" {incr compile_errors 1; exp_continue} -re "semantic error:" {incr compile_errors 1; exp_continue} + timeout { fail "$test (timeout)" } } catch close wait ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 21:35 ` Quentin Barnes @ 2007-06-06 21:51 ` David Smith 2007-06-06 23:10 ` Roland McGrath 0 siblings, 1 reply; 17+ messages in thread From: David Smith @ 2007-06-06 21:51 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap Quentin Barnes wrote: >> Well, you've improved things, but you're still missing the "Pass 4" >> output line. > > That's because of another bug in the expect script. (I've fixed a > dozen of these bugs now so I'm rather disappointed with myself that > I missed this one until now.) Great! I'm glad you fixed it. > As an aside, any reason that spaces are escaped in these regular > expressions? I didn't change it in this patch, but why are the > regular expressions written like this: > -re {^Pass\ [1234]:[^\r]*\ in\ [^\r]*\ ms\.\r\n} {exp_continue} > -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} > > And not like this?: > -re {^Pass [1234]:[^\r]* in [^\r]* ms\.\r\n} {exp_continue} > -re {^Pass [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue} Good question. I believe it is to work around an expect bug - someone else might remember the details. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax) ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 21:51 ` David Smith @ 2007-06-06 23:10 ` Roland McGrath 2007-06-06 23:44 ` Quentin Barnes 0 siblings, 1 reply; 17+ messages in thread From: Roland McGrath @ 2007-06-06 23:10 UTC (permalink / raw) To: David Smith; +Cc: Quentin Barnes, systemtap The difference in tcl between {foo bar} and {foo\ bar} is whether as a list it's considered two elements or one, so that might be the issue. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 23:10 ` Roland McGrath @ 2007-06-06 23:44 ` Quentin Barnes 2007-06-07 1:05 ` Roland McGrath 0 siblings, 1 reply; 17+ messages in thread From: Quentin Barnes @ 2007-06-06 23:44 UTC (permalink / raw) To: Roland McGrath; +Cc: systemtap >The difference in tcl between {foo bar} and {foo\ bar} is whether as a list >it's considered two elements or one, so that might be the issue. I don't know the nuances of the TCL language. In the grammar, do brackets always define a list, or only when the preceding keyword is syntactically expecting a list to follow? If whitespace is being parsed as a list separator, I would expect these two statements to be equivalent: -re {^hi there} ... and: -re {^hi there} ... But they are not. I couldn't come up with a test case where escaping the space made any actual difference. (Just conceptual difference?) Is there a subtle case where the distinction matters? Quentin ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 23:44 ` Quentin Barnes @ 2007-06-07 1:05 ` Roland McGrath 0 siblings, 0 replies; 17+ messages in thread From: Roland McGrath @ 2007-06-07 1:05 UTC (permalink / raw) To: Quentin Barnes; +Cc: systemtap > I don't know the nuances of the TCL language. Noone wants to. > In the grammar, [...] That is a laughably generous term to use in reference to tcl. Values aren't typed. It's a string with {}s in it, or without {}s in it, or something. It's hard to tell. It's parsed into a list when used as a list. I don't know what difference any of this makes to the case in question, it just came to mind as why gratuitous \s might be relevant. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: ARM port of testsuite and general testsuite fixes 2007-06-06 0:36 ARM port of testsuite and general testsuite fixes Quentin Barnes 2007-06-06 16:02 ` David Smith @ 2007-06-08 16:27 ` Quentin Barnes 1 sibling, 0 replies; 17+ messages in thread From: Quentin Barnes @ 2007-06-08 16:27 UTC (permalink / raw) To: systemtap I finished analyzing the six remaining syscalls test failures that I had: acct, forkwait, mmap, net1, openclose, and stat. I fixed "acct" by setting CONFIG_BSD_PROCESS_ACCT=y in my kernel's .config file. Two others I've fixed too, "net1" and "stat". They needed changes to tapset's syscall*.stp files. Patch below. ARM has old ABI functions that wrapper and convert the older calls to the new calls. Normally the sys_oabi_* routines call their equivalent sys_* routines so most all work. However, this isn't true for the OABI stat calls which call vfs_* versions directly. I added those. I also made a couple of gratuitous changes to "send" and "sendfile". A reviewer should feel free to reject them if they don't think they're right. However, the remaining three tests still fail for me. The "forkwait" test fails simply because the test's output is returning "fork" when the script is expecting "clone". I've looked at the test code, the tapset code, and the kernel code. As far as I can tell, "fork" is the right answer for the test as written. The function "do_fork" is called with SIGCHLD (17) as the first parameter. This should decode by tapset/syscalls.stp as "fork", not "clone" and that's what's happening. The forkwait.c test I feel is broken and should be expecting "fork". Why isn't this test failing for other platforms? Am I misunderstanding the code or is it some other difference? The "mmap" test fails because the test can't put a kprobe on "sys_mmap2". On ARM, this is an assembly function that does not have any DWARF information. What's the best way to deal with this? I suppose I could add the DWARF information for the function in its assembly file. Is this considered the best solution? A possibility without changing kernel code is to use "do_mmap2" instead of "sys_mmap2". Would that be preferred? (If I follow how things work, the latter would get messy because not everyone has do_mmap2 and leaving sys_mmap2 hook would then cause double outputs for systems with both.) The "openclose" test fails because the test "open ("foobar2", O_RDWR|O_DIRECT) = -22 (EINVAL)" fails. My guess is that this test fails because I'm running on an NFS file system and O_DIRECT must be forbidden for that file system type. Would that make sense? If so, what's the best way to fix this test? Remove this test case line that expects O_DIRECT to always work? Quentin Index: systemtap-20070602/tapset/syscalls.stp =================================================================== --- systemtap-20070602/tapset/syscalls.stp (.../vendor/usr/src) (revision 218) +++ systemtap-20070602/tapset/syscalls.stp (.../branches/kprobes/usr/src) (revision 218) @@ -642,7 +642,11 @@ probe syscall.fchown16.return = kernel.f # fcntl ______________________________________________________ # long sys_fcntl(int fd, unsigned int cmd, unsigned long arg) -probe syscall.fcntl = kernel.function("sys_fcntl") { +# long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg) +probe syscall.fcntl = + kernel.function("sys_fcntl") ?, + kernel.function("sys_fcntl64") ? +{ name = "fcntl" fd = $fd cmd = $cmd @@ -650,7 +654,10 @@ probe syscall.fcntl = kernel.function("s arg = $arg argstr = sprintf("%d, %s, %p", $fd, cmd_str, $arg) } -probe syscall.fcntl.return = kernel.function("sys_fcntl").return { +probe syscall.fcntl.return = + kernel.function("sys_fcntl").return ?, + kernel.function("sys_fcntl64").return ? +{ name = "fcntl" retstr = returnstr(1) } @@ -783,6 +790,8 @@ probe syscall.fsetxattr.return = kernel. # long sys_fstat64(unsigned long fd, struct stat64 __user * statbuf) # long sys32_fstat64(unsigned int fd, struct stat64 __user *statbuf) # long sys_newfstat(unsigned int fd, struct stat __user * statbuf) +# long sys_oabi_fstat64(char __user * filename, +# struct oldabi_stat64 __user * statbuf) # long compat_sys_newfstat(unsigned int fd, struct compat_stat __user * statbuf) # probe syscall.fstat = @@ -790,7 +799,8 @@ probe syscall.fstat = kernel.function("sys_fstat64") ?, kernel.function("sys32_fstat64") ?, kernel.function("sys_newfstat") ?, - kernel.function("compat_sys_newfstat") ? + kernel.function("sys_oabi_fstat64") ?, + kernel.function("compat_sys_newfstat") ? { name = "fstat" filedes = $fd @@ -802,6 +812,7 @@ probe syscall.fstat.return = kernel.function("sys_fstat64").return ?, kernel.function("sys32_fstat64").return ?, kernel.function("sys_newfstat").return ?, + kernel.function("sys_oabi_fstat64").return ?, kernel.function("compat_sys_newfstat").return ? { name = "fstat" @@ -1806,13 +1817,16 @@ probe syscall.lsetxattr.return = kernel. # long compat_sys_newlstat(char __user * filename, struct compat_stat __user *statbuf) # long sys32_lstat64(char * filename, struct stat64 __user *statbuf) # long sys_lstat64(char __user * filename, struct stat64 __user * statbuf) +# long sys_oabi_lstat64(char __user * filename, +# struct oldabi_stat64 __user * statbuf) # probe syscall.lstat = kernel.function("sys_lstat") ?, kernel.function("sys_newlstat") ?, kernel.function("compat_sys_newlstat") ?, kernel.function("sys32_lstat64") ?, - kernel.function("sys_lstat64") ? + kernel.function("sys_lstat64") ?, + kernel.function("sys_oabi_lstat64") ? { name = "lstat" path = user_string($filename) @@ -1824,7 +1838,8 @@ probe syscall.lstat.return = kernel.function("sys_newlstat").return ?, kernel.function("compat_sys_newlstat").return ?, kernel.function("sys32_lstat64").return ?, - kernel.function("sys_lstat64").return ? + kernel.function("sys_lstat64").return ?, + kernel.function("sys_oabi_lstat64").return ? { name = "lstat" retstr = returnstr(1) Index: systemtap-20070602/tapset/syscalls2.stp =================================================================== --- systemtap-20070602/tapset/syscalls2.stp (.../vendor/usr/src) (revision 218) +++ systemtap-20070602/tapset/syscalls2.stp (.../branches/kprobes/usr/src) (revision 218) @@ -1036,12 +1036,10 @@ probe syscall.semtimedop.return = kernel # send _______________________________________________________ # # asmlinkage long -# sys_sendto(int fd, +# sys_send(int fd, # void __user * buff, # size_t len, -# unsigned flags, -# struct sockaddr __user *addr, -# int addr_len) +# unsigned flags) # probe syscall.send = kernel.function("sys_sendto") { name = "send" @@ -1050,10 +1048,7 @@ probe syscall.send = kernel.function("sy len = $len flags = $flags flags_str = _send_flags_str($flags) - to_uaddr = $addr - tolen = $addr_len - argstr = sprintf("%d, %p, %s, %p, %d", $fd, buf_uaddr, - flags_str, to_uaddr, $addr_len) + argstr = sprintf("%d, %p, %s", $fd, buf_uaddr, flags_str) } probe syscall.send.return = kernel.function("sys_sendto").return { name = "send" @@ -1066,7 +1061,10 @@ probe syscall.send.return = kernel.funct # off_t __user *offset, # size_t count) # -probe syscall.sendfile = kernel.function("sys_sendfile") ?, kernel.function("sys_sendfile64") ? { +probe syscall.sendfile = + kernel.function("sys_sendfile") ?, + kernel.function("sys_sendfile64") ? +{ name = "sendfile" out_fd = $out_fd in_fd = $in_fd @@ -1075,7 +1073,10 @@ probe syscall.sendfile = kernel.function argstr = sprintf("%d, %d, %p, %d", $out_fd, $in_fd, offset_uaddr, $count) } -probe syscall.sendfile.return = kernel.function("sys_sendfile").return ?, kernel.function("sys_sendfile64").return ? { +probe syscall.sendfile.return = + kernel.function("sys_sendfile").return ?, + kernel.function("sys_sendfile64").return ? +{ name = "sendfile" retstr = returnstr(1) } @@ -1838,12 +1839,14 @@ probe syscall.ssetmask.return = kernel.f # long sys_stat(char __user * filename, struct __old_stat __user * statbuf) # long sys32_stat64(char __user * filename, struct stat64 __user *statbuf) # long sys_stat64(char __user * filename, struct stat64 __user * statbuf) +# long sys_oabi_stat64(char __user * filename, struct oldabi_stat64 __user * statbuf) # long compat_sys_newstat(char __user * filename, struct compat_stat __user *statbuf) probe syscall.stat = kernel.function("sys_stat") ?, kernel.function("sys_newstat") ?, kernel.function("sys32_stat64") ?, kernel.function("sys_stat64") ?, + kernel.function("sys_oabi_stat64") ?, kernel.function("compat_sys_newstat") ? { name = "stat" @@ -1857,6 +1860,7 @@ probe syscall.stat.return = kernel.function("sys_newstat").return ?, kernel.function("sys32_stat64").return ?, kernel.function("sys_stat64").return ?, + kernel.function("sys_oabi_stat64").return ?, kernel.function("compat_sys_newstat").return ? { name = "stat" ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2007-06-08 16:27 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2007-06-06 0:36 ARM port of testsuite and general testsuite fixes Quentin Barnes 2007-06-06 16:02 ` David Smith 2007-06-06 17:11 ` Quentin Barnes 2007-06-06 18:22 ` David Smith 2007-06-06 18:39 ` Martin Hunt 2007-06-06 19:25 ` Quentin Barnes 2007-06-06 19:51 ` David Smith 2007-06-06 20:00 ` Quentin Barnes 2007-06-06 20:07 ` David Smith 2007-06-06 20:39 ` Quentin Barnes 2007-06-06 21:01 ` David Smith 2007-06-06 21:35 ` Quentin Barnes 2007-06-06 21:51 ` David Smith 2007-06-06 23:10 ` Roland McGrath 2007-06-06 23:44 ` Quentin Barnes 2007-06-07 1:05 ` Roland McGrath 2007-06-08 16:27 ` Quentin Barnes
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).