mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: check_devicesfile
make check_devicesfile T=... (A number of tests should probably get a new SKIP_WITH_DEVICES_FILE.)
This commit is contained in:
parent
843ee943ab
commit
d5f3239de4
@ -81,6 +81,7 @@ help:
|
|||||||
@echo " check_system Run all tests using udev."
|
@echo " check_system Run all tests using udev."
|
||||||
@echo " check_local Run tests."
|
@echo " check_local Run tests."
|
||||||
@echo " check_lvmpolld Run tests with lvmpolld daemon."
|
@echo " check_lvmpolld Run tests with lvmpolld daemon."
|
||||||
|
@echo " check_devicesfile Run tests using a devices file."
|
||||||
@echo " check_all_lvmpolld Run all tests with lvmpolld daemon."
|
@echo " check_all_lvmpolld Run all tests with lvmpolld daemon."
|
||||||
@echo " check_lvmlockd_sanlock Run tests with lvmlockd and sanlock."
|
@echo " check_lvmlockd_sanlock Run tests with lvmlockd and sanlock."
|
||||||
@echo " check_lvmlockd_dlm Run tests with lvmlockd and dlm."
|
@echo " check_lvmlockd_dlm Run tests with lvmlockd and dlm."
|
||||||
@ -148,6 +149,11 @@ check_all_lvmpolld: .tests-stamp
|
|||||||
--flavours ndev-lvmpolld --only $(T) --skip $(S)
|
--flavours ndev-lvmpolld --only $(T) --skip $(S)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
check_devicesfile: .tests-stamp
|
||||||
|
VERBOSE=$(VERBOSE) ./lib/runner \
|
||||||
|
--testdir . --outdir $(LVM_TEST_RESULTS) \
|
||||||
|
--flavours ndev-devicesfile --only $(T) --skip $(S)
|
||||||
|
|
||||||
ifeq ("@BUILD_LVMLOCKD@", "yes")
|
ifeq ("@BUILD_LVMLOCKD@", "yes")
|
||||||
check_lvmlockd_sanlock: .tests-stamp
|
check_lvmlockd_sanlock: .tests-stamp
|
||||||
VERBOSE=$(VERBOSE) ./lib/runner \
|
VERBOSE=$(VERBOSE) ./lib/runner \
|
||||||
@ -179,6 +185,7 @@ EXECDIR = $(libexecdir)/lvm2-testsuite
|
|||||||
LIB_FLAVOURS = \
|
LIB_FLAVOURS = \
|
||||||
flavour-ndev-lvmpolld\
|
flavour-ndev-lvmpolld\
|
||||||
flavour-ndev-vanilla\
|
flavour-ndev-vanilla\
|
||||||
|
flavour-ndev-devicesfile\
|
||||||
flavour-udev-lvmpolld\
|
flavour-udev-lvmpolld\
|
||||||
flavour-udev-lvmlockd-sanlock\
|
flavour-udev-lvmlockd-sanlock\
|
||||||
flavour-udev-lvmlockd-dlm\
|
flavour-udev-lvmlockd-dlm\
|
||||||
|
@ -822,7 +822,9 @@ wipefs_a() {
|
|||||||
local dev=$1
|
local dev=$1
|
||||||
shift
|
shift
|
||||||
|
|
||||||
# lvmdevices --deldev $dev || true
|
if test -n "$LVM_TEST_DEVICES_FILE"; then
|
||||||
|
lvmdevices --deldev $dev || true
|
||||||
|
fi
|
||||||
|
|
||||||
if wipefs -V >/dev/null; then
|
if wipefs -V >/dev/null; then
|
||||||
wipefs -a "$dev"
|
wipefs -a "$dev"
|
||||||
@ -831,7 +833,10 @@ wipefs_a() {
|
|||||||
mdadm --zero-superblock "$dev" || true
|
mdadm --zero-superblock "$dev" || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# lvmdevices --adddev $dev || true
|
if test -n "$LVM_TEST_DEVICES_FILE"; then
|
||||||
|
lvmdevices --adddev $dev || true
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_backing_dev() {
|
prepare_backing_dev() {
|
||||||
@ -917,11 +922,13 @@ prepare_devs() {
|
|||||||
wipefs -a "$d" 2>/dev/null || true
|
wipefs -a "$d" 2>/dev/null || true
|
||||||
done
|
done
|
||||||
|
|
||||||
# mkdir -p $TESTDIR/etc/lvm/devices || true
|
if test -n "$LVM_TEST_DEVICES_FILE"; then
|
||||||
# rm $TESTDIR/etc/lvm/devices/system.devices || true
|
mkdir -p $TESTDIR/etc/lvm/devices || true
|
||||||
# for d in "${DEVICES[@]}"; do
|
rm $TESTDIR/etc/lvm/devices/system.devices || true
|
||||||
# lvmdevices --adddev $dev || true
|
for d in "${DEVICES[@]}"; do
|
||||||
# done
|
lvmdevices --adddev $dev || true
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
#for i in `seq 1 $n`; do
|
#for i in `seq 1 $n`; do
|
||||||
# local name="${PREFIX}$pvname$i"
|
# local name="${PREFIX}$pvname$i"
|
||||||
@ -1276,6 +1283,7 @@ generate_config() {
|
|||||||
LVM_TEST_LOCKING=${LVM_TEST_LOCKING:-1}
|
LVM_TEST_LOCKING=${LVM_TEST_LOCKING:-1}
|
||||||
LVM_TEST_LVMPOLLD=${LVM_TEST_LVMPOLLD:-0}
|
LVM_TEST_LVMPOLLD=${LVM_TEST_LVMPOLLD:-0}
|
||||||
LVM_TEST_LVMLOCKD=${LVM_TEST_LVMLOCKD:-0}
|
LVM_TEST_LVMLOCKD=${LVM_TEST_LVMLOCKD:-0}
|
||||||
|
LVM_TEST_DEVICES_FILE=${LVM_TEST_DEVICES_FILE:-0}
|
||||||
# FIXME:dct: This is harmful! Variables are unused here and are tested not being empty elsewhere:
|
# FIXME:dct: This is harmful! Variables are unused here and are tested not being empty elsewhere:
|
||||||
#LVM_TEST_LOCK_TYPE_SANLOCK=${LVM_TEST_LOCK_TYPE_SANLOCK:-0}
|
#LVM_TEST_LOCK_TYPE_SANLOCK=${LVM_TEST_LOCK_TYPE_SANLOCK:-0}
|
||||||
#LVM_TEST_LOCK_TYPE_DLM=${LVM_TEST_LOCK_TYPE_DLM:-0}
|
#LVM_TEST_LOCK_TYPE_DLM=${LVM_TEST_LOCK_TYPE_DLM:-0}
|
||||||
@ -1310,6 +1318,7 @@ devices/md_component_detection = 0
|
|||||||
devices/scan = "$DM_DEV_DIR"
|
devices/scan = "$DM_DEV_DIR"
|
||||||
devices/sysfs_scan = 1
|
devices/sysfs_scan = 1
|
||||||
devices/write_cache_state = 0
|
devices/write_cache_state = 0
|
||||||
|
devices/use_devicesfile = $LVM_TEST_DEVICES_FILE
|
||||||
global/abort_on_internal_errors = 1
|
global/abort_on_internal_errors = 1
|
||||||
global/cache_check_executable = "$LVM_TEST_CACHE_CHECK_CMD"
|
global/cache_check_executable = "$LVM_TEST_CACHE_CHECK_CMD"
|
||||||
global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
|
global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
|
||||||
|
2
test/lib/flavour-ndev-devicesfile.sh
Normal file
2
test/lib/flavour-ndev-devicesfile.sh
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
export LVM_TEST_LOCKING=1
|
||||||
|
export LVM_TEST_DEVICES_FILE=1
|
@ -37,6 +37,7 @@ SHARED=${SHARED-}
|
|||||||
LVM_TEST_LVMLOCKD=${LVM_TEST_LVMLOCKD-}
|
LVM_TEST_LVMLOCKD=${LVM_TEST_LVMLOCKD-}
|
||||||
LVM_TEST_LVMLOCKD_TEST=${LVM_TEST_LVMLOCKD_TEST-}
|
LVM_TEST_LVMLOCKD_TEST=${LVM_TEST_LVMLOCKD_TEST-}
|
||||||
LVM_TEST_LVMPOLLD=${LVM_TEST_LVMPOLLD-}
|
LVM_TEST_LVMPOLLD=${LVM_TEST_LVMPOLLD-}
|
||||||
|
LVM_TEST_DEVICES_FILE=${LVM_TEST_DEVICES_FILE-}
|
||||||
LVM_TEST_LOCK_TYPE_DLM=${LVM_TEST_LOCK_TYPE_DLM-}
|
LVM_TEST_LOCK_TYPE_DLM=${LVM_TEST_LOCK_TYPE_DLM-}
|
||||||
LVM_TEST_LOCK_TYPE_SANLOCK=${LVM_TEST_LOCK_TYPE_SANLOCK-}
|
LVM_TEST_LOCK_TYPE_SANLOCK=${LVM_TEST_LOCK_TYPE_SANLOCK-}
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ unset CDPATH
|
|||||||
export LVM_TEST_BACKING_DEVICE LVM_TEST_DEVDIR LVM_TEST_NODEBUG
|
export LVM_TEST_BACKING_DEVICE LVM_TEST_DEVDIR LVM_TEST_NODEBUG
|
||||||
export LVM_TEST_LVMLOCKD LVM_TEST_LVMLOCKD_TEST
|
export LVM_TEST_LVMLOCKD LVM_TEST_LVMLOCKD_TEST
|
||||||
export LVM_TEST_LVMPOLLD LVM_TEST_LOCK_TYPE_DLM LVM_TEST_LOCK_TYPE_SANLOCK
|
export LVM_TEST_LVMPOLLD LVM_TEST_LOCK_TYPE_DLM LVM_TEST_LOCK_TYPE_SANLOCK
|
||||||
|
export LVM_TEST_DEVICES_FILE
|
||||||
# grab some common utilities
|
# grab some common utilities
|
||||||
. lib/utils
|
. lib/utils
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user