This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp
- From: Alan Hayward <alan dot hayward at arm dot com>
- To: gdb-patches at sourceware dot org
- Cc: nd at arm dot com, Alan Hayward <alan dot hayward at arm dot com>
- Date: Tue, 9 Oct 2018 13:44:57 +0100
- Subject: [PATCH] Testsuite: Remove race condition from mi-cmd-param-changed.exp
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)