Commit 1c2cc9f3 authored by Milan Broz's avatar Milan Broz

Do not print error output from older "which" command in tests.

parent 12908709
......@@ -162,7 +162,7 @@ function dm_crypt_keyring_support()
}
function test_and_prepare_keyring() {
which keyctl > /dev/null || skip "Cannot find keyctl, test skipped"
which keyctl > /dev/null 2>&1 || skip "Cannot find keyctl, test skipped"
keyctl list "@s" > /dev/null || skip "Current session keyring is unreachable, test skipped"
TEST_KEYRING=$(keyctl newring $TEST_KEYRING_NAME "@u" 2> /dev/null)
test -n "$TEST_KEYRING" || skip "Failed to create keyring in user keyring"
......
......@@ -75,8 +75,8 @@ function test_and_prepare_keyring() {
}
[ $(id -u) != 0 ] && skip "WARNING: You must be root to run this test, test skipped."
which dmsetup >/dev/null || skip "Cannot find dmsetup, test skipped"
which keyctl >/dev/null || skip "Cannot find keyctl, 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"
dm_crypt_keyring_support || skip "dm-crypt doesn't support kernel keyring, test skipped."
......
......@@ -140,7 +140,7 @@ function check_version()
[ $(id -u) != 0 ] && skip "WARNING: You must be root to run this test, test skipped."
[ -z "$LOOPDEV" ] && skip "Cannot find free loop device, test skipped."
which uuencode >/dev/null || skip "WARNING: test require uuencode binary, test skipped."
which uuencode >/dev/null 2>&1 || skip "WARNING: test require uuencode binary, test skipped."
check_version || skip "Probably old kernel, test skipped."
# loop-AES tests
......
......@@ -102,7 +102,7 @@ function valgrind_run()
[ -n "$VALG" ] && valgrind_setup && CRYPTSETUP=valgrind_run
which jq >/dev/null || skip "Cannot find jq, test skipped."
which jq >/dev/null 2>&1 || skip "Cannot find jq, test skipped."
prepare
......
......@@ -200,7 +200,7 @@ function test_logging() {
[ $(id -u) != 0 ] && skip "WARNING: You must be root to run this test, test skipped."
[ ! -x "$REENC" ] && skip "Cannot find $REENC, test skipped."
which wipefs >/dev/null || skip "Cannot find wipefs, test skipped."
which wipefs >/dev/null 2>&1 || skip "Cannot find wipefs, test skipped."
# REENCRYPTION tests
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment