| 1 |
set test "trycatch" |
| 2 |
|
| 3 |
if {! [installtest_p]} { untested $test; return } |
| 4 |
|
| 5 |
foreach runtime [get_runtime_list] { |
| 6 |
set test "trycatch" |
| 7 |
set ok 0 |
| 8 |
set ko 0 |
| 9 |
if {$runtime != ""} { |
| 10 |
lappend test "($runtime)" |
| 11 |
spawn stap --runtime=$runtime $srcdir/buildok/fortyone.stp |
| 12 |
} else { |
| 13 |
spawn stap $srcdir/buildok/fortyone.stp |
| 14 |
} |
| 15 |
expect { |
| 16 |
-timeout 30 |
| 17 |
-re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue } |
| 18 |
-re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue } |
| 19 |
-re {^WARNING:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue } |
| 20 |
-re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue } |
| 21 |
-re {^OK[^\r\n]*\r\n} { incr ok; exp_continue } |
| 22 |
-re {^KO[^\r\n]*\r\n} { incr ko; exp_continue } |
| 23 |
timeout { fail "$test (timeout)" } |
| 24 |
eof { } |
| 25 |
} |
| 26 |
catch {close}; catch {wait} |
| 27 |
if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} |
| 28 |
|
| 29 |
set test "trycatch -u" |
| 30 |
set ok 0 |
| 31 |
set ko 0 |
| 32 |
if {$runtime != ""} { |
| 33 |
lappend test "($runtime)" |
| 34 |
spawn stap --runtime=$runtime -u $srcdir/buildok/fortyone.stp |
| 35 |
} else { |
| 36 |
spawn stap -u $srcdir/buildok/fortyone.stp |
| 37 |
} |
| 38 |
expect { |
| 39 |
-timeout 30 |
| 40 |
-re {^ERROR: MAXACTION[^\r\n]*\r\n} { incr ok; exp_continue } |
| 41 |
-re {^WARNING: Number of errors[^\r\n]*\r\n} { incr ok; exp_continue } |
| 42 |
-re {^WARNING:[^\r\n]* exited with status:[^\r\n]*\r\n} {incr ok; exp_continue } |
| 43 |
-re {^Pass 5: run failed[^\r\n]*\r\n} { incr ok; exp_continue } |
| 44 |
-re {^OK[^\r\n]*\r\n} { incr ok; exp_continue } |
| 45 |
-re {^KO[^\r\n]*\r\n} { incr ko; exp_continue } |
| 46 |
timeout { fail "$test (timeout)" } |
| 47 |
eof { } |
| 48 |
} |
| 49 |
catch {close}; catch {wait} |
| 50 |
if {$ok == 13 && $ko == 0} then {pass $test} else {fail "$test ($ok $ko)"} |
| 51 |
} |
| 52 |
|
| 53 |
|
| 54 |
|