Debian Codegraph @

doc/SystemTap_Beginners_Guide/testsuite/systemtap.maps/pmap_agg_overflow.exp

raw
1 # function to test error handling of pmap aggregation
2
3 set test "pmap_agg_overflow"
4 if {![installtest_p]} { untested $test; return }
5
6 set pass1 "^ERROR: \[^\r\]*overflow\[^\r\]*\r\n"
7 set pass2 "WARNING: Number of errors: 2, skipped probes: 0\r\n"
8 set skip_result "^WARNING: This test only applies to smp systems\.\.\.\r\n"
9
10 set pass 0
11 set unsupported 0
12
13 spawn stap -DMAXERRORS=1 -g $srcdir/$subdir/$test.stp
14 expect {
15 -timeout 240
16 -re $pass1 {incr pass; exp_continue}
17 -re $pass2 {incr pass; exp_continue}
18 -re $skip_result {
19 set unsupported 1
20 }
21 timeout {
22 kill -INT -[exp_pid] 2
23 fail "$test timed out"
24 }
25 eof {}
26 -re "semantic error:" { fail "$test compilation" }
27 }
28 catch { close }
29 wait
30
31 if {$pass == 3} {
32 pass $test
33 } elseif {$unsupported == 1} {
34 unsupported "$test requires smp"
35 } else {
36 fail "$test ($pass)"
37 }
38
39