diff options
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/lib/stap_run.exp | 11 |
2 files changed, 13 insertions, 3 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index 42de95f4..f852fd32 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-01-09 Masami Hiramatsu <mhiramat@redhat.com> + + PR5544 + * lib/stap_run.exp (stap_run): Support warning before ending probe. + 2008-01-07 William Cohen <wcohen@redhat.com> * lib/systemtap.exp (as_root): new proc. * systemtap.context/context.exp: diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp index c9131562..5bd1549c 100644 --- a/testsuite/lib/stap_run.exp +++ b/testsuite/lib/stap_run.exp @@ -22,6 +22,7 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } # initialize probe_errors and skipped_probes to 0 set probe_errors 0 set skipped_probes 0 + set warning_regexp {^WARNING: Number of errors: ([0-9]+), skipped probes: ([0-9]+)\r\n} if {[info procs installtest_p] != "" && ![installtest_p]} { untested $TEST_NAME; return } @@ -56,6 +57,10 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } expect { -timeout 20 + -re $warning_regexp { + set probe_errors $expect_out(1,string) + set skipped_probes $expect_out(2,string) + exp_continue} -re $output { pass "$TEST_NAME shutdown and output" expect { @@ -63,9 +68,9 @@ proc stap_run { TEST_NAME {LOAD_GEN_FUNCTION ""} {OUTPUT_CHECK_STRING ""} args } -re {^Pass\ ([5]):[^\r]*\ in\ ([0-9]+)usr/([0-9]+)sys/([0-9]+)real\ ms\.\r\n} {set pass$expect_out(1,string) "\t$expect_out(2,string)\t$expect_out(3,string)\t$expect_out(4,string)" verbose -log "metric:\t$TEST_NAME $pass1$pass2$pass3$pass4$pass5"} - -re {^WARNING: Number of errors: ([0-9]+), skipped probes: ([0-9]+)\r\n} - {set probe_errors $expect_out(1,string) - set skipped_probes $expect_out(2,string)} + -re $warning_regexp { + set probe_errors $expect_out(1,string) + set skipped_probes $expect_out(2,string)} } } timeout { fail "$TEST_NAME shutdown (timeout)" } |