summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.syscall/test.tcl
diff options
context:
space:
mode:
authorDave Brolley <brolley@redhat.com>2009-05-04 16:06:14 -0400
committerDave Brolley <brolley@redhat.com>2009-05-04 16:06:14 -0400
commitfac37258fd3c7710407203b206963c7bff57075d (patch)
treef0b053d28c4c9593f872b3004c99729ffb27e18c /testsuite/systemtap.syscall/test.tcl
parent2035bcd40b17832439df0a1eb28403b99a71b74f (diff)
parent97d1fa6e24d8d4e8ceefc62f0d4a7f93a18e4125 (diff)
downloadsystemtap-steved-fac37258fd3c7710407203b206963c7bff57075d.tar.gz
systemtap-steved-fac37258fd3c7710407203b206963c7bff57075d.tar.xz
systemtap-steved-fac37258fd3c7710407203b206963c7bff57075d.zip
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.syscall/test.tcl')
-rwxr-xr-xtestsuite/systemtap.syscall/test.tcl15
1 files changed, 11 insertions, 4 deletions
diff --git a/testsuite/systemtap.syscall/test.tcl b/testsuite/systemtap.syscall/test.tcl
index db0df138..a458914b 100755
--- a/testsuite/systemtap.syscall/test.tcl
+++ b/testsuite/systemtap.syscall/test.tcl
@@ -40,22 +40,28 @@ proc run_one_test {filename flags} {
target_compile $filename $dir/$testname executable $flags
set sys_prog "[file dirname [file normalize $filename]]/sys.stp"
- set cmd "stap -c $dir/${testname} ${sys_prog}"
+ set cmd "stap --skip-badvars -c $dir/${testname} ${sys_prog}"
# Extract the expected results
# Use the preprocessor so we can ifdef tests in and out
set ccmd "gcc -E -C -P $filename"
+ # XXX: but note, this will expand all system headers too!
catch {eval exec $ccmd} output
set ind 0
foreach line [split $output "\n"] {
- if {[regsub {//} $line {} line]} {
+ if {[regsub {//staptest//} $line {} line]} {
set line "$testname: [string trimleft $line]"
-
+
+ # We need to quote all these metacharacters
regsub -all {\(} $line {\\(} line
- regsub -all {\)} $line {\\)} line
+ regsub -all {\)} $line {\\)} line
regsub -all {\|} $line {\|} line
+ # + and * are metacharacters, but should always be used
+ # as metacharacters in the expressions, don't escape them.
+ #regsub -all {\+} $line {\\+} line
+ #regsub -all {\*} $line {\\*} line
regsub -all NNNN $line {[\-0-9]+} line
regsub -all XXXX $line {[x0-9a-fA-F]+} line
@@ -78,6 +84,7 @@ proc run_one_test {filename flags} {
set i 0
foreach line [split $output "\n"] {
+ # send_log "Comparing $results($i) against $line"
if {[regexp $results($i) $line]} {
incr i
if {$i >= $ind} {break}