From: Alan Hayward <alan.hayward@arm.com>
To: gdb-patches@sourceware.org
Cc: nd@arm.com, Alan Hayward <alan.hayward@arm.com>
Subject: [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp
Date: Tue, 09 Oct 2018 12:45:00 -0000 [thread overview]
Message-ID: <20181009124457.81037-1-alan.hayward@arm.com> (raw)
target_supports_scheduler_locking does not wait for the gdb
prompt after calling gdb_start_cmd.
Fix by replacing with runto_main.
This removes the racy behaviour of mi-cmd-param-changed.exp.
gdb/testsuite/ChangeLog:
2018-10-09 Alan Hayward <alan.hayward@arm.com>
* lib/gdb.exp (target_supports_scheduler_locking): Call runto_main.
---
gdb/testsuite/lib/gdb.exp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 9284291ccd..6a99eca6f9 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -5957,7 +5957,9 @@ gdb_caching_proc target_supports_scheduler_locking {
}
clean_restart $obj
- gdb_start_cmd
+ if ![runto_main] {
+ return 0
+ }
set supports_schedule_locking -1
set current_schedule_locking_mode ""
--
2.17.1 (Apple Git-112)
next reply other threads:[~2018-10-09 12:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-09 12:45 Alan Hayward [this message]
2018-10-09 13:00 ` Pedro Alves
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=20181009124457.81037-1-alan.hayward@arm.com \
--to=alan.hayward@arm.com \
--cc=gdb-patches@sourceware.org \
--cc=nd@arm.com \
/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