From: Tom de Vries Date: Fri, 25 Oct 2024 04:14:03 +0000 (+0200) Subject: [gdb/testsuite] Fix gdb.threads/ia64-sigill.exp with check-read1 X-Git-Tag: gdb-16-branchpoint~598 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5c15d620746a971c6a0903579724bf2b8169a760;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Fix gdb.threads/ia64-sigill.exp with check-read1 Fix test-case gdb.threads/ia64-sigill.exp with make target check-read1 by using a custom line-by-line exp_continue clause: ... -re "\r\n\[^\r\n\]*(?=\r\n\[^\r\n\]*\r\n)" { exp_continue } ... which drops a line each time it finds two lines in the buffer. This allows the other clauses to use two-line patterns. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp index 05f998244f6..79233ee3bee 100644 --- a/gdb/testsuite/gdb.threads/ia64-sigill.exp +++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp @@ -58,20 +58,35 @@ gdb_test_no_output "set debug infrun 1" # The ia64 SIGILL signal is visible only in the linux-nat debug output. set prompt "$gdb_prompt \\\[infrun\\\] fetch_inferior_event: exit\r\n$" +set ok 0 gdb_test_multiple "continue" "continue" -prompt $prompt { - -re "Breakpoint \[0-9\]+,( .* in)? thread_func .*$prompt$" { - pass $gdb_test_name + -re "Breakpoint \[0-9\]+,( \[^\r\n\]+ in)? thread_func \[^\r\n\]+" { + set ok 1 + exp_continue + } + -re -wrap "" { + gdb_assert { $ok } $gdb_test_name + } + -re "\r\n\[^\r\n\]*(?=\r\n\[^\r\n\]*\r\n)" { + exp_continue } } gdb_test_no_output {delete $sigill_bpnum} +set ok 0 gdb_test_multiple "continue" "continue for the pending signal" -prompt $prompt { - -re "Breakpoint \[0-9\]+, .*break-at-exit.*\r\n$prompt$" { + -re "Breakpoint \[0-9\]+, .*break-at-exit" { # Breakpoint has been skipped in the other thread. - pass $gdb_test_name + set ok 1 } -re " received signal .*\r\n$gdb_prompt $" { fail $gdb_test_name } + -re -wrap "" { + gdb_assert { $ok } $gdb_test_name + } + -re "\r\n\[^\r\n\]*(?=\r\n\[^\r\n\]*\r\n)" { + exp_continue + } }