1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-17 06:04:23 +03:00

tests: old systems do not have even throttling

When even throttling is not available, skip or use  should
with particular test piece.
This commit is contained in:
Zdenek Kabelac 2018-05-12 23:36:04 +02:00
parent 0a5edc1f12
commit 0e56fa6892
3 changed files with 14 additions and 10 deletions

View File

@ -319,11 +319,13 @@ fi
#
aux zero_dev "$dev2" $(get first_extent_sector "$dev2"):
aux zero_dev "$dev4" $(get first_extent_sector "$dev4"):
aux throttle_dm_mirror
SHOULD=
aux throttle_dm_mirror || SHOULD=should
# Use large enough mirror that takes time to sychronize with small regionsize
lvcreate -aey -L20 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE"
not lvconvert -m-1 $vg/$lv1 "$dev1" 2>&1 | tee out
$SHOULD not lvconvert -m-1 $vg/$lv1 "$dev1" 2>&1 | tee out
aux restore_dm_mirror
grep "not in-sync" out
@ -337,7 +339,7 @@ check lv_on $vg $lv1 "$dev4"
lvremove -ff $vg
aux throttle_dm_mirror
aux throttle_dm_mirror || :
# No parallel lvconverts on a single LV please
# Use big enough mirror size and small regionsize to run on all test machines succesfully
lvcreate -aey -Zn -Wn -L20 --type mirror --regionsize 16k -m1 -n $lv1 $vg "$dev1" "$dev2" "$dev3:0-8"
@ -348,7 +350,7 @@ LVM_TEST_TAG="kill_me_$PREFIX" lvconvert -m+1 -b $vg/$lv1 "$dev4"
# ATM upconversion should be running
# Next convert should fail b/c we can't have 2 at once
not lvconvert -m+1 $vg/$lv1 "$dev5" 2>&1 | tee out
$SHOULD not lvconvert -m+1 $vg/$lv1 "$dev5" 2>&1 | tee out
aux restore_dm_mirror
grep "is already being converted" out

View File

@ -22,6 +22,10 @@ export DM_ABORT_ON_INTERNAL_ERRORS=0
aux lvmconf 'activation/raid_region_size = 16'
aux target_at_least dm-mirror 1 10 0 || skip
# Throttle mirroring
aux throttle_dm_mirror || skip
aux prepare_pvs 6 60
vgcreate -s 512k $vg "$dev1" "$dev2"
@ -31,9 +35,6 @@ vgcreate -s 512k $vg1 "$dev4" "$dev5"
pvcreate --metadatacopies 0 "$dev6"
vgextend $vg1 "$dev6"
# Throttle mirroring
aux throttle_dm_mirror
for mode in "--atomic" "" ;
do
for backgroundarg in "-b" "" ;

View File

@ -18,15 +18,16 @@ SKIP_WITH_LVMLOCKD=1
aux lvmconf 'activation/raid_region_size = 16'
aux target_at_least dm-mirror 1 10 0 || skip
# Throttle mirroring
aux throttle_dm_mirror || skip
aux prepare_pvs 3 60
vgcreate -s 512k $vg "$dev1" "$dev2"
pvcreate --metadatacopies 0 "$dev3"
vgextend $vg "$dev3"
# Throttle mirroring
aux throttle_dm_mirror
for mode in "--atomic" "" ;
do
for backgroundarg in "-b" "" ;