[ovs-dev] [test-kmod improvements 6/6] test: remove openvswitch kernel module on test failure

Andy Zhou azhou at nicira.com
Fri Feb 6 00:06:43 UTC 2015


Improve test failure handling.

Signed-off-by: Andy Zhou <azhou at nicira.com>
---
 tests/kmod-macros.at | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/kmod-macros.at b/tests/kmod-macros.at
index f3494fc..9ba2aa5 100644
--- a/tests/kmod-macros.at
+++ b/tests/kmod-macros.at
@@ -9,6 +9,7 @@
 #
 m4_define([OVS_KMOD_VSWITCHD_START],
   [ AT_CHECK([modprobe openvswitch])
+    ON_EXIT([modprobe -r openvswitch])
    _OVS_VSWITCHD_START([])
    dnl Add bridges, ports, etc.
    AT_CHECK([ovs-vsctl -- add-br br0 -- set bridge br0 protocols=[[OpenFlow10,OpenFlow11,OpenFlow12,OpenFlow13,OpenFlow14,OpenFlow15]] fail-mode=secure -- $1 m4_if([$2], [], [], [| ${PERL} $srcdir/uuidfilt.pl])], [0], [$2])
-- 
1.9.1




More information about the dev mailing list