From 90c278bdf839fbbb5485a1c306ac400efcced388 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 28 May 2008 13:53:06 -0700 Subject: Check that errors in nested functions are not lost on return Currently this test fails, as noted in bugzilla 6529. --- testsuite/ChangeLog | 5 +++++ testsuite/systemtap.base/error_fn.exp | 7 +++++++ testsuite/systemtap.base/error_fn.stp | 17 +++++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 testsuite/systemtap.base/error_fn.exp create mode 100644 testsuite/systemtap.base/error_fn.stp 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 + + PR 6529 + * systemtap.base/error_fn.*: New tests. + 2008-05-28 Mark Wielaard * 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() +} -- cgit