autotest: Use modprobe for kernel module unloading
authorChristoph Jaeger <cj@linux.com>
Mon, 26 Jan 2015 16:26:12 +0000 (11:26 -0500)
committerAndy Zhou <azhou@nicira.com>
Thu, 29 Jan 2015 21:39:08 +0000 (13:39 -0800)
rmmod fails if the module is not loaded; thus, Vagrant aborts provisioning
when started from a clean slate. Use modprobe, which does not fail, instead.
Unloading unused modules the to-be-unloaded module depends on may also be
desirable.

Signed-off-by: Christoph Jaeger <cj@linux.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
tests/automake.mk

index 1fe0799..2dfaff1 100644 (file)
@@ -188,7 +188,7 @@ check-kernel: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE)
 # Testing the out of tree Kernel module
 check-kmod: all tests/atconfig tests/atlocal $(KMOD_TESTSUITE)
        $(MAKE) modules_install
-       rmmod openvswitch
+       modprobe -r openvswitch
        $(MAKE) check-kernel
 
 clean-local: