Since in ADD_NAMESPACE we've queued up namespace deletion using on_exit,
whether the test passes or fails, the namespace will be cleaned up.  So
remove the DEL_NAMESPACE before adding the namespace.

Signed-off-by: William Tu <u9012...@gmail.com>
---
 tests/system-common-macros.at | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index 2116f1e..f0e65d6 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -14,8 +14,7 @@ m4_define([DEL_NAMESPACES],
 # will be remove before new ones are installed.
 m4_define([ADD_NAMESPACES],
    [m4_foreach([ns], [$@],
-               [DEL_NAMESPACES(ns)
-                AT_CHECK([ip netns add ns || return 77])
+               [AT_CHECK([ip netns add ns || return 77])
                 on_exit 'DEL_NAMESPACES(ns)'
                ])
    ]
-- 
2.5.0

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to