On 6/14/23 22:37, Han Zhou wrote:
> On Wed, Jun 14, 2023 at 4:16 AM Dumitru Ceara <[email protected]> wrote:
>>
>> 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]>
>>
> Thanks Dumitru. That sounds really slow. It is faster on my computer

It was with address and undefined behavior sanitizers enabled and with
optimizations completely disabled (for both OVS and OVN).  With -O2 and
no sanitizers it takes 16s.

> (<10s), not too bad. If we really want it to be faster we can reduce the
> number of runs. I applied it to main for now (I did see several CI failures
> because of this test).
> 

Great, thanks!

> Regards,
> Han
> 
>> Regards,
>> Dumitru
>>
> 

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

Reply via email to