The test fails quite often for ddlog because of tunnel keys mismatch when
checking OpenFlow dumps. It is possible to allocate different keys in
different runs because multiple NB changes can be handled by northd in a
single iteration - it fails more often in ddlog probably because there
is some more latency for northd-ddlog to start processing the changes,
but it doesn't affect correctness. So this patch fixes it by ignoring
the tunnel keys when comparing the flows.

Signed-off-by: Han Zhou <[email protected]>
---
 tests/ovn.at | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index 847c31de6..b440f5517 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -25453,7 +25453,8 @@ check ovn-nbctl --wait=hv sync
 # Check OVS flows are installed properly.
 AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | ofctl_strip_all | \
     grep "priority=2002" | grep conjunction | \
-    sed 's/conjunction([[^)]]*)/conjunction()/g' | sort], [0], [dnl
+    sed 's/conjunction([[^)]]*)/conjunction()/g' | \
+    sed 's/reg15=0x[[1-9]]/reg15=0xN/g' | sort], [0], [dnl
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000
 actions=conjunction()
@@ -25470,8 +25471,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | 
ofctl_strip_all | \
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x100/0x100,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 
actions=conjunction()
- table=44, 
priority=2002,udp,reg0=0x100/0x100,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
- table=44, 
priority=2002,udp,reg0=0x100/0x100,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
+ table=44, 
priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
+ table=44, 
priority=2002,udp,reg0=0x100/0x100,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x10/0xfff0
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x100/0xff00
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x1000/0xf000
 actions=conjunction()
@@ -25488,8 +25489,8 @@ AT_CHECK([as hv1 ovs-ofctl dump-flows br-int table=44 | 
ofctl_strip_all | \
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x800/0xf800
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=0x8000/0x8000
 actions=conjunction()
  table=44, 
priority=2002,udp,reg0=0x80/0x80,metadata=0x1,nw_src=192.168.47.4,tp_dst=1 
actions=conjunction()
- table=44, 
priority=2002,udp,reg0=0x80/0x80,reg15=0x3,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
- table=44, 
priority=2002,udp,reg0=0x80/0x80,reg15=0x4,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
+ table=44, 
priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
+ table=44, 
priority=2002,udp,reg0=0x80/0x80,reg15=0xN,metadata=0x1,nw_src=192.168.47.4 
actions=conjunction()
 ])
 
 OVN_CLEANUP([hv1])
-- 
2.30.2

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

Reply via email to