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

tests: handle missing delay_dev

Try to run as much of test which could run without delay_dev.
This commit is contained in:
Zdenek Kabelac 2015-11-09 19:06:55 +01:00
parent 6762eec88c
commit a0cb92cbb1
5 changed files with 11 additions and 0 deletions

View File

@ -45,6 +45,8 @@ cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
cmd3=(pvmove -i1 $backgroundarg $mode -n $vg1/$lv1 "$dev4" "$dev6")
if test -e HAVE_DM_DELAY; then
if test -z "$backgroundarg" ; then
"${cmd1[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0"
@ -59,6 +61,8 @@ else
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd3[@]}"
fi
fi
# test removal of all pvmove LVs
pvmove --abort

View File

@ -34,6 +34,8 @@ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2"
cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
if test -e HAVE_DM_DELAY; then
if test -z "$backgroundarg" ; then
"${cmd1[@]}" &
aux wait_pvmove_lv_ready "$vg-pvmove0"
@ -52,6 +54,8 @@ get lv_field $vg name -a | tee out
not grep "^\[pvmove0\]" out
grep "^\[pvmove1\]" out
fi
# remove any remaining pvmoves in progress
pvmove --abort

View File

@ -22,6 +22,7 @@ vgextend $vg "$dev3"
# Slowdown writes
# (FIXME: generates interesting race when not used)
aux delay_dev "$dev3" 0 800 $(get first_extent_sector "$dev3"):
test -e HAVE_DM_DELAY || skip
for mode in "--atomic" ""
do

View File

@ -33,6 +33,7 @@ test_pvmove_resume() {
lvcreate -an -Zn -l30 -n $lv1 $vg1
aux delay_dev "$dev3" 0 1000 $(get first_extent_sector "$dev3"):
test -e HAVE_DM_DELAY || { lvremove -f $vg $vg1; return 0; }
aux delay_dev "$dev4" 0 1000 $(get first_extent_sector "$dev4"):
pvmove -i5 "$dev1" &

View File

@ -33,6 +33,7 @@ test_pvmove_resume() {
lvcreate -an -Zn -l30 -n $lv2 $vg "$dev3"
aux delay_dev "$dev4" 0 250
test -e HAVE_DM_DELAY || { lvremove -f $vg; return 0; }
aux delay_dev "$dev5" 0 250
pvmove -i5 "$dev1" "$dev4" &