| 1 |
# Test overflow errors point to the correct thing. |
| 2 |
|
| 3 |
set test "overflow_error" |
| 4 |
if {![installtest_p]} { untested $test; return } |
| 5 |
|
| 6 |
set error_msg1 "ERROR: Array overflow, check size limit (3) near identifier 'overflow1' at $srcdir/$subdir/$test.stp" |
| 7 |
set error_msg2 "ERROR: Array overflow, check size limit (5) near identifier 'overflow2' at $srcdir/$subdir/$test.stp" |
| 8 |
set exit_warning "WARNING: Number of errors: 2, skipped probes: 0" |
| 9 |
|
| 10 |
foreach runtime [get_runtime_list] { |
| 11 |
set test_name $test |
| 12 |
if {$runtime != ""} { |
| 13 |
lappend test_name "($runtime)" |
| 14 |
spawn stap -DMAXERRORS=1 $srcdir/$subdir/$test.stp |
| 15 |
} else { |
| 16 |
spawn stap -DMAXERRORS=1 $srcdir/$subdir/$test.stp |
| 17 |
} |
| 18 |
|
| 19 |
set pass 0 |
| 20 |
expect { |
| 21 |
-timeout 60 |
| 22 |
$error_msg1 {incr pass; exp_continue} |
| 23 |
$error_msg2 {incr pass; exp_continue} |
| 24 |
$exit_warning {incr pass; exp_continue} |
| 25 |
timeout { |
| 26 |
kill -INT -[exp_pid] 2 |
| 27 |
fail "$test_name timed out" |
| 28 |
} |
| 29 |
eof {} |
| 30 |
} |
| 31 |
catch { close }; catch { wait } |
| 32 |
|
| 33 |
if {$pass == 3} { |
| 34 |
pass $test_name |
| 35 |
} else { |
| 36 |
fail "$test_name ($pass)" |
| 37 |
} |
| 38 |
} |