[ovs-dev] [PATCH v2] tests/ofproto.at: Workaround some races

Ben Pfaff blp at ovn.org
Fri May 5 15:42:23 UTC 2017


On Fri, May 05, 2017 at 12:39:12PM +0200, Timothy Redaelli wrote:
> Port a variant of commit a6d1a2997db4:
>     ofproto.at: Workaround a race
> 
>     While a barrier serializes requests from the same connection,
>     it doesn't wait for requests from other connections to the switch.
>     Replace the barrier with infamous "sleep 1" to workaround the problem.
> 
> to the following tests:
>     "ofproto - asynchronous message control (OpenFlow 1.0)",
>     "ofproto - asynchronous message control (OpenFlow 1.3)",
>     "ofproto - asynchronous message control (OpenFlow 1.4)" and
>     "ofproto - asynchronous message control (OpenFlow 1.5)"
> 
> Do not use "sleep 1", but wait for log file to have (at least) the same
> number of lines we expect (it generally waits less time).
> 
> Sometimes one of these tests fails because the OFPT_BARRIER_REPLY is
> printed before the other message we expect to have.
> 
> Suggested-by: Lance Richardson <lrichard at redhat.com>
> Signed-off-by: Timothy Redaelli <tredaelli at redhat.com>
> ---
> v2:
> * wait for log file to have (at least) the same number of lines we expect
>   as per review comment

Thanks!  Reliable tests are important to everyone.  I applied this to
master.


More information about the dev mailing list