summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Smith <dsmith@redhat.com>2008-08-07 10:20:13 -0500
committerDavid Smith <dsmith@redhat.com>2008-08-07 10:20:13 -0500
commit32637fcca7e457d258c08415b87e94bb2d102bc0 (patch)
treeecdd60e7aa8fb65cc3dfe31861d001de44e99aa3
parent940b7aa56b9c2e371d8a00c6e179ab2e9b4268ba (diff)
downloadsystemtap-steved-32637fcca7e457d258c08415b87e94bb2d102bc0.tar.gz
systemtap-steved-32637fcca7e457d258c08415b87e94bb2d102bc0.tar.xz
systemtap-steved-32637fcca7e457d258c08415b87e94bb2d102bc0.zip
'stap_compile' test procedure now ignores warnings
2008-08-07 David Smith <dsmith@redhat.com> * systemtap.base/utrace_p4.exp: Uses lib/stap_compile.exp instead of its own stap_compile procedure. * systemtap.base/cache.exp (stap_compile): Ignores warnings. * lib/stap_compile.exp: Ignores warnings.
-rw-r--r--testsuite/ChangeLog7
-rw-r--r--testsuite/lib/stap_compile.exp1
-rw-r--r--testsuite/systemtap.base/cache.exp1
-rw-r--r--testsuite/systemtap.base/utrace_p4.exp41
4 files changed, 9 insertions, 41 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index 0edcb89a..c8c07b3b 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+2008-08-07 David Smith <dsmith@redhat.com>
+
+ * systemtap.base/utrace_p4.exp: Uses lib/stap_compile.exp instead
+ of its own stap_compile procedure.
+ * systemtap.base/cache.exp (stap_compile): Ignores warnings.
+ * lib/stap_compile.exp: Ignores warnings.
+
2008-08-05 Mark Wielaard <mwielaard@redhat.com>
* systemtap.examples/README: Add meta file tag descriptions.
diff --git a/testsuite/lib/stap_compile.exp b/testsuite/lib/stap_compile.exp
index 35124a44..a206b7b1 100644
--- a/testsuite/lib/stap_compile.exp
+++ b/testsuite/lib/stap_compile.exp
@@ -12,6 +12,7 @@ proc stap_compile { TEST_NAME compile script args } {
expect {
-re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms.\r\n} {exp_continue}
-re {^Pass\ [34]: using cached [^\r\n]+\r\n} {exp_continue}
+ -re "^WARNING" {exp_continue}
# pass-4 output
-re {^/[^\r\n]+.ko\r\n} {exp_continue}
-re "parse error" { incr compile_errors 1; exp_continue}
diff --git a/testsuite/systemtap.base/cache.exp b/testsuite/systemtap.base/cache.exp
index f7ed2786..390af054 100644
--- a/testsuite/systemtap.base/cache.exp
+++ b/testsuite/systemtap.base/cache.exp
@@ -30,6 +30,7 @@ proc stap_compile { TEST_NAME flags script args } {
-timeout 180
-re {^Pass\ [1234]:[^\r]*\ in\ [^\r]*\ ms\.\r\n} {exp_continue}
-re {^Pass\ [34]: using cached [^\r\n]+\r\n} {incr cached 1; exp_continue}
+ -re "^WARNING" {exp_continue}
# pass-4 output
-re {^/[^\r\n]+\.ko\r\n} {exp_continue}
-re "compilation failed" {incr compile_errors 1; exp_continue}
diff --git a/testsuite/systemtap.base/utrace_p4.exp b/testsuite/systemtap.base/utrace_p4.exp
index 333cff21..3083b97f 100644
--- a/testsuite/systemtap.base/utrace_p4.exp
+++ b/testsuite/systemtap.base/utrace_p4.exp
@@ -6,47 +6,6 @@
# If utrace exists in the kernel, it tries some compile tests. If
# utrace doesn't exist in the kernel, marks the tests as 'untested'.
-# stap_compile TEST_NAME flags script args
-# - TEST_NAME is the name of the current test
-# - compile indicates whether the script is supposed to compile
-# - script is the script to compile
-# Additional arguments are passed to stap as-is.
-proc stap_compile { TEST_NAME compile script args } {
- set cmd [concat {stap -v -p4 -e} $script $args]
-
- verbose -log "running $cmd"
- eval spawn $cmd
- set compile_errors 0
- expect {
- -re {^Pass\ [1234]:[^\r]*\ in\ .*\ ms.\r\n} {exp_continue}
- -re {^Pass\ [34]: using cached [^\r\n]+\r\n} {exp_continue}
- # pass-4 output
- -re {^/[^\r\n]+.ko\r\n} {exp_continue}
- -re "parse error" { incr compile_errors 1; exp_continue}
- -re "compilation failed" {incr compile_errors 1; exp_continue}
- -re "semantic error:" {incr compile_errors 1; exp_continue}
- -re "terminate called" {incr compile_errors 1; exp_continue}
- }
- catch close
- wait
-
- # If we've got compile errors and the script was supposed to
- # compile, fail.
- if {$compile_errors > 0} {
- if {$compile == 1} {
- fail "$TEST_NAME compilation failed"
- } else {
- pass "$TEST_NAME compilation failed correctly"
- }
- } else {
- if {$compile == 1} {
- pass "$TEST_NAME compilation succeeded"
- } else {
- fail "$TEST_NAME compilation succeeded unexpectedly"
- }
- }
-}
-
# Initialize variables
set utrace_support_found 0