[ovs-dev] [PATCH] autotest: Use modprobe for kernel module unloading

Ben Pfaff blp at nicira.com
Mon Jan 26 19:02:43 UTC 2015


On Mon, Jan 26, 2015 at 06:02:04PM +0100, Thomas Graf wrote:
> On 01/26/15 at 11:26am, Christoph Jaeger wrote:
> > 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 at linux.com>
> 
> Just wondering, does modprobe -r never fail at all? It's not clear to
> me from the manual page.

I think it fails if the module is loaded and cannot be unloaded.

> Maybe we should do rmmod openvswitch || true instead even better only
> invoke rmmod if the module is loaded and properly fail if rmmod
> fails *if* the module was in fact loaded.

I think that modprobe -r will do essentially that.



More information about the dev mailing list