summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-05-01 22:40:58 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-05-01 22:49:38 +0200
commitabdfb1e75ba372072919ddad0f43f8806412d531 (patch)
tree0deb9e670758df4b66c30677cca1dc6e7baf85bb
parent6a171bbdf5bc579670b225c291421eb8ee14d2c3 (diff)
downloadlvm2-abdfb1e75ba372072919ddad0f43f8806412d531.tar.gz
tests: configure use_lvmetad when needed
-rw-r--r--test/lib/aux.sh7
-rw-r--r--test/lib/inittest.sh1
2 files changed, 5 insertions, 3 deletions
diff --git a/test/lib/aux.sh b/test/lib/aux.sh
index c1889ac06..c01fb8052 100644
--- a/test/lib/aux.sh
+++ b/test/lib/aux.sh
@@ -94,8 +94,11 @@ prepare_lvmetad() {
kill_sleep_kill_ LOCAL_LVMETAD ${LVM_VALGRIND_LVMETAD:-0}
- # Default debug is "-l all" and could be override
- # by setting LVM_TEST_LVMETAD_DEBUG_OPTS before calling inittest.
+ # Avoid reconfiguring, if already set to use_lvmetad
+ (grep use_lvmetad CONFIG_VALUES 2>/dev/null | tail -1 | grep -q 1) || \
+ aux lvmconf "global/use_lvmetad = 1" "devices/md_component_detection = 0"
+ # Default debug is "-l all" and could be override
+ # by setting LVM_TEST_LVMETAD_DEBUG_OPTS before calling inittest.
echo "preparing lvmetad..."
$run_valgrind lvmetad -f "$@" -s "$TESTDIR/lvmetad.socket" \
${LVM_TEST_LVMETAD_DEBUG_OPTS--l all} "$@" &
diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh
index 98abae67a..b57738941 100644
--- a/test/lib/inittest.sh
+++ b/test/lib/inittest.sh
@@ -92,7 +92,6 @@ echo "@PREFIX=$PREFIX"
if test -n "$LVM_TEST_LVMETAD" ; then
export LVM_LVMETAD_SOCKET="$TESTDIR/lvmetad.socket"
export LVM_LVMETAD_PIDFILE="$TESTDIR/lvmetad.pid"
- aux lvmconf "global/use_lvmetad = 1" "devices/md_component_detection = 0"
aux prepare_lvmetad
else
# lvmetad prepares its own lvmconf