]> www.infradead.org Git - users/hch/blktests.git/commitdiff
nvme: Ignore errors when removing modules
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 17 Jul 2019 17:12:59 +0000 (11:12 -0600)
committerOmar Sandoval <osandov@osandov.com>
Mon, 29 Jul 2019 17:13:14 +0000 (10:13 -0700)
It is no longer important for correct test functionality to
remove the modules between tests. Therefore, we ignore errors
if the modules are not removed (ie. if they are builtin).

With this patch, it is now safe to run the tests with the nvmet
modules built-in. This will be more convienent for developers
that want to run the tests in a simple VM.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
tests/nvme/rc

index a6b4d593868027436a85e4adae9cb74562cf37da..348b4a3c2cbc4b9cb49e5a550fa8f6220ab2f848 100644 (file)
@@ -68,8 +68,8 @@ _cleanup_nvmet() {
        shopt -u nullglob
        stty isig
 
-       modprobe -r nvme-loop
-       modprobe -r nvmet
+       modprobe -r nvme-loop 2>/dev/null
+       modprobe -r nvmet 2>/dev/null
 }
 
 _setup_nvmet() {