Fix return code for skipped align tests.

This commit is contained in:
Milan Broz
2021-07-29 20:19:45 +02:00
parent 8c60cf8645
commit 089edb74b4
4 changed files with 5 additions and 6 deletions

View File

@@ -37,7 +37,7 @@ skip()
{
echo "TEST SKIPPED: $1"
cleanup
exit 0
exit 77
}
function dm_crypt_features()
@@ -179,7 +179,7 @@ if [ $(id -u) != 0 ]; then
fi
dm_crypt_features
modprobe --dry-run scsi_debug || exit 77
modprobe --dry-run scsi_debug >/dev/null 2>&1 || skip "This kernel seems to not support proper scsi_debug module, test skipped."
cleanup
if [ -d /sys/module/scsi_debug ] ; then
echo "Cannot use scsi_debug module (in use or compiled-in), test skipped."

View File

@@ -37,7 +37,7 @@ skip()
{
echo "TEST SKIPPED: $1"
cleanup
exit 0
exit 77
}
function dm_crypt_features()
@@ -161,7 +161,7 @@ if [ $(id -u) != 0 ]; then
fi
dm_crypt_features
modprobe --dry-run scsi_debug || exit 77
modprobe --dry-run scsi_debug >/dev/null 2>&1 || skip "This kernel seems to not support proper scsi_debug module, test skipped."
cleanup
if [ -d /sys/module/scsi_debug ] ; then
echo "Cannot use scsi_debug module (in use or compiled-in), test skipped."

View File

@@ -59,7 +59,6 @@ if [ $(id -u) != 0 ]; then
exit 77
fi
modprobe --dry-run scsi_debug || exit 77
modprobe dm-crypt >/dev/null 2>&1
if ! check_version ; then
echo "Probably old kernel, test skipped."

View File

@@ -687,7 +687,7 @@ function valgrind_run()
[ $(id -u) != 0 ] && skip "WARNING: You must be root to run this test, test skipped."
[ ! -x "$CRYPTSETUP" ] && skip "Cannot find $CRYPTSETUP, test skipped."
fips_mode && skip "This test cannot be run in FIPS mode."
modprobe --dry-run scsi_debug || exit 77
modprobe --dry-run scsi_debug >/dev/null 2>&1 || skip "This kernel seems to not support proper scsi_debug module, test skipped."
modprobe dm-crypt >/dev/null 2>&1 || fail "dm-crypt failed to load"
modprobe dm-delay > /dev/null 2>&1
dm_crypt_features