diff mbox series

[ovs-dev,2/4] tests: fixed flaky "4 HV, 3 LS, 2 LR, packet test with HA distributed router gateway port"

Message ID 20230713110819.2408240-3-xsimonar@redhat.com
State Accepted
Headers show
Series Fixed 4 Unit 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 July 13, 2023, 11:08 a.m. UTC
Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 tests/ovn.at | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

Comments

Ales Musil July 14, 2023, 6:18 a.m. UTC | #1
On Thu, Jul 13, 2023 at 1:09 PM Xavier Simonart <xsimonar@redhat.com> wrote:

> Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
> ---
>  tests/ovn.at | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 4ae33567f..2ce8478f8 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -11726,10 +11726,9 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc
> -l` -eq 1
>      check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet
>
>      OVN_CHECK_PACKETS_UNIQ([ext1/vif1-tx.pcap], [ext1-vif1.expected])
> -    $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in"
> $active_gw/br-phys_n1-tx.pcap  > packets
> -    cat packets | grep $expected > exp
> -    cat packets | grep $exp_gw_ip_garp | head -1 >> exp
> -    AT_CHECK([cat exp], [0], [expout])
> +    # We might have to wait for the garp, as it might have been deleted
> from the pcap last time we reset it.
> +    # We might have BFD packets on br-phys_n1-tx; ignore them.
> +    OVN_CHECK_PACKETS_CONTAIN([$active_gw/br-phys_n1-tx.pcap],
> [ext1-vif1.expected])
>
>      $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in"
> $backup_gw/br-phys_n1-tx.pcap  > packets
>      AT_CHECK([grep $expected packets | sort], [0], [])
> --
> 2.31.1
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>
>
Looks good to me, thanks.

Acked-by: Ales Musil <amusil@redhat.com>
Dumitru Ceara July 25, 2023, 3:22 p.m. UTC | #2
On 7/14/23 08:18, Ales Musil wrote:
> On Thu, Jul 13, 2023 at 1:09 PM Xavier Simonart <xsimonar@redhat.com> wrote:
> 
>> Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
>> ---
>>  tests/ovn.at | 7 +++----
>>  1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/tests/ovn.at b/tests/ovn.at
>> index 4ae33567f..2ce8478f8 100644
>> --- a/tests/ovn.at
>> +++ b/tests/ovn.at
>> @@ -11726,10 +11726,9 @@ grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc
>> -l` -eq 1
>>      check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet
>>
>>      OVN_CHECK_PACKETS_UNIQ([ext1/vif1-tx.pcap], [ext1-vif1.expected])
>> -    $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in"
>> $active_gw/br-phys_n1-tx.pcap  > packets
>> -    cat packets | grep $expected > exp
>> -    cat packets | grep $exp_gw_ip_garp | head -1 >> exp
>> -    AT_CHECK([cat exp], [0], [expout])
>> +    # We might have to wait for the garp, as it might have been deleted
>> from the pcap last time we reset it.
>> +    # We might have BFD packets on br-phys_n1-tx; ignore them.
>> +    OVN_CHECK_PACKETS_CONTAIN([$active_gw/br-phys_n1-tx.pcap],
>> [ext1-vif1.expected])
>>
>>      $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in"
>> $backup_gw/br-phys_n1-tx.pcap  > packets
>>      AT_CHECK([grep $expected packets | sort], [0], [])
>> --
>> 2.31.1
>>
>> _______________________________________________
>> dev mailing list
>> dev@openvswitch.org
>> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
>>
>>
> Looks good to me, thanks.
> 
> Acked-by: Ales Musil <amusil@redhat.com>
> 

Thanks, Xavier and Ales!  Applied to main and backported to all branches
down to 22.06.

Regards,
Dumitru
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 4ae33567f..2ce8478f8 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -11726,10 +11726,9 @@  grep actions=mod_dl_dst:f0:00:00:01:02:04 | wc -l` -eq 1
     check as hv1 ovs-appctl netdev-dummy/receive hv1-vif1 $packet
 
     OVN_CHECK_PACKETS_UNIQ([ext1/vif1-tx.pcap], [ext1-vif1.expected])
-    $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $active_gw/br-phys_n1-tx.pcap  > packets
-    cat packets | grep $expected > exp
-    cat packets | grep $exp_gw_ip_garp | head -1 >> exp
-    AT_CHECK([cat exp], [0], [expout])
+    # We might have to wait for the garp, as it might have been deleted from the pcap last time we reset it.
+    # We might have BFD packets on br-phys_n1-tx; ignore them.
+    OVN_CHECK_PACKETS_CONTAIN([$active_gw/br-phys_n1-tx.pcap], [ext1-vif1.expected])
 
     $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" $backup_gw/br-phys_n1-tx.pcap  > packets
     AT_CHECK([grep $expected packets | sort], [0], [])