mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
tests: ensure test defines its own etc dir
Compilation may configure it's own /etc path so ensure the test has a defined location for access to this dir during testing. Also prepare machine_id filei (with the use of uuidgen tool) for the test.
This commit is contained in:
parent
2cb43449ee
commit
39d6a9601f
@ -1538,7 +1538,7 @@ allocation/vdo_slab_size_mb = 128
|
|||||||
allocation/zero_metadata = 0
|
allocation/zero_metadata = 0
|
||||||
backup/archive = 0
|
backup/archive = 0
|
||||||
backup/backup = 0
|
backup/backup = 0
|
||||||
devices/cache_dir = "$TESTDIR/etc"
|
devices/cache_dir = "$LVM_SYSTEM_DIR"
|
||||||
devices/default_data_alignment = 1
|
devices/default_data_alignment = 1
|
||||||
devices/dir = "$DM_DEV_DIR"
|
devices/dir = "$DM_DEV_DIR"
|
||||||
devices/md_component_detection = 0
|
devices/md_component_detection = 0
|
||||||
@ -1554,6 +1554,7 @@ global/cache_dump_executable = "$LVM_TEST_CACHE_DUMP_CMD"
|
|||||||
global/cache_repair_executable = "$LVM_TEST_CACHE_REPAIR_CMD"
|
global/cache_repair_executable = "$LVM_TEST_CACHE_REPAIR_CMD"
|
||||||
global/detect_internal_vg_cache_corruption = 1
|
global/detect_internal_vg_cache_corruption = 1
|
||||||
global/fallback_to_local_locking = 0
|
global/fallback_to_local_locking = 0
|
||||||
|
global/etc = "$LVM_SYSTEM_DIR"
|
||||||
global/locking_type=$LVM_TEST_LOCKING
|
global/locking_type=$LVM_TEST_LOCKING
|
||||||
global/notify_dbus = 0
|
global/notify_dbus = 0
|
||||||
global/si_unit_consistency = 1
|
global/si_unit_consistency = 1
|
||||||
|
@ -124,8 +124,9 @@ DM_ABORT_ON_INTERNAL_ERRORS=${DM_ABORT_ON_INTERNAL_ERRORS:-1}
|
|||||||
DM_DEBUG_WITH_LINE_NUMBERS=${DM_DEBUG_WITH_LINE_NUMBERS:-1}
|
DM_DEBUG_WITH_LINE_NUMBERS=${DM_DEBUG_WITH_LINE_NUMBERS:-1}
|
||||||
|
|
||||||
export DM_DEFAULT_NAME_MANGLING_MODE DM_DEV_DIR LVM_SYSTEM_DIR DM_ABORT_ON_INTERNAL_ERRORS
|
export DM_DEFAULT_NAME_MANGLING_MODE DM_DEV_DIR LVM_SYSTEM_DIR DM_ABORT_ON_INTERNAL_ERRORS
|
||||||
|
|
||||||
mkdir "$LVM_SYSTEM_DIR" "$DM_DEV_DIR"
|
mkdir "$LVM_SYSTEM_DIR" "$DM_DEV_DIR"
|
||||||
|
MACHINEID=$(uuidgen 2>/dev/null || echo "abcdefabcdefabcdefabcdefabcdefab")
|
||||||
|
echo "${MACHINEID//-/}" > "$LVM_SYSTEM_DIR/machine-id" # remove all '-'
|
||||||
if test -n "$LVM_TEST_DEVDIR" ; then
|
if test -n "$LVM_TEST_DEVDIR" ; then
|
||||||
test -d "$LVM_TEST_DEVDIR" || die "Test device directory LVM_TEST_DEVDIR=\"$LVM_TEST_DEVDIR\" is not valid."
|
test -d "$LVM_TEST_DEVDIR" || die "Test device directory LVM_TEST_DEVDIR=\"$LVM_TEST_DEVDIR\" is not valid."
|
||||||
DM_DEV_DIR=$LVM_TEST_DEVDIR
|
DM_DEV_DIR=$LVM_TEST_DEVDIR
|
||||||
|
Loading…
Reference in New Issue
Block a user