1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-02 01:18:26 +03:00

Add a bunch of sub-tests aimed at testing various bugzillas, by jstava.

This commit is contained in:
Petr Rockai 2008-11-11 15:46:15 +00:00
parent 8cd284edab
commit cc44e17c5e
3 changed files with 36 additions and 0 deletions

View File

@ -30,6 +30,14 @@ lvextend $vg/$lv $dev1 >out
grep "^ Logical volume $lv successfully resized\$" out
check_pv_field_ $dev1 pv_free "0"
lvremove -f $vg/$lv
# 'lvextend computes necessary free space correctly - bz213552'
vgsize=$(vgs -o vg_extent_count --noheadings)
lvcreate -l $vgsize -n $lv $vg
yes | lvreduce -l $(( $vgsize / 2 )) $vg/$lv
lvextend -l $vgsize $vg/$lv
# 'Reset LV to original size'
lvremove -f $vg/$lv
lvcreate -L 64M -n $lv $vg

View File

@ -28,6 +28,26 @@ pvchange --uuid $dev1
pvchange --uuid $dev2
vgremove -f $vg
# check that PVs without metadata don't cause too many full device rescans (bz452606)
for mdacp in 1 0; do
pvcreate --metadatacopies $mdacp $devs
pvcreate $dev1
vgcreate $vg $devs
lvcreate -n $lv1 -l 2 -i5 -I256 $vg
lvcreate -n $lv2 -m2 -l 2 $vg
#lvchange -an $vg
lvchange -an $vg/$lv1 >out$mdacp 2>&1
lvchange -an $vg/$lv2 >>out$mdacp 2>&1
test ! -s out$mdacp
vgchange -ay $vg
lvchange -vvvv -an $vg/$lv1 >out$mdacp 2>&1
lvchange -vvvv -an $vg/$lv2 >>out$mdacp 2>&1
eval run$mdacp=$(wc -l <out$mdacp)
vgremove -f $vg
done
not grep "Cached VG .* incorrect PV list" out0
# some M1 metadata tests
pvcreate -M1 $dev1
pvcreate -M1 $dev2
pvcreate -M1 $dev3

View File

@ -14,6 +14,14 @@ aux prepare_devs 4
for mdatype in 1 2
do
# pvcreate (lvm$mdatype) refuses to overwrite an mounted filesystem (bz168330)
test ! -d $G_root_/mnt && mkdir $G_root_/mnt
if mke2fs $dev1; then
mount $dev1 $G_root_/mnt
not pvcreate -M$mdatype $dev1 2>err
grep "Can't open $dev1 exclusively. Mounted filesystem?" err
umount $dev1
fi
# pvcreate (lvm$mdatype) succeeds when run repeatedly (pv not in a vg) (bz178216)
pvcreate -M$mdatype $dev1