Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.base/pr13306.exp

raw
1 set test "pr13306"
2 if {! [installtest_p]} {
3 untested "$test"
4 return
5 }
6
7 set test "pr13306 plain"
8 spawn stap $srcdir/$subdir/pr13306.stp
9 set ok 0
10 set ko 0
11 expect {
12 -timeout 60
13 timeout { fail "$test (timeout)" }
14 -re {^ERROR: [^\r\n]*\r\n} { incr ok; exp_continue }
15 -re {^WARNING: Number of errors: [0-9]*[^\r\n]*\r\n} { incr ok; exp_continue }
16 eof { }
17 }
18 catch { close } ; catch { wait }
19 if {$ok >= 2 && $ko == 0} then { pass $test } else { fail "$test ($ok $ko)" }
20
21 set test "pr13306 -t"
22 spawn stap -t $srcdir/$subdir/pr13306.stp
23 set ok 0
24 set ko 0
25 expect {
26 -timeout 60
27 timeout { fail "$test (timeout)" }
28 -re {^ERROR: [^\r\n]*\r\n} { incr ok; exp_continue }
29 -re {^WARNING: Number of errors: [0-9]*[^\r\n]*\r\n} { incr ok; exp_continue }
30 -re {^----- probe hit report: \r\n} { incr ok; exp_continue }
31 -re {^[^\r\n]*hits:[^\r\n]*cycles:[^\r\n]*from:[^\r\n]*\r\n} { exp_continue }
32 -re {^----- refresh report:\r\n} { exp_continue }
33 }
34 catch { close } ; catch { wait }
35 if {$ok >=3 && $ko == 0} then { pass $test } else { fail "$test ($ok $ko)" }
36
37 set test "pr13306 --suppress-handler-errors"
38 spawn stap --suppress-handler-errors $srcdir/$subdir/pr13306.stp
39 set ok 0
40 set ko 0
41 expect {
42 -timeout 60
43 timeout { fail "$test (timeout)" }
44 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
45 -re {^WARNING: Number of errors: [0-9]*[^\r\n]*\r\n} { incr ok; exp_continue }
46 eof { }
47 }
48 catch { close } ; catch { wait }
49 if {$ok == 1 && $ko == 0} then { pass $test } else { fail "$test ($ok $ko)" }
50
51 set test "pr13306 --suppress-handler-errors -t"
52 spawn stap --suppress-handler-errors -t $srcdir/$subdir/pr13306.stp
53 set ok 0
54 set ko 0
55 expect {
56 -timeout 60
57 timeout { fail "$test (timeout)" }
58 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
59 -re {^WARNING: Number of errors: [0-9]*[^\r\n]*\r\n} { incr ok; exp_continue }
60 -re {^----- probe hit report: \r\n} { incr ok; exp_continue }
61 -re {^[^\r\n]*hits:[^\r\n]*cycles:[^\r\n]*from:[^\r\n]*\r\n} { exp_continue }
62 -re {^----- refresh report:\r\n} { exp_continue }
63 }
64 catch { close } ; catch { wait }
65 if {$ok >= 2 && $ko == 0} then { pass $test } else { fail "$test ($ok $ko)" }