summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/systemtap.syscall')
-rw-r--r--testsuite/systemtap.syscall/ChangeLog5
-rw-r--r--testsuite/systemtap.syscall/syscall.exp40
2 files changed, 29 insertions, 16 deletions
diff --git a/testsuite/systemtap.syscall/ChangeLog b/testsuite/systemtap.syscall/ChangeLog
index 4958bdaf..3765d7bb 100644
--- a/testsuite/systemtap.syscall/ChangeLog
+++ b/testsuite/systemtap.syscall/ChangeLog
@@ -1,3 +1,8 @@
+2007-06-18 Martin Hunt <hunt@redhat.com>
+
+ * syscall.exp (test_procedure): Use switch statements to clean
+ up the logic for setting flags for 64 and 32-bit passes.
+
2007-05-25 Martin Hunt <hunt@redhat.com>
* syscall.exp (test_procedure): Remove stray timeout assignment.
diff --git a/testsuite/systemtap.syscall/syscall.exp b/testsuite/systemtap.syscall/syscall.exp
index 02c6278f..e9ea9537 100644
--- a/testsuite/systemtap.syscall/syscall.exp
+++ b/testsuite/systemtap.syscall/syscall.exp
@@ -12,13 +12,19 @@ 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"
+ }
+ default {
+ set do_64_bit_pass 0
+ }
}
if {$do_64_bit_pass} {
@@ -39,16 +45,18 @@ proc test_procedure {} {
catch {exec rm -f $wd/$file}
}
}
-
- 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"
+ set do_32_bit_pass 1
+ switch -regexp $::tcl_platform(machine) {
+ ^(x86_64|ppc64)$ {
+ set flags "additional_flags=-m32"
+ }
+ ^s390x$ {
+ set flags "additional_flags=-m31"
+ }
+ ^ia64$ {
+ set do_32_bit_pass 0
+ }
}
if {$do_32_bit_pass} {