summaryrefslogtreecommitdiff
path: root/tests/keyring-test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/keyring-test')
-rwxr-xr-xtests/keyring-test6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/keyring-test b/tests/keyring-test
index 3ed3aff..38abcfb 100755
--- a/tests/keyring-test
+++ b/tests/keyring-test
@@ -76,9 +76,9 @@ function test_and_prepare_keyring() {
}
[ $(id -u) != 0 ] && skip "WARNING: You must be root to run this test, test skipped."
-which dmsetup >/dev/null 2>&1 || skip "Cannot find dmsetup, test skipped"
-which keyctl >/dev/null 2>&1 || skip "Cannot find keyctl, test skipped"
-modprobe dm-crypt || fail "dm-crypt failed to load"
+command -v dmsetup >/dev/null || skip "Cannot find dmsetup, test skipped"
+command -v keyctl >/dev/null || skip "Cannot find keyctl, test skipped"
+modprobe dm-crypt >/dev/null 2>&1 || fail "dm-crypt failed to load"
dm_crypt_keyring_support || skip "dm-crypt doesn't support kernel keyring, test skipped."
test_and_prepare_keyring