diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2009-04-27 22:35:05 -0400 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2009-04-27 22:44:12 -0400 |
commit | ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97 (patch) | |
tree | 6711912b2176b8a212b0153bb5bf8dc203e51a10 /testsuite | |
parent | d478560c710a8966de96f54c0145ccaa7e2f4c5f (diff) | |
download | systemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.tar.gz systemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.tar.xz systemtap-steved-ed82b7c902d6a2e26452ec51c9cdb9665dbf9e97.zip |
PR10102: tolerate mismatched optional probe
* elaborate.cxx: Early return for mismatched optional probe.
* testsuite/systemtap.base/optionalprobe.exp: New test case.
* testsuite/systemtap.base/optionalprobe.stp: Ditto.
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/systemtap.base/optionalprobe.exp | 9 | ||||
-rw-r--r-- | testsuite/systemtap.base/optionalprobe.stp | 6 |
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/optionalprobe.exp b/testsuite/systemtap.base/optionalprobe.exp new file mode 100644 index 00000000..5484003c --- /dev/null +++ b/testsuite/systemtap.base/optionalprobe.exp @@ -0,0 +1,9 @@ +set test "optionalprobe" +spawn stap -p2 -w $srcdir/$subdir/$test.stp +expect { + -timeout 60 + -re "# probes\r\n" { exp_continue } + -re "^begin" { pass $test } + eof { fail $test } + timeout { fail "$test unexpected timeout" } +} diff --git a/testsuite/systemtap.base/optionalprobe.stp b/testsuite/systemtap.base/optionalprobe.stp new file mode 100644 index 00000000..239cf6e3 --- /dev/null +++ b/testsuite/systemtap.base/optionalprobe.stp @@ -0,0 +1,6 @@ +#! stap + +# test optional probe + +probe foo ?, bar !, foo* ?, bar* !, begin { +} |