1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: skip some tests with valgrind

Valgrind tends to be too slow for any kind of slowing down,
thus skip some tests that are time sensitive.
This commit is contained in:
Zdenek Kabelac 2023-08-17 21:50:48 +02:00
parent 61499e870a
commit 5803d9b689
3 changed files with 4 additions and 1 deletions

View File

@ -32,10 +32,12 @@ done
# Create 4-way raid1 LV # Create 4-way raid1 LV
lvcreate -aey --ty raid1 -m 3 -Zn -L16M -n $lv1 $vg lvcreate -aey --ty raid1 -m 3 -Zn -L16M -n $lv1 $vg
if test "${LVM_VALGRIND:-0}" -eq 0 ; then
not lvchange -y --writemostly "$dev1" "$vg/$lv1" not lvchange -y --writemostly "$dev1" "$vg/$lv1"
check lv_field $vg/$lv1 segtype "raid1" check lv_field $vg/$lv1 segtype "raid1"
check lv_field $vg/$lv1 stripes 4 check lv_field $vg/$lv1 stripes 4
check lv_attr_bit health $vg/${lv1}_rimage_0 "-" check lv_attr_bit health $vg/${lv1}_rimage_0 "-"
fi
aux enable_dev "${DEVICES[@]}" aux enable_dev "${DEVICES[@]}"
aux wait_for_sync $vg $lv1 aux wait_for_sync $vg $lv1
lvchange -y --writemostly "$dev1" "$vg/$lv1" lvchange -y --writemostly "$dev1" "$vg/$lv1"

View File

@ -321,6 +321,7 @@ aux zero_dev "$dev4" "$(get first_extent_sector "$dev4"):"
SHOULD= SHOULD=
aux throttle_dm_mirror || SHOULD=should aux throttle_dm_mirror || SHOULD=should
test "${LVM_VALGRIND:-0}" -eq 0 || SHOULD=should
# Use large enough mirror that takes time to sychronize with small regionsize # Use large enough mirror that takes time to sychronize with small regionsize
lvcreate -aey -L30 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" lvcreate -aey -L30 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE"

View File

@ -274,7 +274,7 @@ lvconvert --yes -m +1 $vg/$lv1 "$dev3"
# should allow 1st primary to be removed # should allow 1st primary to be removed
lvconvert --yes -m -1 $vg/$lv1 "$dev1" lvconvert --yes -m -1 $vg/$lv1 "$dev1"
# should NOT allow last primary to be removed # should NOT allow last primary to be removed
not lvconvert --yes -m -1 $vg/$lv1 "$dev2" test "${LVM_VALGRIND:-0}" -eq 0 && not lvconvert --yes -m -1 $vg/$lv1 "$dev2"
# should allow non-primary to be removed # should allow non-primary to be removed
lvconvert --yes -m 0 $vg/$lv1 "$dev3" lvconvert --yes -m 0 $vg/$lv1 "$dev3"
aux enable_dev "$dev3" aux enable_dev "$dev3"