Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread Darrell Ball
less code -> less bugs On Mon, May 2, 2016 at 5:45 PM, Joe Stringer wrote: > On 2 May 2016 at 16:57, Darrell Ball wrote: > > > > > > On Mon, May 2, 2016 at 11:12 AM, Joe Stringer wrote: > >> > >> On 2 May 2016 at 09:04, Darrell Ball wrote: > >> > On Mon, May 2, 2016 at 8:39 AM, William Tu >

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread Joe Stringer
On 2 May 2016 at 16:57, Darrell Ball wrote: > > > On Mon, May 2, 2016 at 11:12 AM, Joe Stringer wrote: >> >> On 2 May 2016 at 09:04, Darrell Ball wrote: >> > On Mon, May 2, 2016 at 8:39 AM, William Tu wrote: >> > >> >> Hi Darrel, >> >> >> >> # Delete namespaces from the running OS >> m4_

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread Darrell Ball
On Mon, May 2, 2016 at 11:12 AM, Joe Stringer wrote: > On 2 May 2016 at 09:04, Darrell Ball wrote: > > On Mon, May 2, 2016 at 8:39 AM, William Tu wrote: > > > >> Hi Darrel, > >> > >> # Delete namespaces from the running OS > m4_define([DEL_NAMESPACES], > [m4_foreach([ns], [$@],

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread Joe Stringer
On 2 May 2016 at 09:04, Darrell Ball wrote: > On Mon, May 2, 2016 at 8:39 AM, William Tu wrote: > >> Hi Darrel, >> >> # Delete namespaces from the running OS m4_define([DEL_NAMESPACES], [m4_foreach([ns], [$@], - [ip netns del ns -]) + [if

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread William Tu
Hi Darrell, > > Just to be clear, what the comment means is that if: > 1) DEL_NAMESPACE is called and there is no such ns, then this may be an > error with the surrounding code (i.e. a bug) or maybe the test itself. > > 2) Hence the above code in DEL_NAMESPACE would make the bug less > visible sin

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread Darrell Ball
On Mon, May 2, 2016 at 8:39 AM, William Tu wrote: > Hi Darrel, > > # Delete namespaces from the running OS >>> m4_define([DEL_NAMESPACES], >>> [m4_foreach([ns], [$@], >>> - [ip netns del ns >>> -]) >>> + [if ip netns list | grep ns > /dev/null; then >>> +

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-05-02 Thread William Tu
Hi Darrel, # Delete namespaces from the running OS >> m4_define([DEL_NAMESPACES], >> [m4_foreach([ns], [$@], >> - [ip netns del ns >> -]) >> + [if ip netns list | grep ns > /dev/null; then >> + ip netns del ns >> +fi >> +

Re: [ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-04-30 Thread Darrell Ball
On Fri, Apr 29, 2016 at 11:11 PM, William Tu wrote: > This avoids error message "Cannot remove namespace file > "/var/run/netns/at_ns0": No such file or directory", > when at_ns0 does not exist. > Signed-off-by: William Tu > --- > tests/system-common-macros.at | 6 -- > 1 file changed, 4

[ovs-dev] [PATCH] system-traffic: Check namespace exists befoe delete.

2016-04-29 Thread William Tu
This avoids error message "Cannot remove namespace file "/var/run/netns/at_ns0": No such file or directory", when at_ns0 does not exist. Signed-off-by: William Tu --- tests/system-common-macros.at | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/system-common-macro