1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

Run tests with lvmetad if we have it.

This commit is contained in:
Petr Rockai 2012-02-15 14:24:31 +00:00
parent da3a375f7a
commit 1ea2c6a2f6
3 changed files with 15 additions and 7 deletions

View File

@ -45,11 +45,7 @@ endif
all: check
check: .tests-stamp
@echo Testing with locking_type 1
VERBOSE=$(VERBOSE) ./lib/harness $(RUN_BASE)
@echo Testing with locking_type 3
VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=3 ./lib/harness $(RUN_BASE)
check: check_local check_cluster check_lvmetad
check_cluster: .tests-stamp
@echo Testing with locking_type 3
@ -59,6 +55,10 @@ check_local: .tests-stamp
@echo Testing with locking_type 1
VERBOSE=$(VERBOSE) LVM_TEST_LOCKING=1 ./lib/harness $(RUN_BASE)
check_lvmetad: .tests-stamp
@echo Testing with lvmetad on
VERBOSE=$(VERBOSE) LVM_TEST_LVMETAD=1 ./lib/harness $(RUN_BASE)
lib/should: lib/not
ln -sf not lib/should

View File

@ -61,15 +61,17 @@ prepare_dmeventd() {
}
prepare_lvmetad() {
echo preparing lvmetad...
# skip if we don't have our own lvmetad...
(which lvmetad | grep $abs_builddir) || {
touch SKIP_THIS_TEST
exit 1
}
lvmconf "global/lvmetad = 1"
lvmconf "global/use_lvmetad = 1"
lvmetad -f "$@" &
lvmetad -f "$@" -s $TESTDIR/lvmetad.socket &
echo "$!" > LOCAL_LVMETAD
sleep 1
@ -322,6 +324,7 @@ disable_dev() {
init_udev_transaction
for dev in "$@"; do
dmsetup remove -f $dev || true
pvscan --lvmetad $dev || true
done
finish_udev_transaction
@ -335,6 +338,7 @@ enable_dev() {
dmsetup create -u TEST-$name $name $name.table || dmsetup load $name $name.table
# using device name (since device path does not exists yes with udev)
dmsetup resume $name
pvscan --lvmetad $dev || true
done
finish_udev_transaction
}

View File

@ -59,6 +59,10 @@ ln -s $abs_top_builddir/test/lib/* $TESTDIR/lib
set -eE -o pipefail
aux lvmconf
aux prepare_clvmd
test -n "$LVM_TEST_LVMETAD" && {
aux prepare_lvmetad
export LVM_LVMETAD_SOCKET="$TESTDIR/lvmetad.socket"
}
echo "@TESTDIR=$TESTDIR"
echo "@PREFIX=$PREFIX"