diff mbox series

[ovs-dev,v4,07/12] test: Fix "conntrack - floating IP" test for TC.

Message ID 166920034972.2225806.1320839959683880270.stgit@ebuild
State Superseded, archived
Headers show
Series tests: Add system-traffic.at tests to check-offloads. | expand

Commit Message

Eelco Chaudron Nov. 23, 2022, 10:45 a.m. UTC
This change fixes the "conntrack - floating" test for the TC
offload case. In this scenario, the connection might move to
CLOSE_WAIT, which would fail the test as it only accepts
TIME_WAIT. However, both indicate the connection was
established, so the test should pass.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Roi Dayan <roid@nvidia.com>
---
 tests/system-offloads.at |    1 -
 tests/system-traffic.at  |   13 +++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/tests/system-offloads.at b/tests/system-offloads.at
index 1aca41825..593dc1c7a 100644
--- a/tests/system-offloads.at
+++ b/tests/system-offloads.at
@@ -85,7 +85,6 @@  conntrack - IPv6 FTP with SNAT - orig tuple
 conntrack - IPv4 TFTP with SNAT
 conntrack - DNAT load balancing
 conntrack - DNAT load balancing with NC
-conntrack - floating IP
 conntrack - Multiple ICMP traverse
 conntrack - can match and clear ct_state from outside OVS
 IGMP - flood under normal action"
diff --git a/tests/system-traffic.at b/tests/system-traffic.at
index 48545f57d..2f6d8f13f 100644
--- a/tests/system-traffic.at
+++ b/tests/system-traffic.at
@@ -6808,16 +6808,17 @@  AT_CHECK([ovs-ofctl --bundle add-flows br0 flows.txt])
 
 dnl non-FIP case
 NS_CHECK_EXEC([at_ns1], [echo "foobar" |nc $NC_EOF_OPT 10.1.1.1 1234])
-OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' |
+OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' -e 's/CLOSE_WAIT\|CLOSING/TIME_WAIT/g' |
 grep "tcp,orig=(src=10.1.1.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.1.1.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=TIME_WAIT)"
 ]])
 
-dnl Check that the full session ends as expected (i.e. TIME_WAIT). Otherwise it
-dnl means the datapath didn't process the ct_clear action. Ending in SYN_RECV
-dnl (OVS maps to ESTABLISHED) means the initial frame was committed, but not a
-dnl second time after the FIP translation (because ct_clear didn't occur).
+dnl Check that the full session ends as expected (i.e. TIME_WAIT, CLOSE_WAIT).
+dnl Otherwise it means the datapath didn't process the ct_clear action. Ending
+dnl in SYN_RECV (OVS maps to ESTABLISHED) means the initial frame was
+dnl committed, but not a second time after the FIP translation (because
+dnl ct_clear didn't occur).
 NS_CHECK_EXEC([at_ns1], [echo "foobar" |nc $NC_EOF_OPT 10.254.254.1 1234])
-OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' |
+OVS_WAIT_UNTIL([[ovs-appctl dpctl/dump-conntrack | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g'  -e 's/CLOSE_WAIT\|CLOSING/TIME_WAIT/g' |
 grep "tcp,orig=(src=10.254.254.2,dst=10.1.1.1,sport=<cleared>,dport=<cleared>),reply=(src=10.1.1.1,dst=10.254.254.2,sport=<cleared>,dport=<cleared>),protoinfo=(state=TIME_WAIT)"
 ]])