Debian Codegraph @

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

raw
1 set test "pr14546"
2 if {! [installtest_p]} {
3 untested "$test"
4 return
5 }
6
7 set test "pr14546 once"
8 spawn stap -u $srcdir/$subdir/pr14546.stp "s=backtrace()"
9 set ko 0
10 expect {
11 -timeout 60
12 timeout { fail "$test (timeout)"; kill -INT -[exp_pid] 2 }
13 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
14 eof { }
15 }
16 catch { close }; catch { wait }
17 if {$ko == 0} then { pass $test } else { fail "$test ($ko)" }
18
19 set test "pr14546 twice"
20 spawn stap -u $srcdir/$subdir/pr14546.stp "s=backtrace() t=backtrace()"
21 set ko 0
22 expect {
23 -timeout 60
24 timeout { fail "$test (timeout)"; kill -INT -[exp_pid] 2 }
25 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
26 eof { }
27 }
28 catch { close }; catch { wait }
29 if {$ko == 0} then { pass $test } else { fail "$test ($ko)" }
30
31 set test "pr14546 thrice"
32 spawn stap -u $srcdir/$subdir/pr14546.stp "s=backtrace() t=backtrace() u=backtrace()"
33 set ko 0
34 expect {
35 -timeout 60
36 timeout { fail "$test (timeout)"; kill -INT -[exp_pid] 2 }
37 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
38 eof { }
39 }
40 catch { close }; catch { wait }
41 if {$ko == 0} then { pass $test } else { fail "$test ($ko)" }
42
43 set test "pr14546 followed by ubacktrace()"
44 spawn stap -u $srcdir/$subdir/pr14546.stp "s=backtrace() t=ubacktrace()"
45 set ko 0
46 expect {
47 -timeout 60
48 timeout { fail "$test (timeout)"; kill -INT -[exp_pid] 2 }
49 -re {^ERROR: [^\r\n]*\r\n} { incr ko; exp_continue }
50 eof { }
51 }
52 catch { close }; catch { wait }
53 if {$ko == 0} then { pass $test } else { fail "$test ($ko)" }