* [PATCH][gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp
@ 2021-10-27 10:24 Tom de Vries via Gdb-patches
2021-10-27 15:35 ` Keith Seitz via Gdb-patches
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries via Gdb-patches @ 2021-10-27 10:24 UTC (permalink / raw)
To: gdb-patches
Hi,
On OBS I ran into this failure with test-case
gdb.debuginfod/fetch_src_and_symbols.exp:
...
Failed to listen for connections: Address already in use^M
[Thu Oct 21 11:48:49 2021] (559/559): started http server on IPv6 port=8000^M
...
FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: find port timeout
...
The test-case is trying to start debuginfod on a port to see if it's
available, and it handles either this message:
"started http server on IPv4 IPv6 port=$port"
meaning success, or:
"failed to bind to port"
meaning failure, in which case the debuginfod instance is killed, and we try
the next port.
The test-case only uses the v4 address 127.0.0.1, so fix this by:
- accepting "started http server on IPv4 port=$port"
- rejecting "started http server on IPv6 port=$port"
Tested on x86_64-linux.
Any comments?
Thanks,
- Tom
[gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp
---
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
index 93490fce41e..f8fcbbae8a4 100644
--- a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
+++ b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
@@ -180,12 +180,17 @@ proc local_url { } {
spawn debuginfod -vvvv -d $db -p $port -F $debugdir
expect {
"started http server on IPv4 IPv6 port=$port" { set found 1 }
- "failed to bind to port" { kill_wait_spawned_process $spawn_id }
+ "started http server on IPv4 port=$port" { set found 1 }
+ "started http server on IPv6 port=$port" {}
+ "failed to bind to port" {}
timeout {
fail "find port timeout"
return -1
}
}
+ if { ! $found } {
+ kill_wait_spawned_process $spawn_id
+ }
}
set metrics [list "ready 1" \
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH][gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp
2021-10-27 10:24 [PATCH][gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp Tom de Vries via Gdb-patches
@ 2021-10-27 15:35 ` Keith Seitz via Gdb-patches
2021-10-27 16:58 ` Tom de Vries via Gdb-patches
0 siblings, 1 reply; 3+ messages in thread
From: Keith Seitz via Gdb-patches @ 2021-10-27 15:35 UTC (permalink / raw)
To: Tom de Vries, gdb-patches
On 10/27/21 03:24, Tom de Vries wrote:
> Hi,
>
> On OBS I ran into this failure with test-case
> gdb.debuginfod/fetch_src_and_symbols.exp:
> ...
> Failed to listen for connections: Address already in use^M
> [Thu Oct 21 11:48:49 2021] (559/559): started http server on IPv6 port=8000^M
> ...
> FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: find port timeout
> ...
>
> The test-case is trying to start debuginfod on a port to see if it's
> available, and it handles either this message:
> "started http server on IPv4 IPv6 port=$port"
> meaning success, or:
> "failed to bind to port"
> meaning failure, in which case the debuginfod instance is killed, and we try
> the next port.
>
> The test-case only uses the v4 address 127.0.0.1, so fix this by:
> - accepting "started http server on IPv4 port=$port"
> - rejecting "started http server on IPv6 port=$port"
>
> Tested on x86_64-linux.
>
> Any comments?
When IPv6 is detected, the test case could set a variable to
use ::1 instead of 127.0.0.1, but that would merely test the
debuginfod client more than GDB itself, so I'd say this LGTM.
Thank you for addressing this!
Keith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH][gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp
2021-10-27 15:35 ` Keith Seitz via Gdb-patches
@ 2021-10-27 16:58 ` Tom de Vries via Gdb-patches
0 siblings, 0 replies; 3+ messages in thread
From: Tom de Vries via Gdb-patches @ 2021-10-27 16:58 UTC (permalink / raw)
To: Keith Seitz, gdb-patches
On 10/27/21 5:35 PM, Keith Seitz wrote:
> On 10/27/21 03:24, Tom de Vries wrote:
>> Hi,
>>
>> On OBS I ran into this failure with test-case
>> gdb.debuginfod/fetch_src_and_symbols.exp:
>> ...
>> Failed to listen for connections: Address already in use^M
>> [Thu Oct 21 11:48:49 2021] (559/559): started http server on IPv6
>> port=8000^M
>> ...
>> FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: find port
>> timeout
>> ...
>>
>> The test-case is trying to start debuginfod on a port to see if it's
>> available, and it handles either this message:
>> "started http server on IPv4 IPv6 port=$port"
>> meaning success, or:
>> "failed to bind to port"
>> meaning failure, in which case the debuginfod instance is killed, and
>> we try
>> the next port.
>>
>> The test-case only uses the v4 address 127.0.0.1, so fix this by:
>> - accepting "started http server on IPv4 port=$port"
>> - rejecting "started http server on IPv6 port=$port"
>>
>> Tested on x86_64-linux.
>>
>> Any comments?
>
> When IPv6 is detected, the test case could set a variable to
> use ::1 instead of 127.0.0.1,
Ack.
> but that would merely test the
> debuginfod client more than GDB itself, so I'd say this LGTM.
>
Agreed.
> Thank you for addressing this!
> Keith
>
Thanks for the review, committed.
- Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-27 16:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-27 10:24 [PATCH][gdb/testsuite] Fix port detection in gdb.debuginfod/fetch_src_and_symbols.exp Tom de Vries via Gdb-patches
2021-10-27 15:35 ` Keith Seitz via Gdb-patches
2021-10-27 16:58 ` Tom de Vries via Gdb-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox