Debian Codegraph @

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

raw
1 set test "beginenderror"
2
3 if {![installtest_p]} {untested $test; return}
4
5 foreach runtime [get_runtime_list] {
6 set test "beginenderror"
7 set args "--vp=0"
8 if {$runtime != ""} {
9 lappend test "($runtime)"
10 set args "--runtime=$runtime"
11 }
12
13 # The VERREL stuff is just for compile-testing that option; it plays no
14 # real role in this test.
15 spawn stap -DSTP_NO_VERREL_CHECK $args $srcdir/$subdir/beginenderror.stp
16 set ok1 0
17 set ok2 0
18 set ko 0
19 expect {
20 -timeout 30
21 -re {^ERROR:[^\r\n]*\r\n} { incr ok1; exp_continue }
22 -re {^WARNING:[^\r\n]*\r\n} { incr ok1; exp_continue }
23 -re {^ok[^\r\n]*\r\n} { incr ok2; exp_continue }
24 -re {^ko[^\r\n]*\r\n} { incr ko; exp_continue }
25 timeout { fail "$test (timeout)" }
26 eof { }
27 }
28 catch { close }; catch { wait }
29 if {$ok1 == 5 && $ok2 == 3 && $ko == 0} then {
30 pass "$test ($ok1 $ok2 $ko)"
31 } else {
32 fail "$test ($ok1 $ok2 $ko)"
33 }
34 }