master - tests: configure use_lvmetad when needed
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=abdfb1e75ba372072919ddad0f43f8806412d531 Commit: abdfb1e75ba372072919ddad0f43f8806412d531 Parent: 6a171bbdf5bc579670b225c291421eb8ee14d2c3 Author: Zdenek Kabelac <[email protected]> AuthorDate: Fri May 1 22:40:58 2015 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Fri May 1 22:49:38 2015 +0200
tests: configure use_lvmetad when needed
--- test/lib/aux.sh | 7 +++++-- test/lib/inittest.sh | 1 - 2 files changed, 5 insertions(+), 3 deletions(-)
test/lib/aux.sh +5 -2
@@ -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} "$@" &
test/lib/inittest.sh +0 -1
@@ -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