diff options
author | Tom de Vries <tdevries@suse.de> | 2024-10-08 22:31:12 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2024-10-08 22:31:12 +0200 |
commit | 09ff58c1ad9b5894aa9b7965071d4133ab2202ac (patch) | |
tree | 8eab93dbbc0c9921705a986b5471ffef4c4c7762 | |
parent | cd5e87850f36882acaa3220207737b9ca136f3f9 (diff) | |
download | binutils-09ff58c1ad9b5894aa9b7965071d4133ab2202ac.zip binutils-09ff58c1ad9b5894aa9b7965071d4133ab2202ac.tar.gz binutils-09ff58c1ad9b5894aa9b7965071d4133ab2202ac.tar.bz2 |
[gdb/testsuite] Fix gdb.base/break-interp.exp with check-read1
When running test-case gdb.base/break-interp.exp with check-read1, I run into:
...
(gdb) info files^M
...
0x00007ffff7e75980 - 0x00007ffff7e796a0 @ 0x001f1970 is .bss in /data/vries/gdb/leap-15-5/build/gdb/testsuite/outputs/gdb.base/break-interp/break-interp-BINprelinkNOdebugNOFAIL: gdb.base/break-interp.exp: ldprelink=NO: ldsepdebug=NO: binprelink=NO: binsepdebug=NO: binpie=NO: INNER: symbol-less: info files (timeout)
pieNO.d/libc.so.6^M
...
The code has two adaptations to deal with the large output:
- nested gdb_test_multiple, and
- an exp_continue in the inner gdb_test_multiple.
The former seems unnecessary, and the latter doesn't trigger often enough
because of an incomplete hex number regexp, causing the timeout.
Get rid of both of these, and use -lbl instead.
Tested on x86_64-linux.
-rw-r--r-- | gdb/testsuite/gdb.base/break-interp.exp | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/gdb/testsuite/gdb.base/break-interp.exp b/gdb/testsuite/gdb.base/break-interp.exp index 98f67ee..fd8afdd 100644 --- a/gdb/testsuite/gdb.base/break-interp.exp +++ b/gdb/testsuite/gdb.base/break-interp.exp @@ -495,26 +495,14 @@ proc test_ld {file ifmain trynosym displacement} { if $ifmain { reach $solib_bp run $displacement 3 - # Use two separate gdb_test_multiple statements to avoid timeouts due - # to slow processing of wildcard capturing long output - set test "info files" set entrynohex "" - set info_line [join [list \ - "\r\n" "\[\t\]" "0x\[0-9af\]+" " - " \ - "0x\[0-9af\]+" " @ " "0x\[0-9af\]+" \ - " is " "\[^\r\n\]+"] ""] - gdb_test_multiple $test $test { + gdb_test_multiple "info files" "" -lbl { -re "\r\n\[\t \]*Entry point:\[\t \]*0x(\[0-9a-f\]+)\r\n" { set entrynohex $expect_out(1,string) - gdb_test_multiple "" $test { - -re "\r\n$gdb_prompt $" { - pass $test - } - -re $info_line { - # Avoid timeout with check-read1 - exp_continue - } - } + exp_continue + } + -re -wrap "" { + gdb_assert { ![string equal $entrynohex ""] } $gdb_test_name } } |