test: add name space removal on test failure
authorAndy Zhou <azhou@nicira.com>
Thu, 5 Feb 2015 23:31:09 +0000 (15:31 -0800)
committerAndy Zhou <azhou@nicira.com>
Fri, 6 Feb 2015 23:28:26 +0000 (15:28 -0800)
Improves test failure handling. Remove name spaces that are no longer
needed so they to linger around before the next test starts.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Joe Stringer <joestringer@nicira.com>
tests/kmod-traffic.at

index 34e5062..ddb2cb2 100644 (file)
@@ -5,6 +5,7 @@ OVS_KMOD_VSWITCHD_START(
    [set-fail-mode br0 standalone -- ])
 
 ADD_NAMESPACES(at_ns0, at_ns1)
+ON_EXIT(DEL_NAMESPACES(at_ns0, at_ns1))
 
 ADD_VETH(p0, at_ns0, br0, "10.1.1.1/24")
 ADD_VETH(p1, at_ns1, br0, "10.1.1.2/24")