aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuinevere Larsen <blarsen@redhat.com>2024-08-27 08:12:00 -0300
committerGuinevere Larsen <blarsen@redhat.com>2024-08-28 08:41:05 -0300
commit2e3759c2609c25c4ee59726e3c97e0f2a7c40311 (patch)
tree0adc3573dcc3ce532f0dca5badb69642b2ee3e7b
parent0e6430633515f78599840ac0ab82e20f46654363 (diff)
downloadbinutils-2e3759c2609c25c4ee59726e3c97e0f2a7c40311.zip
binutils-2e3759c2609c25c4ee59726e3c97e0f2a7c40311.tar.gz
binutils-2e3759c2609c25c4ee59726e3c97e0f2a7c40311.tar.bz2
gdb/testsuite: fix gdb.btrace/non-stop.exp end of history check
The recent commit 089197010993b3a5dc50bf882470bab2de696d92 changed the warnings when GDB reaches the end of the recorded history, and updated tests to expect the new messages. The pattern used for gdb.btrace/non-stop.exp, however, was too broad and could cause the following test result: ... (gdb) PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: prompt ^M Reached end of recorded history; stopping.^M Following forward execution will be added to history.^M test (arg=0x0) at /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M 30 return arg; /* bp.2 */^M ^M Reached end of recorded history; stopping.^M Following forward execution will be added to history.^M test (arg=0x0) at /data/vries/gdb/src/gdb/testsuite/gdb.btrace/non-stop.c:30^M 30 return arg; /* bp.2 */^M PASS: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: thread 0 FAIL: gdb.btrace/non-stop.exp: no progress: all: thread apply all continue: thread 1 (timeout) ... This happens because the pattern looks like one of these 2: "Reached end of recorded.*Backwards execution.*" "Reached end of recorded.*Following forward.*" What seems to have happened is that all the output came at once, and most of it was consumed by the first '.*' pattern when checking for thread 0, so there was no output left for checking thread 1. This commit fixes that by making the expected outputs more exact. I also fixed the whitespace errors in gdb_cont_to_no_history_backwards that pre-dated the commit above, since I was already touching that proc. Approved-By: Tom de Vries <tdevries@suse.de>
-rw-r--r--gdb/testsuite/gdb.btrace/non-stop.exp16
1 files changed, 9 insertions, 7 deletions
diff --git a/gdb/testsuite/gdb.btrace/non-stop.exp b/gdb/testsuite/gdb.btrace/non-stop.exp
index 5e43545..8397c20 100644
--- a/gdb/testsuite/gdb.btrace/non-stop.exp
+++ b/gdb/testsuite/gdb.btrace/non-stop.exp
@@ -81,18 +81,20 @@ proc gdb_cont_to_bp_line { line threads nthreads } {
proc gdb_cont_to_no_history_backward { threads cmd nthreads } {
gdb_cont_to $threads $cmd \
- [multi_line \
- "Reached end of recorded.*Backward execution.*" \
- "\[^\\\r\\\n\]*" \
- "\[^\\\r\\\n\]*" \
- ] \
- $nthreads
+ [multi_line \
+ "Reached end of recorded history; stopping\." \
+ "Backward execution from here not possible\." \
+ "\[^\\\r\\\n\]*" \
+ "\[^\\\r\\\n\]*" \
+ ] \
+ $nthreads
}
proc gdb_cont_to_no_history_forward { threads cmd nthreads } {
gdb_cont_to $threads $cmd \
[multi_line \
- "Reached end of recorded.*Following forward.*" \
+ "Reached end of recorded history; stopping\." \
+ "Following forward execution will be added to history\." \
"\[^\\\r\\\n\]*" \
"\[^\\\r\\\n\]*" \
] \