]> sourceware.org Git - systemtap.git/blame - testsuite/systemtap.base/div0.stp
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
[systemtap.git] / testsuite / systemtap.base / div0.stp
CommitLineData
814bc89d
FCE
1/*
2 * div.stp0
3 *
4 * Check the systemtap divide by 0 does not kill the machine
3b6fd2ea
MH
5 *
6 * Note: Error messages are written to stderr. That means it is
7 * possible that if a printf is followed by something that
8 * generates an error, the error will get displayed before the printf.
9 * That is why both print's are in the begin probe.
10 *
814bc89d
FCE
11 */
12
13global x3
14global x1
15global x2
16
17probe begin
18{
3b6fd2ea
MH
19 print("systemtap starting probe\n")
20 print("systemtap ending probe\n")
814bc89d
FCE
21 x1 = 56088; x2 = 0;
22}
23
24probe end
25{
3b6fd2ea
MH
26 x3 = x1 / x2
27 /* this part does not get executed */
28 if (x3 != 456 )
29 print("systemtap test failure\n")
30 else
31 print("systemtap test failure\n")
814bc89d 32}
This page took 0.045801 seconds and 5 git commands to generate.