summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/global_end.exp
blob: 9d9c8d9b48fce16bfef1aea58506420e37aebea1 (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
# test end probe creation and display of written and unread global variables

set test "global_end"

if {![installtest_p]} {untested $test; return}

spawn stap $srcdir/$subdir/global_end.stp
set ok 0
expect {
    -timeout 180
    -re {one,0x1.*one,0x2.*two,0x1.*two,0x2} { incr ok; exp_continue }
    -re {alpha."two".2.=0x4} { incr ok; exp_continue }
    -re {alpha."two".1.=0x3} { incr ok; exp_continue }
    -re {alpha."one".2.=0x2} { incr ok; exp_continue }
    -re {alpha."one".1.=0x1} { incr ok; exp_continue }
    -re {gamma="abcdefghijklmnopqrstuvwxyz"} { incr ok; exp_continue }
    -re {iota."two".="twelve"} { incr ok; exp_continue }
    -re {iota."one".="eleven"} { incr ok; exp_continue }
    -re {epsilon."one",1. @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue }
    -re {epsilon."two",2. @count=0x4 @min=0xa @max=0x28 @sum=0x64 @avg=0x19} { incr ok; exp_continue }
    -re {phi @count=0x4 @min=0x1 @max=0x4 @sum=0xa @avg=0x2} { incr ok; exp_continue }
    -re {var=0x1} { incr ok; exp_continue }
    timeout { fail "$test (timeout)" }
    eof { }
}
wait

spawn stap $srcdir/$subdir/global_end2.stp
# above should not do any tapset global variable display so
# ok should only change by 1
expect {
    -timeout 180
    -re {Avg time = [1-9]} { incr ok; exp_continue }
}

if {$ok == 13} { pass "$test ($ok)" } { fail "$test ($ok)" }