From fe592f24dd6d4885141d067ed6acb8ec82f2d990 Mon Sep 17 00:00:00 2001 From: hunt Date: Mon, 23 Apr 2007 17:53:28 +0000 Subject: [PATCH] 2007-04-23 Martin Hunt * syscall.exp (test_procedure): For 64-bit machines, first run with "-m64" and then with "-m32". --- testsuite/systemtap.syscall/ChangeLog | 5 +++ testsuite/systemtap.syscall/syscall.exp | 55 ++++++++++++++----------- 2 files changed, 37 insertions(+), 23 deletions(-) diff --git a/testsuite/systemtap.syscall/ChangeLog b/testsuite/systemtap.syscall/ChangeLog index 0d95eaab6..be1fa509c 100644 --- a/testsuite/systemtap.syscall/ChangeLog +++ b/testsuite/systemtap.syscall/ChangeLog @@ -1,3 +1,8 @@ +2007-04-23 Martin Hunt + + * syscall.exp (test_procedure): For 64-bit machines, first + run with "-m64" and then with "-m32". + 2007-04-10 Martin Hunt * syscall.exp (test_procedure): Remove diff --git a/testsuite/systemtap.syscall/syscall.exp b/testsuite/systemtap.syscall/syscall.exp index a418ac9ec..dfb6ca275 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} } } -- 2.43.5