[08/11] gdb, testsuite: handle async close in monitor-exit-quit.exp
Checks
| Context |
Check |
Description |
| linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
| linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
Commit Message
From: "Bouhaouel, Mohamed" <mohamed.bouhaouel@intel.com>
With non-stop remote targets, the "Remote connection closed"
notification arrives asynchronously after "monitor exit" and may appear
while processing the quit command, causing test failures.
Fix by using "with confirm off -- quit" and handling the async
notification in the quit sequence.
---
gdb/testsuite/gdb.server/monitor-exit-quit.exp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
@@ -50,11 +50,16 @@ set gdbserver_gdbport [lindex $res 1]
gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
gdb_test_no_output "monitor exit"
-gdb_test_no_output "set confirm off"
set do_cleanup 1
-gdb_test_multiple "quit" "" {
+gdb_test_multiple "with confirm off -- quit" "" {
+ -re -wrap "Remote connection closed.*" {
+ # With non-stop remote targets, the "Remote connection closed"
+ # notification is delivered asynchronously and may appear while
+ # processing the quit command.
+ exp_continue
+ }
-re -wrap "" {
fail "$gdb_test_name (prompt)"
# Let default_gdb_exit do the cleanup.