[ovs-dev] [PATCH ovn] ovn-sbctl.at: Fix timing problem of count-flows test.

Ben Pfaff blp at ovn.org
Thu Jul 15 23:57:44 UTC 2021


On Thu, Jul 15, 2021 at 04:34:51PM -0700, Han Zhou wrote:
> Fixes: 895e02ec0be6("ovn-sbctl.c Add logical flows count numbers")
> Signed-off-by: Han Zhou <hzhou at ovn.org>
> ---
>  tests/ovn-sbctl.at | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/ovn-sbctl.at b/tests/ovn-sbctl.at
> index 16f5dabcc..dabf62d2b 100644
> --- a/tests/ovn-sbctl.at
> +++ b/tests/ovn-sbctl.at
> @@ -200,7 +200,7 @@ Total number of logical flows = 0
>  ])
>  
>  # create some logical flows
> -check ovn-nbctl ls-add count-test
> +check ovn-nbctl --wait=sb ls-add count-test
>  
>  OVS_WAIT_UNTIL([total_lflows=`count_entries`; test $total_lflows -ne 0])

I'm surprised that the above change is needed, since OVS_WAIT_UNTIL
should wait until the condition is true.

> @@ -219,7 +219,7 @@ $ingress_lflows
>  ])
>  
>  # add another datapath
> -check ovn-nbctl ls-add count-test2
> +check ovn-nbctl --wait=sb ls-add count-test2
>  
>  # check total logical flows in 2 datapathes
>  AT_CHECK_UNQUOTED([ovn-sbctl count-flows | grep "flows =" | awk 'NF>1{print $NF}'], [0], [dnl

The one above makes sense to me.




More information about the dev mailing list