summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/div0.stp
blob: 65710f09dc335b099d071fb65925e844d51a4f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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");
	}
}