[ovs-dev] [PATCH ovn] ovn.at: Fix flaky test "router - check packet length - icmp defrag"

Numan Siddique numans at ovn.org
Tue Nov 2 20:55:10 UTC 2021


On Tue, Oct 19, 2021 at 11:58 AM Xavier Simonart <xsimonar at redhat.com> wrote:
>
> This test was failing randomly, probably on slow systems.
> It was waiting for gratuitous ARP which were potentially generated earlier.
>
> Fixes: 1c9e46ab ("northd: add check_pkt_larger lflows for ingress traffic")
> Signed-off-by: Xavier Simonart <xsimonar at redhat.com>

Thanks.  Applied.

Numan

> ---
>  tests/ovn.at | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 05eac4e5f..9483e4f75 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -16895,7 +16895,6 @@ test_ip_packet_larger() {
>          expected=${expected}000000000000000000000000000000000000
>          expected=${expected}000000000000000000000000000000000000
>          echo $expected > br_phys_n1.expected
> -        echo $gw_ip_garp >> br_phys_n1.expected
>      else
>          src_ip=`ip_to_hex 10 0 0 1`
>          dst_ip=`ip_to_hex 10 0 0 3`
> @@ -16916,7 +16915,9 @@ test_ip_packet_larger() {
>      check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet
>
>      if test $mtu -ge $mtu_needed; then
> -        OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br_phys_n1.expected])
> +        # Ignore gratuitous ARPs; there is no guarantee to get them here as they might
> +        # already have been generated
> +        OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br_phys_n1.expected])
>          $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" hv1/vif1-tx.pcap  > pkts
>          # hv1/vif1-tx.pcap can receive the GARP packet generated by ovn-controller
>          # for the gateway router port. So ignore this packet.
> @@ -16953,7 +16954,9 @@ test_ip_packet_larger_ext() {
>      orig_packet_l3=${orig_packet_l3}000000000000000000000000000000000000
>      packet=${packet}${orig_packet_l3}
>
> -    gw_ip_garp=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064
> +    # A Gratuitous ARP (as shown next line) might be transmitted, but
> +    # it is also possible that it was transmitted earlier, so do not wait for it.
> +    # optional_gw_ip_garp=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064
>      ext_ip_garp=ffffffffffff00000012af110806000108000604000100000012af11aca80004000000000000aca80004
>
>      src_ip=`ip_to_hex 172 168 0 100`
> @@ -16967,8 +16970,6 @@ test_ip_packet_larger_ext() {
>      icmp_reply=${icmp_reply}${orig_packet_l3}
>      echo $icmp_reply > br-phys_n1.expected
>
> -    echo $gw_ip_garp >> br-phys_n1.expected
> -
>      as hv1 reset_pcap_file br-phys_n1 hv1/br-phys_n1
>      as hv1 reset_pcap_file hv1-vif1 hv1/vif1
>
> @@ -16977,7 +16978,7 @@ test_ip_packet_larger_ext() {
>      # Send packet from sw0-port1 to outside
>      check as hv1 ovs-appctl netdev-dummy/receive br-phys_n1 $packet
>
> -    OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected])
> +    OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected])
>  }
>
>  # IPv6 outgoing traffic generated inside the cluster
> @@ -17053,9 +17054,7 @@ test_ip6_packet_larger_ext() {
>      local ip6_hdr=6000000000583afe${ipv6_src}${ipv6_dst}
>      local packet=${eth_dst}${eth_src}86dd${ip6_hdr}9000cc7662f00001${payload}
>
> -    local ns=ffffffffffff00002020121308060001080006040001000020201213aca80064000000000000aca80064
> -    echo $ns > br-phys_n1.expected
> -
> +    # Some ** ARP ** packets might still be received - ignore them
>      as hv1 reset_pcap_file br-phys_n1 hv1/br-phys_n1
>      as hv1 reset_pcap_file hv1-vif1 hv1/vif1
>
> @@ -17078,9 +17077,9 @@ test_ip6_packet_larger_ext() {
>      outer_packet=${outer_ip6}${outer_icmp6_and_payload}
>
>      icmp6_reply=${eth_src}${eth_dst}86dd${outer_packet}
> -    echo $icmp6_reply >> br-phys_n1.expected
> +    echo $icmp6_reply > br-phys_n1.expected
>
> -    OVN_CHECK_PACKETS([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected])
> +    OVN_CHECK_PACKETS_CONTAIN([hv1/br-phys_n1-tx.pcap], [br-phys_n1.expected])
>  }
>
>  wait_for_ports_up
> @@ -17200,7 +17199,7 @@ OVS_WAIT_FOR_OUTPUT([
>      grep "check_pkt_larger(118)" ext-br-int-gw-flows-100 | wc -l], [0], [3
>  ])
>
> -AS_BOX([testing ingress traffic mtu 100 for gw router - IPv6])
> +AS_BOX([testing ingress traffic mtu 100 for gw router - IPv4])
>  test_ip_packet_larger_ext 100
>
>  AS_BOX([testing ingress traffic mtu 100 for gw router - IPv6])
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>


More information about the dev mailing list