diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/systemtap.base/alias-condition.exp | 5 | ||||
-rw-r--r-- | testsuite/systemtap.base/alias-condition.stp | 26 |
2 files changed, 31 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/alias-condition.exp b/testsuite/systemtap.base/alias-condition.exp new file mode 100644 index 00000000..58438340 --- /dev/null +++ b/testsuite/systemtap.base/alias-condition.exp @@ -0,0 +1,5 @@ +# Check that conditions are copied correctly across aliases + +set test "alias-condition" + +stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string diff --git a/testsuite/systemtap.base/alias-condition.stp b/testsuite/systemtap.base/alias-condition.stp new file mode 100644 index 00000000..89708886 --- /dev/null +++ b/testsuite/systemtap.base/alias-condition.stp @@ -0,0 +1,26 @@ +/* + * alias-condition.stp + * + * Check that conditions are copied correctly across aliases + */ + +/* x should be incremented exactly once */ +global x = 0 +probe foo = begin { } +probe foo if (x < 0), foo { ++x } + +probe begin(1) +{ + println("systemtap starting probe") + exit() +} + +probe end +{ + println("systemtap ending probe") + if ( x != 1 ) { + println("systemtap test failure") + } else { + println("systemtap test success") + } +} |