From 4acfec3d41064b5fe5290f4126638fd5b471c7d1 Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Tue, 9 Apr 2024 09:33:02 +0000 Subject: [PATCH] test/console: fix dut port detection Signed-off-by: Joachim Wiberg --- test/console | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/console b/test/console index 03ae355c..f86e19e1 100755 --- a/test/console +++ b/test/console @@ -75,7 +75,10 @@ else fi fi -portmap=$($(runner) port "$sys" $port) +# On systems with good IPv6 support we'll get two hits: +# 0.0.0.0:port +# [::]:port +portmap=$($(runner) port "$sys" $port | grep 0.0.0.0) port=${portmap#0.0.0.0:} if [ -z "$port" ]; then @@ -83,4 +86,4 @@ if [ -z "$port" ]; then exit 1 fi -telnet 127.0.0.1 "$port" +exec telnet 127.0.0.1 $port