Four ECMP tests pipe one packet, wait one second, and then pipe a second
packet into an Ncat client. The daemonized listener sees EOF on its own
stdin and normally half-closes its TCP write side, sending FIN to the
client.

Ncat 7.96 includes commit dd4a7906d652 ("Change Ncat default behavior
to avoid TCP half-closed connections"). It changed connect mode to exit
when the peer half-closes. With that release or newer, the client exits
on the listener FIN before the shell writes the second packet. OVN CI
currently uses Ncat 7.92 on Fedora and 7.94 on Ubuntu, while NixOS uses
7.99.

Adding -k to the client would restore the old behavior on new Ncat, but
older releases reject -k in connect mode. --no-shutdown has been
available since Ncat 7.00 and prevents the listener from sending FIN,
so it works with both old and new clients.

Set this option only on the four listeners whose tests require the
delayed second write. Other tests retain their existing behavior.

Assisted-by: Codex gpt-5.6-sol high
Signed-off-by: Ihar Hrachyshka <[email protected]>
Acked-by: Han Zhou <[email protected]>
---
 tests/system-ovn.at | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/system-ovn.at b/tests/system-ovn.at
index 5e901cb42..799779276 100644
--- a/tests/system-ovn.at
+++ b/tests/system-ovn.at
@@ -6655,7 +6655,7 @@ AT_CHECK([ovs-appctl dpctl/flush-conntrack])
 NS_CHECK_EXEC([bob1], [ip r d default via 172.16.0.2 dev bob1], [0])
 NS_CHECK_EXEC([bob1], [ip r a default via 172.16.0.3 dev bob1], [0])
 
-NETNS_DAEMONIZE([bob1], [ncat -l -k 8080], [bob1.pid])
+NETNS_DAEMONIZE([bob1], [ncat --no-shutdown -l -k 8080], [bob1.pid])
 NS_CHECK_EXEC([alice1], [(echo "Packet 1"; sleep 1; echo "Packet 2") | ncat 
172.16.0.1 8080], [0])
 NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 172.16.0.1 | FORMAT_PING], \
 [0], [dnl
@@ -6673,7 +6673,7 @@ 
tcp,orig=(src=10.0.0.2,dst=172.16.0.1,sport=<cleared>,dport=<cleared>),reply=(sr
 check ovn-nbctl --policy="src-ip" lr-route-del R1 10.0.0.0/24 20.0.0.3
 check ovn-nbctl --wait=hv sync
 AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-NETNS_DAEMONIZE([bob1], [ncat -l -k 8081], [bob2.pid])
+NETNS_DAEMONIZE([bob1], [ncat --no-shutdown -l -k 8081], [bob2.pid])
 NS_CHECK_EXEC([alice1], [(echo "Packet 1"; sleep 1; echo "Packet 2") | ncat 
172.16.0.1 8081], [0])
 NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 172.16.0.1 | FORMAT_PING], \
 [0], [dnl
@@ -6874,7 +6874,7 @@ 
tcp,orig=(src=fd07::1,dst=fd01::2,sport=<cleared>,dport=<cleared>),reply=(src=fd
 
 AT_CHECK([ovs-appctl dpctl/flush-conntrack])
 
-NETNS_DAEMONIZE([bob1], [ncat -6 -l -k 8080], [bob1.pid])
+NETNS_DAEMONIZE([bob1], [ncat --no-shutdown -6 -l -k 8080], [bob1.pid])
 NS_CHECK_EXEC([alice1], [(echo "Packet 1"; sleep 1; echo "Packet 2") | ncat -6 
fd07::1 8080], [0])
 NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 fd07::1 | FORMAT_PING], \
 [0], [dnl
@@ -6892,7 +6892,7 @@ 
tcp,orig=(src=fd01::2,dst=fd07::1,sport=<cleared>,dport=<cleared>),reply=(src=fd
 check ovn-nbctl --policy="src-ip" lr-route-del R1 fd01::/126 fd02::3
 check ovn-nbctl --wait=hv sync
 AT_CHECK([ovs-appctl dpctl/flush-conntrack])
-NETNS_DAEMONIZE([bob1], [ncat -6 -l -k 8081], [bob2.pid])
+NETNS_DAEMONIZE([bob1], [ncat --no-shutdown -6 -l -k 8081], [bob2.pid])
 NS_CHECK_EXEC([alice1], [(echo "Packet 1"; sleep 1; echo "Packet 2") | ncat -6 
fd07::1 8081], [0])
 NS_CHECK_EXEC([alice1], [ping -q -c 3 -i 0.3 -w 2 fd07::1 | FORMAT_PING], \
 [0], [dnl
-- 
2.54.0

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

Reply via email to