summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2009-09-14 10:05:08 +0800
committerWenji Huang <wenji.huang@oracle.com>2009-09-14 10:05:08 +0800
commit38070723b06baf781ef18e2516e33e6bdbe18d8f (patch)
tree53b7a3cf4c657d748dd224deb251bf7665460c33
parent22ce80766c4f31a218da1694569523eb68737faf (diff)
downloadsystemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.tar.gz
systemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.tar.xz
systemtap-steved-38070723b06baf781ef18e2516e33e6bdbe18d8f.zip
PR10608: mark test cases untested once compilation failed
* testsuite/systemtap.syscall/syscall.exp: Simplify logic things. * testsuite/systemtap.syscall/test.tcl: Check compilation result. * testsuite/systemtap.base/utrace_syscall_args.exp: Change fail to untested.
-rw-r--r--testsuite/systemtap.base/utrace_syscall_args.exp6
-rw-r--r--testsuite/systemtap.syscall/syscall.exp24
-rwxr-xr-xtestsuite/systemtap.syscall/test.tcl21
3 files changed, 21 insertions, 30 deletions
diff --git a/testsuite/systemtap.base/utrace_syscall_args.exp b/testsuite/systemtap.base/utrace_syscall_args.exp
index 98bc457e..e3c90191 100644
--- a/testsuite/systemtap.base/utrace_syscall_args.exp
+++ b/testsuite/systemtap.base/utrace_syscall_args.exp
@@ -37,7 +37,8 @@ if {$do_64_bit_pass} {
set res [target_compile $srcpath $exepath executable $flags]
if { $res != "" } {
verbose "target_compile for $exepath failed: $res" 2
- fail "$testname: unable to compile $srcpath"
+ send_log "$testname: unable to compile $srcpath\n"
+ untested $testname
return
}
@@ -72,7 +73,8 @@ if {$do_32_bit_pass} {
set res [target_compile $srcpath $exepath executable $flags]
if { $res != "" } {
verbose "target_compile for $exepath failed: $res" 2
- fail "$testname: unable to compile $srcpath"
+ send_log "$testname: unable to compile $srcpath\n"
+ untested $testname
return
}
diff --git a/testsuite/systemtap.syscall/syscall.exp b/testsuite/systemtap.syscall/syscall.exp
index 22e9dc07..a4978997 100644
--- a/testsuite/systemtap.syscall/syscall.exp
+++ b/testsuite/systemtap.syscall/syscall.exp
@@ -32,17 +32,9 @@ proc test_procedure {} {
if {$do_64_bit_pass} {
foreach filename [lsort [glob $pattern]] {
set testname [file tail [string range $filename 0 end-2]]
- if {![installtest_p]} { untested $testname; continue }
+ if {![installtest_p]} { untested "64-bit $testname"; continue }
send_log "Testing 64-bit ${testname}\n"
- set res [run_one_test $filename $flags]
- if {$res == "PASS"} {
- pass "$testname"
- } elseif {$res == "UNSUPP"} {
- unsupported "$testname not supported on this arch"
- } else {
- fail "64-bit $testname"
- send_log "$res\n"
- }
+ run_one_test $filename $flags 64
}
}
@@ -56,17 +48,9 @@ proc test_procedure {} {
if {$do_32_bit_pass} {
foreach filename [lsort [glob $pattern]] {
set testname [file tail [string range $filename 0 end-2]]
- if {![installtest_p]} { untested $testname; continue }
+ if {![installtest_p]} { untested "32-bit $testname"; continue }
send_log "Testing 32-bit ${testname}\n"
- set res [run_one_test $filename $flags]
- if {$res == "PASS"} {
- pass "32-bit $testname"
- } elseif {$res == "UNSUPP"} {
- unsupported "$testname not supported on this arch"
- } else {
- fail "32-bit $testname"
- send_log "$res\n"
- }
+ run_one_test $filename $flags 32
}
}
}
diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl
index 8a5801af..b9d3c0d9 100755
--- a/testsuite/systemtap.syscall/test.tcl
+++ b/testsuite/systemtap.syscall/test.tcl
@@ -26,19 +26,23 @@ proc bgerror {error} {
}
trap {cleanup_and_exit} SIGINT
-proc run_one_test {filename flags} {
+proc run_one_test {filename flags bits} {
global dir current_dir
set testname [file tail [string range $filename 0 end-2]]
- set result "UNSUPP"
if {[catch {exec mktemp -d [pwd]/staptestXXXXXX} dir]} {
puts stderr "Failed to create temporary directory: $dir"
cleanup
}
- target_compile $filename $dir/$testname executable $flags
-
+ set res [target_compile $filename $dir/$testname executable $flags]
+ if { $res != "" } {
+ send_log "$bits-bit $testname : no corresponding devel environment found\n"
+ untested "$bits-bit $testname"
+ return
+ }
+
set sys_prog "[file dirname [file normalize $filename]]/sys.stp"
set cmd "stap --skip-badvars -c $dir/${testname} ${sys_prog}"
@@ -74,7 +78,8 @@ proc run_one_test {filename flags} {
if {$ind == 0} {
# unsupported
cleanup
- return $result
+ unsupported "$bits-bit $testname not supported on this arch"
+ return
}
set current_dir [pwd]
@@ -91,10 +96,9 @@ proc run_one_test {filename flags} {
}
}
if {$i >= $ind} {
- set result "PASS"
# puts "PASS $testname"
+ pass "$bits-bit $testname"
} else {
- set result "FAIL $testname"
send_log "$testname FAILED. output of \"$cmd\" was:"
send_log "\n------------------------------------------\n"
send_log $output
@@ -118,7 +122,8 @@ proc run_one_test {filename flags} {
for {} {$i < $ind} {incr i} {
send_log "$results($i)\n"
}
+ fail "$bits-bit $testname"
}
cleanup
- return $result
+ return
}