summaryrefslogtreecommitdiffstats
path: root/testsuite/buildok/fifteen.stp
blob: cda798052bbd5f673113d323a8f7d8aaf5f14acb (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
29
30
31
32
33
34
35
36
37
38
#! stap -p4

/*
 * equal.stp
 *
 * Check the systemtap make sure that equality tests work
 * install it, and get some output.
 */

global count
global count2

probe begin
{
        log("systemtap starting probe")
}

probe kernel.function("schedule")
{
        ++count;
        ++count2;
}

probe end
{
        log("systemtap ending probe")
        log("count = " . sprint(count));
        log("count2 = " . sprint(count));
        if ( count == count2) {
                if ( (count-1) == count2 ) {
                        log("systemtap test failure");
                } else {
                        log("systemtap test success");
                }
        } else {
                log("systemtap test failure");
        }
}