summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/inc.stp
blob: 17d6dc7c618fa4a4d0a055ec365cac44a02e0953 (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
28
/*
 * inc.stp
 *
 * Check that systemtap ++ works
 */

global x1

probe begin
{
	println("systemtap starting probe")
	x1 = 41
}

probe end
{
	println("systemtap ending probe")
	x1++
	if (x1 == 42) {
		++x1
		if (x1 != 43 ) {
			println("systemtap test failure")
		} else {
			println("systemtap test success")
		}
	} else
		println("systemtap test failure")
}