diff options
Diffstat (limited to 'testsuite/systemtap.base/add.stp')
-rw-r--r-- | testsuite/systemtap.base/add.stp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/add.stp b/testsuite/systemtap.base/add.stp new file mode 100644 index 00000000..3fa7be38 --- /dev/null +++ b/testsuite/systemtap.base/add.stp @@ -0,0 +1,26 @@ +/* + * add.stp + * + * Check the systemtap "addition" works + */ + +global x3 +global x1 +global x2 + +probe begin +{ + log("systemtap starting probe") + x1 = 42; x2 = 53; +} + +probe end +{ + log("systemtap ending probe") + x3 = x1 + x2; + if (x3 != 95 ) { + log("systemtap test failure"); + } else { + log("systemtap test success"); + } +} |