diff options
author | Tom de Vries <tdevries@suse.de> | 2021-09-30 19:07:48 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2021-09-30 19:07:48 +0200 |
commit | 50f9e7d8538a74cb7cf73ffa7e1d4c295b2b40ba (patch) | |
tree | 45e47e7915a9a8da8f7eb522e06b08f4738a790a | |
parent | 9ebd2909664f80aa669bf3d904a4c809691e3198 (diff) | |
download | gdb-50f9e7d8538a74cb7cf73ffa7e1d4c295b2b40ba.zip gdb-50f9e7d8538a74cb7cf73ffa7e1d4c295b2b40ba.tar.gz gdb-50f9e7d8538a74cb7cf73ffa7e1d4c295b2b40ba.tar.bz2 |
[gdb/testsuite] Fix DUPLICATE in gdb.base/info-os.exp
When running test-case gdb.base/info-os.exp, I run into:
...
PASS: gdb.base/info-os.exp: get threads
PASS: gdb.base/info-os.exp: get threads
DUPLICATE: gdb.base/info-os.exp: get threads
...
Fix this not doing pass followed by exp_continue in gdb_test_multiple.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/gdb.base/info-os.exp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp index b17a784..14bbbd9 100644 --- a/gdb/testsuite/gdb.base/info-os.exp +++ b/gdb/testsuite/gdb.base/info-os.exp @@ -125,17 +125,16 @@ proc expect_multiline { command expect test } { global gdb_prompt # Do not duplicate FAILs from gdb_test_multiple. - set pass 0 - set fail 0 + set found 0 + set ok 0 gdb_test_multiple $command $test { -re "^$expect *\r\n" { - pass $test - set pass 1 + set found 1 exp_continue } -re "^$gdb_prompt $" { - if !$pass { - set fail 1 + if $found { + set ok 1 } # Exit the loop. } @@ -144,9 +143,7 @@ proc expect_multiline { command expect test } { exp_continue } } - if $fail { - fail $test - } + gdb_assert { $ok } $test } # Test output of the 'info os' commands against the expected results. |