diff options
author | Josh Stone <joshua.i.stone@intel.com> | 2008-05-28 13:53:06 -0700 |
---|---|---|
committer | Josh Stone <joshua.i.stone@intel.com> | 2008-05-28 13:59:40 -0700 |
commit | 90c278bdf839fbbb5485a1c306ac400efcced388 (patch) | |
tree | 18c0596f7986703f7ca7b0cbf6980a7e954425a8 | |
parent | 2285f446112f64884da490fc66144b19f6cb8504 (diff) | |
download | systemtap-steved-90c278bdf839fbbb5485a1c306ac400efcced388.tar.gz systemtap-steved-90c278bdf839fbbb5485a1c306ac400efcced388.tar.xz systemtap-steved-90c278bdf839fbbb5485a1c306ac400efcced388.zip |
Check that errors in nested functions are not lost on return
Currently this test fails, as noted in bugzilla 6529.
-rw-r--r-- | testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/error_fn.exp | 7 | ||||
-rw-r--r-- | testsuite/systemtap.base/error_fn.stp | 17 |
3 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog index cf4624ee..a7c2b3f7 100644 --- a/testsuite/ChangeLog +++ b/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-28 Josh Stone <joshua.i.stone@intel.com> + + PR 6529 + * systemtap.base/error_fn.*: New tests. + 2008-05-28 Mark Wielaard <mwielaard@redhat.com> * testsuite/Makefile.am (clean-local): Correct redirect of stderr. diff --git a/testsuite/systemtap.base/error_fn.exp b/testsuite/systemtap.base/error_fn.exp new file mode 100644 index 00000000..c0de850f --- /dev/null +++ b/testsuite/systemtap.base/error_fn.exp @@ -0,0 +1,7 @@ +# check that errors in nested functions are not lost on return +# bugzilla 6529 + +set test "error_fn" + +stap_run $srcdir/$subdir/$test.stp no_load ".*synthetic error.*" + diff --git a/testsuite/systemtap.base/error_fn.stp b/testsuite/systemtap.base/error_fn.stp new file mode 100644 index 00000000..2e68026f --- /dev/null +++ b/testsuite/systemtap.base/error_fn.stp @@ -0,0 +1,17 @@ +probe begin { + println("systemtap starting probe") + println("systemtap ending probe") +} + +function generate_error:long() { + error("synthetic error") + return 1 +} + +function compute:long() { + return generate_error() +} + +probe end { + compute() +} |