diff options
author | Tom de Vries <tdevries@suse.de> | 2018-10-04 14:10:39 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2018-10-09 15:33:00 +0200 |
commit | 58bbcd02dee8ba018b97706c068ed8ed7afac15d (patch) | |
tree | 25dcf9c919924fb9efee721fbc24fff9a1847819 /gdb/testsuite/lib | |
parent | 04fd5eed91c0a960e1706fb627912ad6350ae391 (diff) | |
download | binutils-58bbcd02dee8ba018b97706c068ed8ed7afac15d.zip binutils-58bbcd02dee8ba018b97706c068ed8ed7afac15d.tar.gz binutils-58bbcd02dee8ba018b97706c068ed8ed7afac15d.tar.bz2 |
[gdb/testsuite] Fix target_supports_scheduler_locking raciness
When calling gdb_start_cmd, it's the caller's responsibility to wait for gdb
to return to the prompt. In target_supports_scheduler_locking, that's not the
case, and consequently, target_supports_scheduler_locking fails spuriously.
Fix by using runto_main instead.
Build and reg-tested on x86_64-linux.
2018-10-09 Tom de Vries <tdevries@suse.de>
* lib/gdb.exp (target_supports_scheduler_locking): Replace gdb_start_cmd
with runto_main.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e91a3c8..2d197d9 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -5971,7 +5971,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 "" |