Skip to contentSkip to conversation

Revert "selftests: net: amt: wait longer for connection before sending packets"

PATCH In review Nathan Gao 2 participants 2 messages Mar 3 – Mar 4

Subsystems (4)
lore
Share & tools
lore

Nathan Gao

author
#0 lore raw

PATCH 1/1 Revert "selftests: net: amt: wait longer for connection before sending packets"

This reverts commit 7724036d4804222007689cd69f248347eb154793 which is commit 04708606fd7bdc34b69089a4ff848ff36d7088f9 upstream.

The reverted patch introduced dependency on lib.sh under net selftests. The file was introduced in v6.8-rc1 via commit 25ae948b4478 ("selftests/net: add lib.sh").

Without lib.sh, the amt test fails with:
./amt.sh: line 76: source: lib.sh: file not found

The whole history of lib.sh includes about 50 commits and considering the file never landed on 6.1 it may be better to not introduce it.

---
 tools/testing/selftests/net/amt.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
tools/testing/selftests/net/amt.sh +2 -5
index ea40b469a8c1..7e7ed6c558da 100755
@@ -73,8 +73,6 @@
 #       +------------------------+
 #==============================================================================
 
-source lib.sh
-
 readonly LISTENER=$(mktemp -u listener-XXXXXXXX)
 readonly GATEWAY=$(mktemp -u gateway-XXXXXXXX)
 readonly RELAY=$(mktemp -u relay-XXXXXXXX)
@@ -242,15 +240,14 @@ test_ipv6_forward()
 
 send_mcast4()
 {
-	sleep 5
-	wait_local_port_listen ${LISTENER} 4000 udp
+	sleep 2
 	ip netns exec "${SOURCE}" bash -c \
 		'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
 }
 
 send_mcast6()
 {
-	wait_local_port_listen ${LISTENER} 6000 udp
+	sleep 2
 	ip netns exec "${SOURCE}" bash -c \
 		'printf "%s %128s" 2001:db8:3::2 | nc -w 1 -u ff0e::5:6 6000' &
 }
Signature · 1 line
2.47.3
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Nathan Gao

Hi Nathan,
Thank you so much for taking care of it.

Quoted 7 lines

This reverts commit 7724036d4804222007689cd69f248347eb154793 which is commit 04708606fd7bdc34b69089a4ff848ff36d7088f9 upstream.

The reverted patch introduced dependency on lib.sh under net selftests. The file was introduced in v6.8-rc1 via commit 25ae948b4478 ("selftests/net: add lib.sh").

Quoted 7 lines

Without lib.sh, the amt test fails with:
./amt.sh: line 76: source: lib.sh: file not found

The whole history of lib.sh includes about 50 commits and considering the file never landed on 6.1 it may be better to not introduce it.

Quoted 38 lines
---
 tools/testing/selftests/net/amt.sh | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)
tools/testing/selftests/net/amt.sh +2 -6
index ea40b469a8c1..7e7ed6c558da 100755
@@ -73,8 +73,6 @@
 #       +------------------------+
 #==============================================================================
 
-source lib.sh
-
 readonly LISTENER=$(mktemp -u listener-XXXXXXXX)
 readonly GATEWAY=$(mktemp -u gateway-XXXXXXXX)
 readonly RELAY=$(mktemp -u relay-XXXXXXXX)
@@ -242,15 +240,14 @@ test_ipv6_forward()
 
 send_mcast4()
 {
-       sleep 5
-       wait_local_port_listen ${LISTENER} 4000 udp
+       sleep 2
        ip netns exec "${SOURCE}" bash -c \
                'printf "%s %128s" 172.17.0.2 | nc -w 1 -u 239.0.0.1 4000' &
 }
 
 send_mcast6()
 {
-       wait_local_port_listen ${LISTENER} 6000 udp
+       sleep 2
        ip netns exec "${SOURCE}" bash -c \
                'printf "%s %128s" 2001:db8:3::2 | nc -w 1 -u ff0e::5:6 6000' &
 }
--

2.47.3