mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
tests: integrate default thin/cache tool paths
If the system is correctly configure (cache & thin tools are present) avoid 'extra' rebuild of configuration. On the other hand - if some tool is missing - duplicate ##LVMCONF should make it more straighforward to see.
This commit is contained in:
parent
c6bcfcba85
commit
a084b3122f
@ -690,6 +690,12 @@ global/locking_dir = "$TESTDIR/var/lock/lvm"
|
||||
global/locking_type=$LVM_TEST_LOCKING
|
||||
global/si_unit_consistency = 1
|
||||
global/fallback_to_local_locking = 0
|
||||
global/cache_check_executable = "$LVM_TEST_CACHE_CHECK_CMD"
|
||||
global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
|
||||
global/cache_repair_executable = "$LVM_TEST_CACHE_REPAIR_CMD"
|
||||
global/thin_check_executable = "$LVM_TEST_THIN_CHECK_CMD"
|
||||
global/thin_dump_executable = "$LVM_TEST_THIN_DUMP_CMD"
|
||||
global/thin_repair_executable = "$LVM_TEST_THIN_REPAIR_CMD"
|
||||
activation/checks = 1
|
||||
activation/udev_sync = 1
|
||||
activation/udev_rules = 1
|
||||
@ -887,9 +893,13 @@ have_thin() {
|
||||
test -x "$LVM_TEST_THIN_CHECK_CMD" || LVM_TEST_THIN_CHECK_CMD=""
|
||||
test -x "$LVM_TEST_THIN_DUMP_CMD" || LVM_TEST_THIN_DUMP_CMD=""
|
||||
test -x "$LVM_TEST_THIN_REPAIR_CMD" || LVM_TEST_THIN_REPAIR_CMD=""
|
||||
test -z "$LVM_TEST_THIN_CHECK_CMD" -o \
|
||||
-z "$LVM_TEST_THIN_DUMP_CMD" -o \
|
||||
-z "$LVM_TEST_THIN_REPAIR_CMD" && {
|
||||
lvmconf "global/thin_check_executable = \"$LVM_TEST_THIN_CHECK_CMD\"" \
|
||||
"global/thin_dump_executable = \"$LVM_TEST_THIN_DUMP_CMD\"" \
|
||||
"global/thin_repair_executable = \"$LVM_TEST_THIN_REPAIR_CMD\""
|
||||
}
|
||||
}
|
||||
|
||||
have_raid() {
|
||||
@ -901,12 +911,17 @@ have_cache() {
|
||||
test "$CACHE" = shared -o "$CACHE" = internal || return 1
|
||||
target_at_least dm-cache "$@"
|
||||
|
||||
# disable cache_check if not present in system
|
||||
test -x "$LVM_TEST_CACHE_CHECK_CMD" || LVM_TEST_CACHE_CHECK_CMD=""
|
||||
test -x "$LVM_TEST_CACHE_DUMP_CMD" || LVM_TEST_CACHE_DUMP_CMD=""
|
||||
test -x "$LVM_TEST_CACHE_REPAIR_CMD" || LVM_TEST_CACHE_REPAIR_CMD=""
|
||||
test -z "$LVM_TEST_CACHE_CHECK_CMD" -o \
|
||||
-z "$LVM_TEST_CACHE_DUMP_CMD" -o \
|
||||
-z "$LVM_TEST_CACHE_REPAIR_CMD" && {
|
||||
lvmconf "global/cache_check_executable = \"$LVM_TEST_CACHE_CHECK_CMD\"" \
|
||||
"global/cache_dump_executable = \"$LVM_TEST_CACHE_DUMP_CMD\"" \
|
||||
"global/cache_repair_executable = \"$LVM_TEST_CACHE_REPAIR_CMD\""
|
||||
}
|
||||
}
|
||||
|
||||
have_tool_at_least() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user