mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-22 17:35:59 +03:00
tests: pvmove better delay check
Improve testing for condition that pvmove0 is already running in the table (so we do not kill pvmove while it has loaded target, but it's not yet Live). Also delay_dev for 200ms.
This commit is contained in:
parent
d24b6cfb1f
commit
147b0a1700
@ -11,7 +11,6 @@
|
||||
|
||||
. lib/inittest
|
||||
|
||||
# 15 extents
|
||||
aux prepare_pvs 3 22
|
||||
|
||||
vgcreate -s 32K $vg $(cat DEVICES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
|
||||
# Copyright (C) 2013-2015 Red Hat, Inc. All rights reserved.
|
||||
#
|
||||
# This copyrighted material is made available to anyone wishing to use,
|
||||
# modify, copy, or redistribute it subject to the terms and conditions
|
||||
@ -29,12 +29,16 @@ lvextend -l+5 $vg/$lv1 "$dev1"
|
||||
lvextend -l+10 $vg/$lv1 "$dev2"
|
||||
|
||||
# Slowdown writes
|
||||
aux delay_dev "$dev3" 0 100
|
||||
aux delay_dev "$dev3" 0 200
|
||||
|
||||
pvmove -i0 -n $vg/$lv1 "$dev1" "$dev3" $mode &
|
||||
PVMOVE=$!
|
||||
# Let's wait a bit till pvmove starts and kill it
|
||||
while not dmsetup status "$vg-pvmove0"; do sleep .1; done
|
||||
while : ; do
|
||||
dmsetup info -c -o tables_loaded "$vg-pvmove0" > out || true;
|
||||
not grep Live out || break
|
||||
sleep .1
|
||||
done
|
||||
kill -9 $PVMOVE
|
||||
wait
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user