diff options
author | David Smith <dsmith@redhat.com> | 2010-02-10 16:35:46 -0600 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2010-02-10 16:35:46 -0600 |
commit | 42048078ab7712361ce54fa9face358f75e1d699 (patch) | |
tree | b17e3e87c0212125ac1c10669338098565dfbf81 /testsuite/systemtap.syscall/nd_syscall.exp | |
parent | 6878a54351f98eff364ba8e9b43bc69a7d63f789 (diff) | |
download | systemtap-steved-42048078ab7712361ce54fa9face358f75e1d699.tar.gz systemtap-steved-42048078ab7712361ce54fa9face358f75e1d699.tar.xz systemtap-steved-42048078ab7712361ce54fa9face358f75e1d699.zip |
Fixed PR 11270 by adding nd_syscall testcase.
* testsuite/systemtap.syscall/test.tcl: Now uses global variable
'test_script' to find test script to run.
* testsuite/systemtap.syscall/syscall.exp: Sets test_script.
* testsuite/systemtap.syscall/nd_sys.stp: New test script. Copy of
sys.stp, but uses nd_syscall probes.
* testsuite/systemtap.syscall/nd_syscall.exp: New testcase. Copy of
syscall.exp, but uses nd_sys.stp test script.
Diffstat (limited to 'testsuite/systemtap.syscall/nd_syscall.exp')
-rw-r--r-- | testsuite/systemtap.syscall/nd_syscall.exp | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/testsuite/systemtap.syscall/nd_syscall.exp b/testsuite/systemtap.syscall/nd_syscall.exp new file mode 100644 index 00000000..4aefcf4b --- /dev/null +++ b/testsuite/systemtap.syscall/nd_syscall.exp @@ -0,0 +1,59 @@ +set test_script "nd_sys.stp" +source $srcdir/$subdir/test.tcl + +proc test_procedure {} { + global srcdir subdir + set wd [pwd] + set flags "" + if {$srcdir == ""} { + set pattern "*.c" + } else { + set pattern "$srcdir/$subdir/*.c" + } + + # 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 + + 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} { + foreach filename [lsort [glob $pattern]] { + set testname [file tail [string range $filename 0 end-2]] + if {![installtest_p]} { untested "64-bit $testname"; continue } + send_log "Testing 64-bit ${testname}\n" + run_one_test $filename $flags 64 + } + } + + 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} { + foreach filename [lsort [glob $pattern]] { + set testname [file tail [string range $filename 0 end-2]] + if {![installtest_p]} { untested "32-bit $testname"; continue } + send_log "Testing 32-bit ${testname}\n" + run_one_test $filename $flags 32 + } + } +} + +test_procedure |