On 6/10/23 20:10, Han Zhou wrote:
> The test case is unstable because there are many factors that can impact
> the number of recomputes. For example, when northd updates both NB and
> SB, both sides have in-flight transactions, and if the SB notification
> comes back before the NB transaction (for updating nb_cfg) completes,
> ovn-northd falls back to recompute because idl_txn for NB is not
> available, while if the NB notification comes back first it won't
> trigger recompute because the nb_cfg columns are omitted for alert.
> 
> To avoid the instability of the test case, this patch modifies it to
> verify the best case (also the most common scenario), by running the
> test multiple (10) times and making sure at least 70% of the time all
> the recompute counters match expectation.
> 
> (The recompute triggered by in-flight transactions will be improved
> later and the success rate in the test can be adjusted accordingly.)
> 
> Reported-by: Dumitru Ceara <[email protected]>
> Signed-off-by: Han Zhou <[email protected]>
> ---
> v1 -> v2: wait ports up and sync after each port binding, to avoid race.
> v2 -> v3: refactor and test case and use a probability based test strategy
> to ensure the test stability (see commit message).

Neat, thanks for fixing this!  The only thing with this approach is that
the test case takes quite long to execute 30s on my system.  Luckily we
don't have too many tests like this so:

Acked-by: Dumitru Ceara <[email protected]>

Regards,
Dumitru

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

Reply via email to