The TCP test sends a file in each direction using one-shot Ncat
listeners.  Ncat's -w option only sets a connection timeout; it does not
make the sender exit on stdin EOF, so a sender can hang waiting for the
peer instead of finishing once its input has been sent.

Add --send-only so Ncat sends its complete input and exits on stdin EOF
without reading from the peer, matching the existing --no-shutdown used
on the listeners.

Fixes: a3d594d79a64 ("tests: Require Ncat for system tests.")
Assisted-by: DeepSeek V4 Pro, OpenCode
Signed-off-by: MJ Ponsonby <[email protected]>
---
 tests/system-ovn.at | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 7d6941a59..c669a44c9 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -22315,7 +22315,7 @@ check ovs-appctl dpctl/flush-conntrack
 # exit before sending all the data.
 # Test client -> server direction.
 NETNS_DAEMONIZE([server], [ncat --no-shutdown -l 172.16.1.2 8080 > 
tcp_server.rcvd], [server.pid])
-NS_CHECK_EXEC([client], [ncat -w 1 172.16.1.2 8080 < datafile], [0], [ignore], 
[ignore])
+NS_CHECK_EXEC([client], [ncat --send-only -w 1 172.16.1.2 8080 < datafile], 
[0], [ignore], [ignore])
 
 OVS_WAIT_UNTIL([test -s tcp_server.rcvd])
 check cmp datafile tcp_server.rcvd
@@ -22325,7 +22325,7 @@ kill $(cat server.pid) 2>/dev/null || true
 
 # Test server -> client direction.
 NETNS_DAEMONIZE([client], [ncat --no-shutdown -l 172.16.1.3 8081 > 
tcp_client.rcvd], [client.pid])
-NS_CHECK_EXEC([server], [ncat -w 1 172.16.1.3 8081 < datafile], [0], [ignore], 
[ignore])
+NS_CHECK_EXEC([server], [ncat --send-only -w 1 172.16.1.3 8081 < datafile], 
[0], [ignore], [ignore])
 
 OVS_WAIT_UNTIL([test -s tcp_client.rcvd])
 check cmp datafile tcp_client.rcvd
-- 
2.43.0

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to