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