diff mbox series

[ovs-dev,v2,5/5] unit-test: Add a delay for CD initialization.

Message ID 1509493177-28988-6-git-send-email-yipeng1.wang@intel.com
State Superseded
Delegated to: Ian Stokes
Headers show
Series dpif-netdev: Cuckoo-Distributor implementation | expand

Commit Message

Wang, Yipeng1 Oct. 31, 2017, 11:39 p.m. UTC
This patch adds a delay during test 1215 for considering CD
initialization time.

CC: Darrell Ball <dball at vmware.com>
CC: Jan Scheurich <jan.scheurich at ericsson.com>
Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
Signed-off-by: Antonio Fischetti <antonio.fischetti at intel.com>
Co-authored-by: Antonio Fischetti <antonio.fischetti at intel.com>
---
 tests/ofproto-dpif.at | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ben Pfaff Nov. 3, 2017, 5:57 p.m. UTC | #1
On Tue, Oct 31, 2017 at 04:39:37PM -0700, Yipeng Wang wrote:
> This patch adds a delay during test 1215 for considering CD
> initialization time.
> 
> CC: Darrell Ball <dball at vmware.com>
> CC: Jan Scheurich <jan.scheurich at ericsson.com>
> Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
> Signed-off-by: Antonio Fischetti <antonio.fischetti at intel.com>
> Co-authored-by: Antonio Fischetti <antonio.fischetti at intel.com>
> ---
>  tests/ofproto-dpif.at | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> index c75a1ac..8b55454 100644
> --- a/tests/ofproto-dpif.at
> +++ b/tests/ofproto-dpif.at
> @@ -9596,6 +9596,9 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
>  dnl Start a new connection from port 1.
>  AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
>  
> +# cuckoo distributor requires time for initilization, add sleep
> +sleep 2
> +

If it's not too hard, it would be better to add an ovs-appctl command to
wait until the cuckoo distributor is ready.

In commit messages, when practical, it's better to refer to tests by
their name instead of number, or in addition to number, because the
numbers shift from one commit to the next.
Wang, Yipeng1 Nov. 7, 2017, 4:58 p.m. UTC | #2
Thank you for the comments. We will incorporate your suggestion in V3.

> -----Original Message-----
> From: Ben Pfaff [mailto:blp@ovn.org]
> Sent: Friday, November 3, 2017 10:57 AM
> To: Wang, Yipeng1 <yipeng1.wang@intel.com>
> Cc: dev@openvswitch.org
> Subject: Re: [ovs-dev] [PATCH v2 5/5] unit-test: Add a delay for CD
> initialization.
> 
> On Tue, Oct 31, 2017 at 04:39:37PM -0700, Yipeng Wang wrote:
> > This patch adds a delay during test 1215 for considering CD
> > initialization time.
> >
> > CC: Darrell Ball <dball at vmware.com>
> > CC: Jan Scheurich <jan.scheurich at ericsson.com>
> > Signed-off-by: Yipeng Wang <yipeng1.wang at intel.com>
> > Signed-off-by: Antonio Fischetti <antonio.fischetti at intel.com>
> > Co-authored-by: Antonio Fischetti <antonio.fischetti at intel.com>
> > ---
> >  tests/ofproto-dpif.at | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
> > index c75a1ac..8b55454 100644
> > --- a/tests/ofproto-dpif.at
> > +++ b/tests/ofproto-dpif.at
> > @@ -9596,6 +9596,9 @@ AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
> >  dnl Start a new connection from port 1.
> >  AT_CHECK([ovs-appctl netdev-dummy/receive p1
> 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x080
> 0),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,d
> st=2)'])
> >
> > +# cuckoo distributor requires time for initilization, add sleep
> > +sleep 2
> > +
> 
> If it's not too hard, it would be better to add an ovs-appctl command to
> wait until the cuckoo distributor is ready.
> 
> In commit messages, when practical, it's better to refer to tests by
> their name instead of number, or in addition to number, because the
> numbers shift from one commit to the next.
diff mbox series

Patch

diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at
index c75a1ac..8b55454 100644
--- a/tests/ofproto-dpif.at
+++ b/tests/ofproto-dpif.at
@@ -9596,6 +9596,9 @@  AT_CHECK([ovs-ofctl add-flows br0 flows.txt])
 dnl Start a new connection from port 1.
 AT_CHECK([ovs-appctl netdev-dummy/receive p1 'in_port(1),eth(src=50:54:00:00:00:09,dst=50:54:00:00:00:0a),eth_type(0x0800),ipv4(src=10.1.1.1,dst=10.1.1.2,proto=17,tos=0,ttl=64,frag=no),udp(src=1,dst=2)'])
 
+# cuckoo distributor requires time for initilization, add sleep
+sleep 2
+
 AT_CHECK([cat ovs-vswitchd.log | strip_ufid | filter_flow_install], [0], [dnl
 recirc_id(0),in_port(1),packet_type(ns=0,id=0),eth_type(0x0800),ipv4(proto=17,frag=no), actions:ct(commit)
 ])