public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug gdb/29833] [gdb] FAIL: gdb.server/monitor-exit-quit.exp: monitor exit
Date: Thu, 01 Dec 2022 09:50:23 +0000	[thread overview]
Message-ID: <bug-29833-4717-8v38LPJbYZ@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-29833-4717@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=29833

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
Sofar, I was not able to reproduce this other than by running the entire
testsuite, which is a bit unpractical.

I've tried the approach of adding debug logging, like so:
...
@@ -51,7 +51,18 @@ set gdbserver_protocol [lindex $res 0]
 set gdbserver_gdbport [lindex $res 1]
 gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport

-gdb_test_no_output "monitor exit"
+gdb_test_no_output "set debug remote 1"
+gdb_test_no_output "set debug event-loop all"
+gdb_test_multiple "monitor exit" "" {
+    -re -wrap "Remote connection closed.*" {
+       fail $gdb_test_name
+    }
+    -re -wrap "" {
+       pass $gdb_test_name
+    }
+}
+gdb_test "set debug event-loop off"
+gdb_test "set debug remote 0"
 gdb_test_no_output "set confirm off"

 set do_cleanup 1
...

And after a entire testsuite run, I have:
...
(gdb) set debug remote 1^M
(gdb) PASS: gdb.server/monitor-exit-quit.exp: set debug remote 1
set debug event-loop all^M
(gdb) PASS: gdb.server/monitor-exit-quit.exp: set debug event-loop all
[event-loop] handle_file_event: invoking fd file handler `ui-1`^M
monitor exit^M
[remote] Sending packet: $qRcmd,65786974#d7^M
[remote] Packet received: OK^M
(gdb) PASS: gdb.server/monitor-exit-quit.exp: monitor exit
[event-loop] handle_file_event: invoking fd file handler `serial`^M
[remote] wait: enter^M
  [event-loop] clear_async_event_handler: clearing async event handler
`remote`^M
[remote] wait: exit^M
Remote connection closed^M
(gdb) PASS: gdb.server/monitor-exit-quit.exp: set debug event-loop off
[event-loop] handle_file_event: invoking fd file handler `ui-1`^M
set debug event-loop off^M
(gdb) set debug remote 0^M
(gdb) PASS: gdb.server/monitor-exit-quit.exp: set debug remote 0
...

AFAICT, the same behaviour reproduces, it just doesn't cause a fail, either
because of timing or because of less strict matching.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2022-12-01  9:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-29  7:19 [Bug gdb/29833] New: " vries at gcc dot gnu.org
2022-11-30  8:11 ` [Bug gdb/29833] " vries at gcc dot gnu.org
2022-11-30  9:45 ` vries at gcc dot gnu.org
2022-11-30 12:50 ` simark at simark dot ca
2022-12-01  9:50 ` vries at gcc dot gnu.org [this message]
2022-12-01 10:59 ` vries at gcc dot gnu.org
2022-12-01 11:18 ` vries at gcc dot gnu.org
2023-01-06 18:05 ` vries at gcc dot gnu.org
2023-01-07 17:42 ` vries at gcc dot gnu.org
2023-01-09 14:53 ` vries at gcc dot gnu.org
2023-01-09 14:53 ` vries at gcc dot gnu.org
2023-01-10 10:43 ` vries at gcc dot gnu.org
2023-01-10 14:00 ` vries at gcc dot gnu.org
2023-03-11 15:03 ` vries at gcc dot gnu.org
2024-01-15  9:20 ` vries at gcc dot gnu.org
2024-01-16  7:35 ` [Bug testsuite/29833] " vries at gcc dot gnu.org

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=bug-29833-4717-8v38LPJbYZ@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).