diff mbox series

[ovs-dev,03/12] tests: Fixed system-test "load balancing affinity sessions"

Message ID 20221202135137.1728564-4-xsimonar@redhat.com
State Accepted
Headers show
Series Fixes to multiple Unit and System Tests | expand

Checks

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

Commit Message

Xavier Simonart Dec. 2, 2022, 1:51 p.m. UTC
This tests (and potentially others) might fail on some systems
as detecting unexpected flows in conntrack, related to host.
This was due to the fact FORMAT_CT grep for the expected ip address
but understands the "." in the ip address as "any character".
So, for instance FORMAT_CT("192.168.1.2") is true for 192.168.122.1.

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 tests/system-common-macros.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index 8e6cb415c..d65f359a6 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -263,7 +263,7 @@  m4_define([STRIP_MONITOR_CSUM], [grep "csum:" | sed 's/csum:.*/csum: <skip>/'])
 # and limit the output to the rows containing 'ip-addr'.
 #
 m4_define([FORMAT_CT],
-    [[grep "dst=$1" | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' -e 's/state=[0-9_A-Z]*/state=<cleared>/g' | sort | uniq]])
+    [[grep -F "dst=$1" | sed -e 's/port=[0-9]*/port=<cleared>/g' -e 's/id=[0-9]*/id=<cleared>/g' -e 's/state=[0-9_A-Z]*/state=<cleared>/g' | sort | uniq]])
 
 # NETNS_DAEMONIZE([namespace], [command], [pidfile])
 #