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 <u9012...@gmail.com> --- tests/system-common-macros.at | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at index 2116f1e..ae09e83 100644 --- a/tests/system-common-macros.at +++ b/tests/system-common-macros.at @@ -3,8 +3,10 @@ # 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 + ]) ] ) -- 2.5.0 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev