Switch NETNS_DAEMONIZE from appending to the cleanup file
directly to using on_exit, which prepends.  This ensures
that processes started inside a namespace are killed before
the namespace itself is deleted by DEL_NAMESPACES.

Signed-off-by: Xavier Simonart <[email protected]>
---
 tests/system-common-macros.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/system-common-macros.at b/tests/system-common-macros.at
index 8c0296528..16c59c3ce 100644
--- a/tests/system-common-macros.at
+++ b/tests/system-common-macros.at
@@ -130,7 +130,7 @@ m4_define([RETIS_CHECK_AND_RUN],
 #
 m4_define([NETNS_DAEMONIZE],
    [ip netns exec $1 $2 & echo $! > $3
-     echo "kill \`cat $3\`" >> cleanup
+     on_exit "kill \`cat $3\`"
    ]
 )
 
-- 
2.47.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to