On 1/31/23 10:42, Eelco Chaudron wrote: > > > On 26 Jan 2023, at 22:47, Ilya Maximets wrote: > >> On 1/24/23 14:01, Eelco Chaudron wrote: >>> With some datapaths, read TC, it takes a bit longer to update the >>> OpenFlow statistics. Rather than adding an additional delay, try >>> to read the counters multiple times until we get the desired value. >>> >>> Signed-off-by: Eelco Chaudron <echau...@redhat.com> >>> Acked-by: Roi Dayan <r...@nvidia.com> >>> --- >>> tests/system-offloads.at | 2 -- >>> tests/system-traffic.at | 15 ++++++--------- >>> 2 files changed, 6 insertions(+), 11 deletions(-) >>> >>> diff --git a/tests/system-offloads.at b/tests/system-offloads.at >>> index f4adac7b3..18e542aea 100644 >>> --- a/tests/system-offloads.at >>> +++ b/tests/system-offloads.at >>> @@ -60,8 +60,6 @@ m4_define([CHECK_CONNTRACK_TIMEOUT], >>> # issue. >>> m4_define([OVS_TEST_SKIP_LIST], >>> [ovs_test_skip_list=" >>> -datapath - truncate and output to gre tunnel by simulated packets >>> -datapath - truncate and output to gre tunnel >>> conntrack - multiple namespaces, internal ports >>> conntrack - ct metadata, multiple zones >>> conntrack - ICMP related >>> diff --git a/tests/system-traffic.at b/tests/system-traffic.at >>> index d162674c9..60cda6a4a 100644 >>> --- a/tests/system-traffic.at >>> +++ b/tests/system-traffic.at >>> @@ -1708,9 +1708,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >>> | sed -n 's/.*\(n\_bytes=[ >>> n_bytes=242 >>> ]) >>> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >>> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >>> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >>> -n_bytes=138 >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >>> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >>> >>> dnl check tunnel pop path, from at_ns0 to at_ns1 >>> dnl This 200-byte packet is simulated on behalf of ns_gre0 >>> @@ -1745,9 +1744,8 @@ AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=2" >>> | sed -n 's/.*\(n\_bytes=[ >>> n_bytes=242 >>> ]) >>> dnl After truncation = outer ETH(14) + outer IP(20) + GRE(4) + 100 = 138B >>> -AT_CHECK([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | sed -n >>> 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p'], [0], [dnl >>> -n_bytes=138 >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p' | grep "n_bytes=138"], >>> + [ovs-ofctl dump-flows br-underlay | grep "in_port=LOCAL" | >>> sed -n 's/.*\(n\_bytes=[[0-9]]*\).*/\1/p']) >>> >>> dnl check tunnel pop path, from at_ns0 to at_ns1 >>> dnl This 200-byte packet is simulated on behalf of ns_gre0 >>> @@ -1755,9 +1753,8 @@ ovs-ofctl -O OpenFlow13 packet-out br-underlay >>> "in_port=1 packet=02908ca8a149faa >>> >>> dnl After truncation = 100 byte at loopback device p2(4) >>> OVS_REVALIDATOR_PURGE() >>> -AT_CHECK([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip], [0], >>> [dnl >>> - n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop >>> -]) >>> +OVS_WAIT_UNTIL([ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip >>> | grep "n_packets=1, n_bytes=100, priority=1,ip,in_port=4 actions=drop"], >>> + [ovs-ofctl dump-flows br0 | grep "in_port=4" | ofctl_strip]) >> >> OVS_WAIT_UNTIL_EQUAL() might be better suited for this. >> It will print out the diff if the result it not equal. > > Move all three instances to OVS_WAIT_UNTIL_EQUAL() > > Any idea when > https://patchwork.ozlabs.org/project/openvswitch/patch/167361458369.1145547.15786262052264455216.stgit@ebuild/ > will be applied, as it makes this test fail sometimes?
I posted some comments for this one. It also needs a slight re-base. > > //Eelco > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev