From 5803d9b689c7da22d618b0f4acb0e2022ed81f7b Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Thu, 17 Aug 2023 21:50:48 +0200 Subject: [PATCH] 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. --- test/shell/lvchange-raid1-writemostly.sh | 2 ++ test/shell/lvconvert-mirror.sh | 1 + test/shell/lvconvert-raid.sh | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/test/shell/lvchange-raid1-writemostly.sh b/test/shell/lvchange-raid1-writemostly.sh index 039429a41..f8104bea9 100644 --- a/test/shell/lvchange-raid1-writemostly.sh +++ b/test/shell/lvchange-raid1-writemostly.sh @@ -32,10 +32,12 @@ done # Create 4-way raid1 LV 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" check lv_field $vg/$lv1 segtype "raid1" check lv_field $vg/$lv1 stripes 4 check lv_attr_bit health $vg/${lv1}_rimage_0 "-" +fi aux enable_dev "${DEVICES[@]}" aux wait_for_sync $vg $lv1 lvchange -y --writemostly "$dev1" "$vg/$lv1" diff --git a/test/shell/lvconvert-mirror.sh b/test/shell/lvconvert-mirror.sh index 17ed033b2..0d5d641ae 100644 --- a/test/shell/lvconvert-mirror.sh +++ b/test/shell/lvconvert-mirror.sh @@ -321,6 +321,7 @@ aux zero_dev "$dev4" "$(get first_extent_sector "$dev4"):" 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 lvcreate -aey -L30 -Zn -Wn --type mirror --regionsize 16k -m2 -n $lv1 $vg "$dev1" "$dev2" "$dev4" "$dev3:$DEVRANGE" diff --git a/test/shell/lvconvert-raid.sh b/test/shell/lvconvert-raid.sh index aa50fbb62..561d75e40 100644 --- a/test/shell/lvconvert-raid.sh +++ b/test/shell/lvconvert-raid.sh @@ -274,7 +274,7 @@ lvconvert --yes -m +1 $vg/$lv1 "$dev3" # should allow 1st primary to be removed lvconvert --yes -m -1 $vg/$lv1 "$dev1" # 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 lvconvert --yes -m 0 $vg/$lv1 "$dev3" aux enable_dev "$dev3"