[ovs-dev] [PATCH] testsuite: release resources when vswitch exits.

Flavio Leitner fbl at redhat.com
Wed Jun 7 20:58:10 UTC 2017


This change the testsuite macro to release the resources
configured by ovs-vswitchd when exiting as it used to be.

Fixes: 0f28164be02ac ("netdev-linux: make tap devices persistent")
Fixes: fe13ccdca6a22 ("vswitchd: Add --cleanup option to the 'appctl
                       exit' command")

Reported-by: Eric Garver <e at erig.me>
Signed-off-by: Flavio Leitner <fbl at redhat.com>
---
 tests/ovs-macros.at | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index 37e72d9..047d0dd 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -162,7 +162,9 @@ dnl to exit.
 m4_define([OVS_APP_EXIT_AND_WAIT],
   [AT_CHECK([test -e $OVS_RUNDIR/$1.pid])
    TMPPID=$(cat $OVS_RUNDIR/$1.pid)
-   AT_CHECK([ovs-appctl -t $1 exit])
+   AT_CHECK(m4_if([$1],[ovs-vswitchd],
+                  [ovs-appctl -t $1 exit --cleanup],
+                  [ovs-appctl -t $1 exit]))
    OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
 
 dnl OVS_APP_EXIT_AND_WAIT_BY_TARGET(TARGET, PIDFILE)
-- 
2.9.4



More information about the dev mailing list