From: Philippe Waroquiers <philippe.waroquiers@skynet.be>
To: gdb-patches@sourceware.org
Cc: Philippe Waroquiers <philippe.waroquiers@skynet.be>
Subject: [PATCH/OBVIOUS] Add missing gdb_prompt in ctxobj.exp to avoid random failure, fix typo.
Date: Sat, 19 Nov 2022 16:13:08 +0100 [thread overview]
Message-ID: <20221119151308.255698-1-philippe.waroquiers@skynet.be> (raw)
ctxobj.exp fails randomly when computer is loaded.
With the addition of $gdb_prompt in the regexp testing for breakpoint hit,
I could not make it fail anymore.
Also fixed a typo in a comment.
---
gdb/testsuite/gdb.base/ctxobj.exp | 4 ++--
gdb/testsuite/lib/mi-support.exp | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.base/ctxobj.exp b/gdb/testsuite/gdb.base/ctxobj.exp
index 3ca8111896c..228a6890f11 100644
--- a/gdb/testsuite/gdb.base/ctxobj.exp
+++ b/gdb/testsuite/gdb.base/ctxobj.exp
@@ -70,7 +70,7 @@ gdb_test "break ctxobj-f.c:$bp_location" \
global expect_out
set test "continue to get_version_1"
gdb_test_multiple "continue" $test {
- -re "Breakpoint ($bkptno_num_re), get_version_1 \\(\\).*" {
+ -re "Breakpoint ($bkptno_num_re), get_version_1 \\(\\).*\r\n.*$gdb_prompt $" {
set bpno $expect_out(1,string)
pass $test
}
@@ -110,7 +110,7 @@ gdb_test "print this_version_num == v" \
# Do the same, but from get_version_2.
set test "continue to get_version_2"
gdb_test_multiple "continue" $test {
- -re "Breakpoint ($bkptno_num_re), get_version_2 \\(\\).*" {
+ -re "Breakpoint ($bkptno_num_re), get_version_2 \\(\\).*\r\n.*$gdb_prompt $" {
set bpno $expect_out(1,string)
pass $test
}
diff --git a/gdb/testsuite/lib/mi-support.exp b/gdb/testsuite/lib/mi-support.exp
index a45c6f7be28..14ddf0ad7ff 100644
--- a/gdb/testsuite/lib/mi-support.exp
+++ b/gdb/testsuite/lib/mi-support.exp
@@ -1211,7 +1211,7 @@ proc mi_detect_async {} {
# EXTRA can be a list of one, two or three elements.
# The first element is the regular expression
# for output expected right after *stopped, and before GDB prompt.
-# The third element is the regulation expression for the locno
+# The third element is the regular expression for the locno
# right after bkptno field. The locno regex should not include
# the comma separating it from the following fields.
#
--
2.30.2
reply other threads:[~2022-11-19 15:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221119151308.255698-1-philippe.waroquiers@skynet.be \
--to=philippe.waroquiers@skynet.be \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).