diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-10-14 10:19:05 +0800 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2009-10-14 10:19:05 +0800 |
commit | 6928ee0a21a1832c9845c125b0998d45b801af81 (patch) | |
tree | b0baf938366fd15f03d1a0108f784b1f2180c2d9 /testsuite/systemtap.base/statement.exp | |
parent | c4ca2da6ca875c0142a4e7ffd95e0aa0c573590b (diff) | |
download | systemtap-steved-6928ee0a21a1832c9845c125b0998d45b801af81.tar.gz systemtap-steved-6928ee0a21a1832c9845c125b0998d45b801af81.tar.xz systemtap-steved-6928ee0a21a1832c9845c125b0998d45b801af81.zip |
PR10746: update test cases related to probe process.*
* testsuite/semok/utrace01.stp: Switch by CONFIG_UTRACE.
* testsuite/systemtap.base/bz10294.stp: Ditto.
* testsuite/systemtap.base/bz6905.stp: Ditto.
* testsuite/systemtap.base/statement.exp: Mark untested if
non-utrace kernel.
Diffstat (limited to 'testsuite/systemtap.base/statement.exp')
-rw-r--r-- | testsuite/systemtap.base/statement.exp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/testsuite/systemtap.base/statement.exp b/testsuite/systemtap.base/statement.exp index 8d4c59f5..2ad696c8 100644 --- a/testsuite/systemtap.base/statement.exp +++ b/testsuite/systemtap.base/statement.exp @@ -6,15 +6,21 @@ if {$err == "" && [file exists $test]} then { pass "$test compile" } else { fail spawn stap -p2 $srcdir/$subdir/$test.stp set hint 0 set probes 0 +set skipped 0 expect { -timeout 60 -re "# probes" { incr hint; exp_continue } -re {process.*statement.*} { incr probes; exp_continue } + -re {never.*} { incr skipped; exp_continue} timeout { fail "$test (timeout)" } eof { } } wait -if { $hint == 1 && $probes > 0 } then { pass "$test -p2" } else { fail "$test -p2 ($probes)" } +if { $skipped == 1 } { + untested "$test -p2" +} else { + if { $hint == 1 && $probes > 0 } then { pass "$test -p2" } else { fail "$test -p2 ($probes)" } +} exec rm -f $test set test bz10294 @@ -25,23 +31,30 @@ if {$err == "" && [file exists $test]} then { pass "$test compile" } else { fail spawn stap -p2 $srcdir/$subdir/$test.stp set hint 0 set probes 0 +set skipped 0 expect { -timeout 60 -re "# probes" { incr hint; exp_continue } -re {process.*statement.*} { incr probes; exp_continue } + -re {never.*} { incr skipped; exp_continue} timeout { fail "$test (timeout)" } eof { } } wait -if { $hint == 1 && $probes == 1 } then { pass "$test -p2" } else { fail "$test -p2 ($probes)" } +if { $skipped == 1 } { + untested "$test -p2" +} else { + if { $hint == 1 && $probes == 1 } then { pass "$test -p2" } else { fail "$test -p2 ($probes)" } +} set no_func stmtnofunc -set func_script "probe process(\"%s\").statement(\"foo@%s.c:*\"){}" +set func_script "probe %%( CONFIG_UTRACE == \"y\" %%? process(\"%s\").statement(\"foo@%s.c:*\") %%: never %%) {}" set script [format $func_script "./$test" "$test"] -spawn stap -p2 -e $script +spawn stap -p2 -we $script expect { -timeout 60 -re {semantic error: no match while resolving probe point.*\r\n} { xfail $no_func } + -re {never.*} { untested "$no_func"} timeout { fail "$no_func (timeout)" } eof { fail $no_func } } |