]>
Commit | Line | Data |
---|---|---|
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 | ||
13 | global x3 | |
14 | global x1 | |
15 | global x2 | |
16 | ||
17 | probe 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 | ||
24 | probe 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 | } |