1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

tests: use single lvmconf call

This commit is contained in:
Zdenek Kabelac 2015-04-08 22:44:16 +02:00
parent a5b34f0f1b
commit ebde60beab
9 changed files with 65 additions and 66 deletions

View File

@ -85,8 +85,8 @@ prepare_lvmetad() {
# skip if we don't have our own lvmetad...
(which lvmetad 2>/dev/null | grep "$abs_builddir") || skip
lvmconf "global/use_lvmetad = 1"
lvmconf "devices/md_component_detection = 0"
lvmconf "global/use_lvmetad = 1" \
"devices/md_component_detection = 0"
local run_valgrind=
test "${LVM_VALGRIND_LVMETAD:-0}" -eq 0 || run_valgrind="run_valgrind"

View File

@ -12,8 +12,8 @@
. lib/inittest
aux prepare_vg 4
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
# Clean-up and create a 2-way mirror, where the the
# leg devices are always on $dev[12] and the log

View File

@ -14,8 +14,8 @@
aux have_raid 1 3 0 || skip
aux raid456_replace_works || skip
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
aux prepare_vg 8

View File

@ -12,8 +12,8 @@
. lib/inittest
aux prepare_vg 6
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
# 3-way, disk log
# multiple failures, full replace

View File

@ -12,8 +12,8 @@
. lib/inittest
aux prepare_vg 5
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
lvcreate -aey --type mirror -m 3 --ignoremonitoring -L 2M -n 4way $vg "$dev1" "$dev2" "$dev3" "$dev4" "$dev5":0
lvcreate -s $vg/4way -L 2M -n snap

View File

@ -11,8 +11,8 @@
. lib/inittest
aux prepare_vg 5 80
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
# 2-way mirror with corelog, 2 PVs
lvcreate -aey -l2 --type mirror -m1 --mirrorlog core -n $lv1 $vg "$dev1" "$dev2"

View File

@ -12,8 +12,8 @@
. lib/inittest
aux prepare_pvs 3
aux lvmconf 'allocation/maximise_cling = 0'
aux lvmconf 'allocation/mirror_logs_require_separate_pvs = 1'
aux lvmconf 'allocation/maximise_cling = 0' \
'allocation/mirror_logs_require_separate_pvs = 1'
# not required, just testing
aux pvcreate --metadatacopies 0 "$dev1"

View File

@ -14,8 +14,7 @@ test_description='Test pvcreate bootloader area support'
. lib/inittest
aux prepare_devs 1
aux lvmconf 'global/suffix=0'
aux lvmconf 'global/units="b"'
aux lvmconf 'global/suffix=0' 'global/units="b"'
#COMM 'pvcreate sets/aligns bootloader area correctly'
pvcreate --dataalignment 262144b --bootloaderareasize 614400b "$dev1"

View File

@ -89,8 +89,8 @@ SID=sidfoofile
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
vgcreate $vg1 "$dev1"
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
@ -104,8 +104,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg, overriding the local system_id so the vg looks foreign
vgcreate --systemid $SID2 $vg1 "$dev1"
# normal vgs is not an error and does not see the vg
@ -136,8 +136,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -165,8 +165,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -196,8 +196,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 $vg1
@ -229,8 +229,8 @@ SID1=sidfoofile1
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
aux lvmconf "global/system_id_source = none"
@ -255,8 +255,8 @@ vgcreate $vg1 "$dev1"
check vg_field $vg1 systemid ""
# set a local system_id
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# check we can see and use the vg with no system_id
vgs >err
grep $vg1 err
@ -271,8 +271,8 @@ SID1=sidfoofile1
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -298,8 +298,8 @@ SID1=sidfoofile1
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -332,8 +332,8 @@ SID2=012345678901234567890123456789012345678901234567890123456789012345678901234
# max len system_id should appear normally
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -346,8 +346,8 @@ rm -f $SIDFILE
# max+1 len system_id should be missing the last character
rm -f $SIDFILE
echo "$SID2" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -367,8 +367,8 @@ SID1=012345678901234567890123456789012345678901234567890123456789012345678901234
SID2=012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789abcdefg
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -386,8 +386,8 @@ SID2=A.1
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -407,8 +407,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal pvs sees the vg and pv
@ -438,8 +438,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 $vg1
@ -473,8 +473,8 @@ LVMLOCAL=etc/lvmlocal.conf
rm -f $LVMLOCAL
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -503,8 +503,8 @@ SID1=sidfoofile1
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate --systemid "" $vg1 "$dev1"
# normal vgs sees the vg
@ -521,8 +521,8 @@ SID1=sidfoofile1
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -549,8 +549,8 @@ SIDFILE=etc/lvm_test.conf
rm -f $LVMLOCAL
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -580,8 +580,8 @@ SIDFILE=etc/lvm_test.conf
rm -f $LVMLOCAL
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg
vgcreate $vg1 "$dev1"
# normal vgs sees the vg
@ -677,8 +677,8 @@ rm -f $SIDFILE
SID=""
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
vgcreate $vg1 "$dev1" |& tee err
vgs -o+systemid $vg1
check vg_field $vg1 systemid $SID
@ -700,8 +700,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg with an lv
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 -an $vg1
@ -741,8 +741,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg with an lv
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 -an $vg1
@ -781,8 +781,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg with an lv
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 -an $vg1
@ -833,8 +833,8 @@ SID2=sidfoofile2
SIDFILE=etc/lvm_test.conf
rm -f $SIDFILE
echo "$SID1" > $SIDFILE
aux lvmconf "global/system_id_source = file"
aux lvmconf "global/system_id_file = $SIDFILE"
aux lvmconf "global/system_id_source = file" \
"global/system_id_file = \"$SIDFILE\""
# create a vg with an lv
vgcreate $vg1 "$dev1"
lvcreate -n $lv1 -l 2 -an $vg1