From b9d168b0e6c06fa739bfc6ce4eb412b933dfa81f Mon Sep 17 00:00:00 2001 From: illiliti Date: Sat, 31 Jul 2021 21:06:35 +0300 Subject: [PATCH] test/*: skip test if essential module not loaded --- test/luks.test | 2 +- test/lvm.test | 2 +- test/zfs.test | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/luks.test b/test/luks.test index 37b1db7..9be10df 100755 --- a/test/luks.test +++ b/test/luks.test @@ -10,7 +10,7 @@ cleanup() rm -rf "$tmpdir" } -command -v cryptsetup > /dev/null || exit 222 +command -v cryptsetup > /dev/null && grep -q dm_crypt /proc/modules || exit 222 set -ef trap cleanup EXIT INT diff --git a/test/lvm.test b/test/lvm.test index a02563c..973fa85 100755 --- a/test/lvm.test +++ b/test/lvm.test @@ -10,7 +10,7 @@ cleanup() rm -rf "$tmpdir" } -command -v lvm > /dev/null || exit 222 +command -v lvm > /dev/null && grep -q dm_mod /proc/modules || exit 222 set -ef trap cleanup EXIT INT diff --git a/test/zfs.test b/test/zfs.test index 1b7565e..75b3bcb 100755 --- a/test/zfs.test +++ b/test/zfs.test @@ -9,7 +9,7 @@ cleanup() rm -rf "$tmpdir" } -command -v zfs > /dev/null || exit 222 +command -v zfs > /dev/null && grep -q zfs /proc/modules || exit 222 set -ef trap cleanup EXIT INT