diff options
Diffstat (limited to 'testsuite/systemtap.base/div0.stp')
-rw-r--r-- | testsuite/systemtap.base/div0.stp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/div0.stp b/testsuite/systemtap.base/div0.stp new file mode 100644 index 00000000..65710f09 --- /dev/null +++ b/testsuite/systemtap.base/div0.stp @@ -0,0 +1,27 @@ +/* + * div.stp0 + * + * Check the systemtap divide by 0 does not kill the machine + * FIXME this test needs to be refined + */ + +global x3 +global x1 +global x2 + +probe begin +{ + log("systemtap starting probe") + x1 = 56088; x2 = 0; +} + +probe end +{ + log("systemtap ending probe") + x3 = x1 / x2; + if (x3 != 456 ) { + log("systemtap test failure"); + } else { + log("systemtap test success"); + } +} |