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:
parent
6762eec88c
commit
a0cb92cbb1
@ -45,6 +45,8 @@ cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
|
|||||||
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
|
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
|
||||||
cmd3=(pvmove -i1 $backgroundarg $mode -n $vg1/$lv1 "$dev4" "$dev6")
|
cmd3=(pvmove -i1 $backgroundarg $mode -n $vg1/$lv1 "$dev4" "$dev6")
|
||||||
|
|
||||||
|
if test -e HAVE_DM_DELAY; then
|
||||||
|
|
||||||
if test -z "$backgroundarg" ; then
|
if test -z "$backgroundarg" ; then
|
||||||
"${cmd1[@]}" &
|
"${cmd1[@]}" &
|
||||||
aux wait_pvmove_lv_ready "$vg-pvmove0"
|
aux wait_pvmove_lv_ready "$vg-pvmove0"
|
||||||
@ -59,6 +61,8 @@ else
|
|||||||
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd3[@]}"
|
LVM_TEST_TAG="kill_me_$PREFIX" "${cmd3[@]}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
# test removal of all pvmove LVs
|
# test removal of all pvmove LVs
|
||||||
pvmove --abort
|
pvmove --abort
|
||||||
|
|
||||||
|
@ -34,6 +34,8 @@ lvcreate -an -Zn -l30 -n $lv2 $vg "$dev2"
|
|||||||
cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
|
cmd1=(pvmove -i1 $backgroundarg $mode "$dev1" "$dev3")
|
||||||
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
|
cmd2=(pvmove -i1 $backgroundarg $mode "$dev2" "$dev3")
|
||||||
|
|
||||||
|
if test -e HAVE_DM_DELAY; then
|
||||||
|
|
||||||
if test -z "$backgroundarg" ; then
|
if test -z "$backgroundarg" ; then
|
||||||
"${cmd1[@]}" &
|
"${cmd1[@]}" &
|
||||||
aux wait_pvmove_lv_ready "$vg-pvmove0"
|
aux wait_pvmove_lv_ready "$vg-pvmove0"
|
||||||
@ -52,6 +54,8 @@ get lv_field $vg name -a | tee out
|
|||||||
not grep "^\[pvmove0\]" out
|
not grep "^\[pvmove0\]" out
|
||||||
grep "^\[pvmove1\]" out
|
grep "^\[pvmove1\]" out
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
# remove any remaining pvmoves in progress
|
# remove any remaining pvmoves in progress
|
||||||
pvmove --abort
|
pvmove --abort
|
||||||
|
|
||||||
|
@ -22,6 +22,7 @@ vgextend $vg "$dev3"
|
|||||||
# Slowdown writes
|
# Slowdown writes
|
||||||
# (FIXME: generates interesting race when not used)
|
# (FIXME: generates interesting race when not used)
|
||||||
aux delay_dev "$dev3" 0 800 $(get first_extent_sector "$dev3"):
|
aux delay_dev "$dev3" 0 800 $(get first_extent_sector "$dev3"):
|
||||||
|
test -e HAVE_DM_DELAY || skip
|
||||||
|
|
||||||
for mode in "--atomic" ""
|
for mode in "--atomic" ""
|
||||||
do
|
do
|
||||||
|
@ -33,6 +33,7 @@ test_pvmove_resume() {
|
|||||||
lvcreate -an -Zn -l30 -n $lv1 $vg1
|
lvcreate -an -Zn -l30 -n $lv1 $vg1
|
||||||
|
|
||||||
aux delay_dev "$dev3" 0 1000 $(get first_extent_sector "$dev3"):
|
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"):
|
aux delay_dev "$dev4" 0 1000 $(get first_extent_sector "$dev4"):
|
||||||
|
|
||||||
pvmove -i5 "$dev1" &
|
pvmove -i5 "$dev1" &
|
||||||
|
@ -33,6 +33,7 @@ test_pvmove_resume() {
|
|||||||
lvcreate -an -Zn -l30 -n $lv2 $vg "$dev3"
|
lvcreate -an -Zn -l30 -n $lv2 $vg "$dev3"
|
||||||
|
|
||||||
aux delay_dev "$dev4" 0 250
|
aux delay_dev "$dev4" 0 250
|
||||||
|
test -e HAVE_DM_DELAY || { lvremove -f $vg; return 0; }
|
||||||
aux delay_dev "$dev5" 0 250
|
aux delay_dev "$dev5" 0 250
|
||||||
|
|
||||||
pvmove -i5 "$dev1" "$dev4" &
|
pvmove -i5 "$dev1" "$dev4" &
|
||||||
|
Loading…
Reference in New Issue
Block a user