* [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp
@ 2018-10-09 12:45 Alan Hayward
2018-10-09 13:00 ` Pedro Alves
0 siblings, 1 reply; 2+ messages in thread
From: Alan Hayward @ 2018-10-09 12:45 UTC (permalink / raw)
To: gdb-patches; +Cc: nd, Alan Hayward
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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp
2018-10-09 12:45 [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp Alan Hayward
@ 2018-10-09 13:00 ` Pedro Alves
0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2018-10-09 13:00 UTC (permalink / raw)
To: Alan Hayward, gdb-patches; +Cc: nd, Tom de Vries
On 10/09/2018 01:44 PM, Alan Hayward wrote:
> 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.
Tom de Vries had already submitted a patch for this, but it
hadn't been reviewed yet. I've approved Tom's now. Sorry
about the duplicated work.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-10-09 13:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-09 12:45 [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp Alan Hayward
2018-10-09 13:00 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox