Commit ad5235c
Pavan Naik
BUG#13687542 : MTR BEHAVES WRONG WHEN EXECUTING 'ERROR $VAR' IN A LOOP
Description :
=============
MTR's 'error' command can be used when a statement is expected to fail.
It is possible to give the error code either hard-coded or as an mtr variable,
like: --error $variable.
However, if an 'error $variable' statement is inside a loop, it evaluates
to the same value every iteration.
Issue :
=======
'expected_errors' array was not getting updated with the 'error' command
value after the first iteration.
Fix :
=====
Check for 'error' command and update the 'expected_errors' array for each
iteration of the loop.
Reviewed-by: Sayantan Dutta <[email protected]>
RB: 114631 parent 9ccd5f1 commit ad5235c
3 files changed
Lines changed: 29 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
8392 | 8392 | | |
8393 | 8393 | | |
8394 | 8394 | | |
| 8395 | + | |
| 8396 | + | |
| 8397 | + | |
| 8398 | + | |
| 8399 | + | |
| 8400 | + | |
| 8401 | + | |
8395 | 8402 | | |
8396 | 8403 | | |
8397 | 8404 | | |
| |||
8771 | 8778 | | |
8772 | 8779 | | |
8773 | 8780 | | |
| 8781 | + | |
| 8782 | + | |
| 8783 | + | |
8774 | 8784 | | |
8775 | 8785 | | |
8776 | 8786 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
247 | 253 | | |
248 | 254 | | |
249 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
713 | 725 | | |
714 | 726 | | |
715 | 727 | | |
| |||
0 commit comments