On 4/17/20 11:25 PM, Flavio Fernandes wrote: > The test case "78: ovn -- 1 LR with distributed router gateway port" > fails sometimes. This patch fixes this by leveraging the command > ovn-nbctl sync
Hi Flavio, Maybe we should change the commit title to something more specific because test numbers change when tests are added/deleted? A few minor comments below. Regards, Dumitru > > The failed test would look like this: > <snip> > grep "Port patch-br-int-to-ln-alice" | wc -l`... > ovn.at:9356: wait succeeded immediately > > checking packets in hv3/vif1-tx.pcap against hv3-vif1.expected: > ovn.at:12: waiting until $PYTHON "$ovs_srcdir/utilities/ovs-pcap.in" > $rcv_pcap > $rcv_text > rcv_n=`wc -l < "$rcv_text"` > echo "rcv_n=$rcv_n exp_n=$exp_n" > test $rcv_n -ge $exp_n... > rcv_n=0 exp_n=2 > <snip> > rcv_n=2 exp_n=2 > ovn.at:12: wait succeeded after 5 seconds > ./ovn.at:9367: sort $rcv_text > expout 2020-04-17 20:17:08.255531551 +0000 > /home/vagrant/ovn/tests/testsuite.dir/at-groups/78/stdout 2020-04-17 > 20:17:08.258531517 +0000 > -1,2 +1,2 > > -f0000001020400000201020308060001080006040002000002010203ac100101f00000010204ac100103 > > +ffffffffffff00000201020308060001080006040001000002010203ac100101000000000000ac100101 > > ffffffffffff00000201020308060001080006040001000002010203ac100101000000000000ac100101 > 78. ovn.at:9139: 78. ovn -- 1 LR with distributed router gateway port > (ovn.at:9139): FAILED (ovn.at:9367) > > Signed-off-by: Flavio Fernandes <[email protected]> > --- > tests/ovn.at | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/tests/ovn.at b/tests/ovn.at > index f83d3f536..e73772300 100644 > --- a/tests/ovn.at > +++ b/tests/ovn.at > @@ -9239,9 +9239,9 @@ as hv1 ovs-vsctl set open . > external-ids:ovn-bridge-mappings=phys:br-phys > as hv3 ovs-vsctl set open . external-ids:ovn-bridge-mappings=phys:br-phys > > > -# Allow some time for ovn-northd and ovn-controller to catch up. > -# XXX This should be more systematic. > -sleep 2 > +dnl Allow some time for ovn-northd and ovn-controller to catch up. > +ovn-nbctl --wait=sb --timeout=3 sync > +ovn-nbctl --wait=hv --timeout=3 sync "--wait=hv" should be enough because it implies "--wait=sb". Also, we can skip the "--timeout=3" because OVS_CTL_TIMEOUT is set when running tests and its value will be used as default. > > echo "---------NB dump-----" > ovn-nbctl show > @@ -9356,6 +9356,10 @@ as hv2 ovs-vsctl set open . > external-ids:ovn-bridge-mappings=phys:br-phys > OVS_WAIT_UNTIL([test 1 = `as hv2 ovs-vsctl show | \ > grep "Port patch-br-int-to-ln-alice" | wc -l`]) > > +dnl Allow some time for ovn-controller to catch up. > +ovn-nbctl --wait=hv --timeout=3 sync > +ovn-nbctl --wait=sb --timeout=3 sync > + Same here. > # ARP for router IP address from outside1 > test_arp 3 1 f00000010204 $outside_ip $rtr_ip 000002010203 > > _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
