* [PATCH] [gdb/testsuite] fix gdb.server/server-kill.exp
@ 2025-09-30 19:07 Sébastien Darche
2025-10-04 0:04 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Sébastien Darche @ 2025-09-30 19:07 UTC (permalink / raw)
To: gdb-patches; +Cc: Sébastien Darche
A test case in gdb.server/server-kill.exp attempts to query the server
status after the server it is connected to has been killed. The
connection is reset as expected, but the regex on the error message
seems to be out-of-date. The test expects:
Remote communication error. Target disconnected: Connection reset by peer.
But a modern build of gdb yields :
Remote communication error. Target disconnected: error while reading: Connection reset by peer.
I presume this is due to change 0da23004a064 ("Change serial_readchar to
throw") which added exceptions to the control flow handling instead of
relying on perror(). The exception error string inserts "error while
reading" to the perror message.
The test appeared to fail intermittently, sometimes matching the first
part of the regex ("Remote connection closed"). It now passes
consistently.
Change-Id: I3bf364b5d4b56de67f9ca30e9d636d3bb1be4119
---
gdb/testsuite/gdb.server/server-kill.exp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/gdb/testsuite/gdb.server/server-kill.exp b/gdb/testsuite/gdb.server/server-kill.exp
index a9fcabb08ce..1d3e348944b 100644
--- a/gdb/testsuite/gdb.server/server-kill.exp
+++ b/gdb/testsuite/gdb.server/server-kill.exp
@@ -97,7 +97,7 @@ proc_with_prefix test_tstatus {} {
# Force GDB to talk with GDBserver, so that we can get the
# "connection closed" error.
- gdb_test "tstatus" {Remote connection closed|Remote communication error\. Target disconnected: Connection reset by peer\.}
+ gdb_test "tstatus" {Remote connection closed|Remote communication error\. Target disconnected: error while reading: Connection reset by peer\.}
}
# Test unwinding with no debug/unwind info, right after the connection
@@ -152,4 +152,3 @@ test_tstatus
test_unwind_nosyms
test_unwind_syms
test_stepi
-
--
2.51.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] fix gdb.server/server-kill.exp
2025-09-30 19:07 [PATCH] [gdb/testsuite] fix gdb.server/server-kill.exp Sébastien Darche
@ 2025-10-04 0:04 ` Kevin Buettner
2025-10-08 20:14 ` Sébastien Darche
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2025-10-04 0:04 UTC (permalink / raw)
To: Sébastien Darche; +Cc: gdb-patches
On Tue, 30 Sep 2025 15:07:41 -0400
Sébastien Darche <sdarche@efficios.com> wrote:
> A test case in gdb.server/server-kill.exp attempts to query the server
> status after the server it is connected to has been killed. The
> connection is reset as expected, but the regex on the error message
> seems to be out-of-date. The test expects:
>
> Remote communication error. Target disconnected: Connection reset by peer.
>
> But a modern build of gdb yields :
>
> Remote communication error. Target disconnected: error while reading: Connection reset by peer.
>
> I presume this is due to change 0da23004a064 ("Change serial_readchar to
> throw") which added exceptions to the control flow handling instead of
> relying on perror(). The exception error string inserts "error while
> reading" to the perror message.
>
> The test appeared to fail intermittently, sometimes matching the first
> part of the regex ("Remote connection closed"). It now passes
> consistently.
LGTM.
Approved-by: Kevin Buettner <kevinb@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] [gdb/testsuite] fix gdb.server/server-kill.exp
2025-10-04 0:04 ` Kevin Buettner
@ 2025-10-08 20:14 ` Sébastien Darche
0 siblings, 0 replies; 3+ messages in thread
From: Sébastien Darche @ 2025-10-08 20:14 UTC (permalink / raw)
To: Kevin Buettner; +Cc: gdb-patches
Thank you. Commit pushed.
Sébastien
On 2025-10-03 20:04, Kevin Buettner wrote:
> On Tue, 30 Sep 2025 15:07:41 -0400
> Sébastien Darche <sdarche@efficios.com> wrote:
>
>> A test case in gdb.server/server-kill.exp attempts to query the server
>> status after the server it is connected to has been killed. The
>> connection is reset as expected, but the regex on the error message
>> seems to be out-of-date. The test expects:
>>
>> Remote communication error. Target disconnected: Connection reset by peer.
>>
>> But a modern build of gdb yields :
>>
>> Remote communication error. Target disconnected: error while reading: Connection reset by peer.
>>
>> I presume this is due to change 0da23004a064 ("Change serial_readchar to
>> throw") which added exceptions to the control flow handling instead of
>> relying on perror(). The exception error string inserts "error while
>> reading" to the perror message.
>>
>> The test appeared to fail intermittently, sometimes matching the first
>> part of the regex ("Remote connection closed"). It now passes
>> consistently.
> LGTM.
>
> Approved-by: Kevin Buettner <kevinb@redhat.com>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-08 20:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-09-30 19:07 [PATCH] [gdb/testsuite] fix gdb.server/server-kill.exp Sébastien Darche
2025-10-04 0:04 ` Kevin Buettner
2025-10-08 20:14 ` Sébastien Darche
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox