diff mbox series

[ovs-dev,branch-23.06,2/2] tests: Address netcat 7.94 changes.

Message ID 20240320105956.566508-2-amusil@redhat.com
State Accepted
Headers show
Series [ovs-dev,branch-23.06,1/2] tests: Add helper for tcpdump. | expand

Checks

Context Check Description
ovsrobot/apply-robot warning apply and check: warning
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Ales Musil March 20, 2024, 10:59 a.m. UTC
Fedora received an update of netcat to version 7.94, this version
brings ability for UDP to accept multiple connections without closing
(-k/--keep-open) [0]. That had negative impact on the tests as the UDP
netcat server was closing sooner that expected.

Make sure that the server is alive when we expect it to and avoid
checking kill of server that might be already finished.

[0] https://github.com/nmap/nmap/issues/1223
Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit 0a35824093ddcd774544ec696dc8fe8c279fb603)
---
 tests/system-ovn-kmod.at | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/tests/system-ovn-kmod.at b/tests/system-ovn-kmod.at
index 66028992d..65016b84f 100644
--- a/tests/system-ovn-kmod.at
+++ b/tests/system-ovn-kmod.at
@@ -1023,8 +1023,7 @@  wait_for_ports_up
 check ovn-nbctl --wait=hv sync
 
 # Create service that listens for TCP and UDP
-NETNS_DAEMONIZE([vm2], [nc -l -u 1234], [nc0.pid])
-NETNS_DAEMONIZE([vm2], [nc -l -k 1235], [nc1.pid])
+NETNS_DAEMONIZE([vm2], [nc -l -k 1235], [nc0.pid])
 
 test_icmp() {
     # Make sure that a ping works as expected
@@ -1048,7 +1047,9 @@  icmp,orig=(src=173.0.1.2,dst=172.16.0.102,id=<cleared>,type=8,code=0),reply=(src
 }
 
 test_udp() {
+    NETNS_DAEMONIZE([vm2], [nc -l -u 1234], [nc1.pid])
     NS_CHECK_EXEC([vm1], [nc -u 30.0.0.1 1234 -p 1222 -z])
+    kill $(cat nc1.pid)
 
     AT_CHECK([ovs-appctl dpctl/dump-conntrack | FORMAT_CT(30.0.0.1) | \
     sed -e 's/zone=[[0-9]]*/zone=<cleared>/'], [0], [dnl