summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/syscall.exp
diff options
context:
space:
mode:
authorhunt <hunt>2007-04-23 17:53:28 +0000
committerhunt <hunt>2007-04-23 17:53:28 +0000
commitfe592f24dd6d4885141d067ed6acb8ec82f2d990 (patch)
treee6a74d2d7e4179add564f061fcdcfd140e18a7cc /testsuite/systemtap.syscall/syscall.exp
parentf199cc9fe15f6d38a6a35068deb5217c36cd8f2f (diff)
downloadsystemtap-steved-fe592f24dd6d4885141d067ed6acb8ec82f2d990.tar.gz
systemtap-steved-fe592f24dd6d4885141d067ed6acb8ec82f2d990.tar.xz
systemtap-steved-fe592f24dd6d4885141d067ed6acb8ec82f2d990.zip
2007-04-23 Martin Hunt <hunt@redhat.com>
* syscall.exp (test_procedure): For 64-bit machines, first run with "-m64" and then with "-m32".
Diffstat (limited to 'testsuite/systemtap.syscall/syscall.exp')
-rw-r--r--testsuite/systemtap.syscall/syscall.exp55
1 files changed, 32 insertions, 23 deletions
diff --git a/testsuite/systemtap.syscall/syscall.exp b/testsuite/systemtap.syscall/syscall.exp
index a418ac9e..dfb6ca27 100644
--- a/testsuite/systemtap.syscall/syscall.exp
+++ b/testsuite/systemtap.syscall/syscall.exp
@@ -7,43 +7,52 @@ proc test_procedure {} {
} else {
set pattern "$srcdir/$subdir/*.c"
}
- foreach filename [lsort [glob $pattern]] {
- set file [file tail [string range $filename 0 end-2]]
- if {![installtest_p]} { untested $file; continue }
- target_compile $filename $wd/$file executable $flags
- send_log "Testing ${file}\n"
- set res [exec $srcdir/$subdir/test.tcl $file $filename]
- if {$res == "PASS"} {
- pass "$file"
- } elseif {$res == "UNSUPP"} {
- unsupported "$file not supported on this arch"
- } else {
- fail "$file"
- send_log "$res\n"
- }
- catch {exec rm -f $wd/$file}
+
+ # for first pass, force 64-bit compilation for 64-bit systems
+ # 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"} {
+ set do_64_bit_pass 1
}
-
- if {$::tcl_platform(machine) == "x86_64" ||
- $::tcl_platform(machine) == "ppc64"} {
- # on x86_64 and pcp64, test 32-bit and 64-bit binaries
- set flags "additional_flags=-m32"
+
+ if {$do_64_bit_pass} {
+ set flags "additional_flags=-m64"
foreach filename [lsort [glob $pattern]] {
set file [file tail [string range $filename 0 end-2]]
if {![installtest_p]} { untested $file; continue }
target_compile $filename $wd/$file executable $flags
- send_log "Testing 32-bit ${file}\n"
+ send_log "Testing 64-bit ${file}\n"
set res [exec $srcdir/$subdir/test.tcl $file $filename]
if {$res == "PASS"} {
- pass "32-bit $file"
+ pass "$file"
} elseif {$res == "UNSUPP"} {
unsupported "$file not supported on this arch"
} else {
- fail "32-bit $file"
+ fail "64-bit $file"
send_log "$res\n"
}
catch {exec rm -f $wd/$file}
}
+ }
+
+ set flags "additional_flags=-m32"
+ foreach filename [lsort [glob $pattern]] {
+ set file [file tail [string range $filename 0 end-2]]
+ if {![installtest_p]} { untested $file; continue }
+ target_compile $filename $wd/$file executable $flags
+ send_log "Testing 32-bit ${file}\n"
+ set res [exec $srcdir/$subdir/test.tcl $file $filename]
+ if {$res == "PASS"} {
+ pass "32-bit $file"
+ } elseif {$res == "UNSUPP"} {
+ unsupported "$file not supported on this arch"
+ } else {
+ fail "32-bit $file"
+ send_log "$res\n"
+ }
+ catch {exec rm -f $wd/$file}
}
}