From: Marian Csontos Date: Thu, 26 Jul 2018 13:01:50 +0000 (+0200) Subject: test: Check flavour is used and exists X-Git-Tag: v2_03_00~51 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=9cd05d1f1eef6ceb2dd0b18f792730f711334578;p=lvm2.git test: Check flavour is used and exists --- diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh index c48ea132d..967fc1f66 100644 --- a/test/lib/inittest.sh +++ b/test/lib/inittest.sh @@ -25,6 +25,8 @@ TESTNAME=${0##*/} PS4='#${BASH_SOURCE[0]##*/}:${LINENO}+ ' export TESTNAME PS4 +LVM_TEST_FLAVOUR=${LVM_TEST_FLAVOUR-} + LVM_TEST_BACKING_DEVICE=${LVM_TEST_BACKING_DEVICE-} LVM_TEST_DEVDIR=${LVM_TEST_DEVDIR-} LVM_TEST_NODEBUG=${LVM_TEST_NODEBUG-} @@ -49,9 +51,9 @@ SKIP_WITH_LVMPOLLD=${SKIP_WITH_LVMPOLLD-} SKIP_WITH_LVMLOCKD=${SKIP_WITH_LVMLOCKD-} SKIP_ROOT_DM_CHECK=${SKIP_ROOT_DM_CHECK-} -if test -n "$LVM_TEST_FLAVOUR"; then - . "lib/flavour-$LVM_TEST_FLAVOUR" -fi +test -n "$LVM_TEST_FLAVOUR" || { echo "NOTE: Empty flavour">&2; initskip; } +test -f "lib/flavour-$LVM_TEST_FLAVOUR" || { echo "NOTE: Flavour '$LVM_TEST_FLAVOUR' does not exist">&2; initskip; } +. "lib/flavour-$LVM_TEST_FLAVOUR" test -n "$SKIP_WITHOUT_CLVMD" && test "$LVM_TEST_LOCKING" -ne 3 && initskip test -n "$SKIP_WITH_CLVMD" && test "$LVM_TEST_LOCKING" = 3 && initskip