Debian Codegraph @

testsuite/buildok/fifteen.stp

raw
1 #! stap -p4
2
3 /*
4 * equal.stp
5 *
6 * Check the systemtap make sure that equality tests work
7 * install it, and get some output.
8 */
9
10 global count
11 global count2
12
13 probe begin
14 {
15 log("systemtap starting probe")
16 }
17
18 probe kernel.function("schedule")
19 {
20 ++count;
21 ++count2;
22 }
23
24 probe end
25 {
26 log("systemtap ending probe")
27 log("count = " . sprint(count));
28 log("count2 = " . sprint(count));
29 if ( count == count2) {
30 if ( (count-1) == count2 ) {
31 log("systemtap test failure");
32 } else {
33 log("systemtap test success");
34 }
35 } else {
36 log("systemtap test failure");
37 }
38 }