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