Debian Codegraph @

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

raw
1 set test "wakeup"
2
3 if {![installtest_p]} {untested $test; return}
4
5 # There have been issues with kernel probes put into the wake_up path.
6 # see http://sourceware.org/ml/systemtap/2011-q3/msg00163.html
7 spawn stap -DMAXERRORS=999 $srcdir/$subdir/$test.stp -c {ls -laR /dev/* /proc/* > /dev/null 2>&1; sleep 5}
8 set systems 0
9 set warns 0
10 set errors 0
11 set prints 0
12 expect {
13 -timeout 180
14 -re {^sleeping\r\n} { incr systems; exp_continue }
15 -re {^WARNING:[^\r\n]*\r\n} { incr warns; exp_continue }
16 -re {^ERROR:[^\r\n]*\r\n} { incr errors; exp_continue }
17 -re {^count: 25\r\n} { incr prints; exp_continue }
18 timeout { fail "$test (timeout)" }
19 eof { }
20 }
21 catch { close }; catch { wait }
22
23 # WARNINGs get collapsed, so only 1 expected ... plus the two from staprun re. the ERROR exits.
24 if {$systems == 8 && $warns == 3 && $errors == 8 && $prints == 1} { pass "$test" } { fail "$test ($systems,$warns,$errors,$prints)" }