mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
test: add large tests skip option
The lvm2 test suite aims at small test resource footprints (few PVs, small PV sizes) to run on tmpfs backed loop device. OTOH, lvconvert-reshape-raid.sh aims to test the maxima of supported total stripes of 64. This patch adds a prerequisite conditional to skip tests using more than 14 stripes. It requires the target version 1.13.1 to avoid deadlocks.
This commit is contained in:
parent
7aef59c6c3
commit
053314f295
@ -13,22 +13,25 @@
|
|||||||
SKIP_WITH_LVMLOCKD=1
|
SKIP_WITH_LVMLOCKD=1
|
||||||
SKIP_WITH_LVMPOLLD=1
|
SKIP_WITH_LVMPOLLD=1
|
||||||
|
|
||||||
|
LVM_SKIP_LARGE_TESTS=0
|
||||||
|
|
||||||
. lib/inittest
|
. lib/inittest
|
||||||
|
|
||||||
if [[ "$TESTDIR" == /dev/shm/* ]]; then
|
|
||||||
echo "Disabled. This tests is permanently causing /dev/shm exhaustion. RHBZ#1501145"
|
|
||||||
false
|
|
||||||
fi
|
|
||||||
|
|
||||||
which mkfs.ext4 || skip
|
which mkfs.ext4 || skip
|
||||||
aux have_raid 1 12 0 || skip
|
aux have_raid 1 13 1 || skip # needed to address RHBZ#1501145
|
||||||
|
|
||||||
# Temporarily skip reshape tests on single-core CPUs until there's a fix for
|
# Temporarily skip reshape tests on single-core CPUs until there's a fix for
|
||||||
# https://bugzilla.redhat.com/1443999 - AGK 2017/04/20
|
# https://bugzilla.redhat.com/1443999 - AGK 2017/04/20
|
||||||
#aux have_multi_core || skip
|
#aux have_multi_core || skip
|
||||||
# dropping single-core limitation with 1.12 target
|
# dropping single-core limitation with 1.12 target
|
||||||
|
|
||||||
aux prepare_pvs 65 32
|
if [ $LVM_SKIP_LARGE_TESTS -eq 0 ]
|
||||||
|
then
|
||||||
|
aux prepare_pvs 65 9
|
||||||
|
else
|
||||||
|
aux prepare_pvs 20 9
|
||||||
|
fi
|
||||||
|
|
||||||
get_devs
|
get_devs
|
||||||
|
|
||||||
vgcreate -s 1M "$vg" "${DEVICES[@]}"
|
vgcreate -s 1M "$vg" "${DEVICES[@]}"
|
||||||
@ -66,7 +69,7 @@ function _lvconvert
|
|||||||
[ "${level:0:7}" = "striped" ] && wait_and_check=0
|
[ "${level:0:7}" = "striped" ] && wait_and_check=0
|
||||||
[ "${level:0:5}" = "raid0" ] && wait_and_check=0
|
[ "${level:0:5}" = "raid0" ] && wait_and_check=0
|
||||||
|
|
||||||
lvconvert -y --ty $req_level $R $vg/$lv || return $?
|
lvconvert -y --ty $req_level $R "$DM_DEV_DIR/$vg/$lv" || return $?
|
||||||
|
|
||||||
check lv_first_seg_field $vg/$lv segtype "$level"
|
check lv_first_seg_field $vg/$lv segtype "$level"
|
||||||
check lv_first_seg_field $vg/$lv data_stripes $data_stripes
|
check lv_first_seg_field $vg/$lv data_stripes $data_stripes
|
||||||
@ -97,7 +100,7 @@ function _reshape_layout
|
|||||||
|
|
||||||
[[ "$opts" =~ "--stripes" ]] && ignore_a_chars=1
|
[[ "$opts" =~ "--stripes" ]] && ignore_a_chars=1
|
||||||
|
|
||||||
lvconvert -vvvv -y --ty $type $opts $vg/$lv
|
lvconvert -y --ty $type $opts "$DM_DEV_DIR/$vg/$lv"
|
||||||
check lv_first_seg_field $vg/$lv segtype "$type"
|
check lv_first_seg_field $vg/$lv segtype "$type"
|
||||||
check lv_first_seg_field $vg/$lv data_stripes $data_stripes
|
check lv_first_seg_field $vg/$lv data_stripes $data_stripes
|
||||||
check lv_first_seg_field $vg/$lv stripes $stripes
|
check lv_first_seg_field $vg/$lv stripes $stripes
|
||||||
@ -114,6 +117,7 @@ function _reshape_layout
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Create 3-way striped raid5 (4 legs total)
|
# Create 3-way striped raid5 (4 legs total)
|
||||||
|
# _lvcreate raid5_ls 3 4 16M $vg $lv1
|
||||||
_lvcreate raid5_ls 3 4 16M $vg $lv1
|
_lvcreate raid5_ls 3 4 16M $vg $lv1
|
||||||
check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
check lv_first_seg_field $vg/$lv1 segtype "raid5_ls"
|
||||||
aux wait_for_sync $vg $lv1
|
aux wait_for_sync $vg $lv1
|
||||||
@ -149,24 +153,32 @@ _reshape_layout raid5_ls 9 10 $vg $lv1 --stripes 9
|
|||||||
# Convert raid5_ls to 14 stripes
|
# Convert raid5_ls to 14 stripes
|
||||||
_reshape_layout raid5_ls 14 15 $vg $lv1 --stripes 14
|
_reshape_layout raid5_ls 14 15 $vg $lv1 --stripes 14
|
||||||
|
|
||||||
# Convert raid5_ls to 63 stripes
|
if [ $LVM_SKIP_LARGE_TESTS -eq 0 ]
|
||||||
_reshape_layout raid5_ls 63 64 $vg $lv1 --stripes 63
|
then
|
||||||
|
# Convert raid5_ls to 63 stripes
|
||||||
|
_reshape_layout raid5_ls 63 64 $vg $lv1 --stripes 63
|
||||||
|
|
||||||
# Convert raid5_ls back to 27 stripes
|
# Convert raid5_ls back to 27 stripes
|
||||||
_reshape_layout raid5_ls 27 64 $vg $lv1 --stripes 27 --force
|
_reshape_layout raid5_ls 27 64 $vg $lv1 --stripes 27 --force
|
||||||
_reshape_layout raid5_ls 27 28 $vg $lv1 --stripes 27
|
_reshape_layout raid5_ls 27 28 $vg $lv1 --stripes 27
|
||||||
|
|
||||||
# Convert raid5_ls back to 4 stripes checking
|
# Convert raid5_ls back to 4 stripes checking
|
||||||
# conversion to striped/raid* gets rejected
|
# conversion to striped/raid* gets rejected
|
||||||
# with existing LVs to be removed afer reshape
|
# with existing LVs to be removed afer reshape
|
||||||
_reshape_layout raid5_ls 4 28 $vg $lv1 --stripes 4 --force
|
_reshape_layout raid5_ls 4 28 $vg $lv1 --stripes 4 --force
|
||||||
|
else
|
||||||
|
# Convert raid5_ls back to 4 stripes checking
|
||||||
|
# conversion to striped/raid* gets rejected
|
||||||
|
# with existing LVs to be removed afer reshape
|
||||||
|
_reshape_layout raid5_ls 4 15 $vg $lv1 --stripes 4 --force
|
||||||
|
fi
|
||||||
|
|
||||||
# No we got the data reshaped and the freed SubLVs still present
|
# No we got the data reshaped and the freed SubLVs still present
|
||||||
# -> check takeover request gets rejected
|
# -> check takeover request gets rejected
|
||||||
not lvconvert --yes --type striped $vg/$lv1
|
not lvconvert --yes --type striped "$DM_DEV_DIR/$vg/$lv1"
|
||||||
not lvconvert --yes --type raid0 $vg/$lv1
|
not lvconvert --yes --type raid0 "$DM_DEV_DIR/$vg/$lv1"
|
||||||
not lvconvert --yes --type raid0_meta $vg/$lv1
|
not lvconvert --yes --type "$DM_DEV_DIR/raid0_meta $vg/$lv1"
|
||||||
not lvconvert --yes --type raid6 $vg/$lv1
|
not lvconvert --yes --type "$DM_DEV_DIR/raid6 $vg/$lv1"
|
||||||
# Remove the freed SubLVs
|
# Remove the freed SubLVs
|
||||||
_reshape_layout raid5_ls 4 5 $vg $lv1 --stripes 4
|
_reshape_layout raid5_ls 4 5 $vg $lv1 --stripes 4
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user