aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.threads
diff options
context:
space:
mode:
authorTom de Vries <tdevries@suse.de>2024-10-25 06:14:03 +0200
committerTom de Vries <tdevries@suse.de>2024-10-25 06:14:03 +0200
commit5c15d620746a971c6a0903579724bf2b8169a760 (patch)
tree141be972a26ded2ce3c1efd632e7cc0eb889f0fa /gdb/testsuite/gdb.threads
parenta1ccc78ea7ba8cad3ff37cbde9b5d3bba0194796 (diff)
downloadbinutils-5c15d620746a971c6a0903579724bf2b8169a760.zip
binutils-5c15d620746a971c6a0903579724bf2b8169a760.tar.gz
binutils-5c15d620746a971c6a0903579724bf2b8169a760.tar.bz2
[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.
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r--gdb/testsuite/gdb.threads/ia64-sigill.exp23
1 files changed, 19 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp
index 05f9982..79233ee 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
+ }
}