[pve-devel] [PATCH storage 08/11] zfstest: skip tests if ZFS is not available

Fabian Grünbichler f.gruenbichler at proxmox.com
Wed May 17 11:42:35 CEST 2017


Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 test/run_test_zfspoolplugin.pl | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/run_test_zfspoolplugin.pl b/test/run_test_zfspoolplugin.pl
index f07eacc..b70aad8 100755
--- a/test/run_test_zfspoolplugin.pl
+++ b/test/run_test_zfspoolplugin.pl
@@ -2658,6 +2658,11 @@ sub volume_is_base {
     return $isBase;
 }
 
+eval { run_command("zpool status"); };
+if ($@) {
+    warn "zpool status failed, not running tests: $@\n";
+    exit 0;
+}
 
 setup_zpool();
 
-- 
2.1.4





More information about the pve-devel mailing list