[sheepdog] [PATCH] tests/functional/059: make sure write completion before live snapshot

Liu Yuan namei.unix at gmail.com
Fri Aug 30 11:22:03 CEST 2013


On Fri, Aug 30, 2013 at 04:48:24PM +0900, MORITA Kazutaka wrote:
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
>  tests/functional/059 | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/functional/059 b/tests/functional/059
> index b719a58..8240e11 100755
> --- a/tests/functional/059
> +++ b/tests/functional/059
> @@ -16,15 +16,23 @@ $DOG vdi create test 4M
>  _input()
>  {
>      for i in `seq 1 10`; do
> -	echo "multiwrite -P $i 0 1k ; 2k 1k ; 4k 1k ; 8k 1k"
> -	sleep 1
> +	echo "multiwrite -q -P $i 0 1k ; 2k 1k ; 4k 1k ; 8k 1k"
> +	while true; do
> +	    if grep qemu-io $STORE/qemu-io.log > /dev/null 2>&1; then
> +		break
> +	    fi
> +	    sleep .1
> +	done
> +	truncate $STORE/qemu-io.log -s 0
> +
>  	$DOG vdi snapshot test -s snap$i
>      done
>  
>      echo quit
>  }
>  
> -_input | $QEMU_IO sheepdog:test > /dev/null
> +_input | $QEMU_IO sheepdog:test > $STORE/qemu-io.log
> +
>  
>  _vdi_list
>  $DOG vdi tree | _filter_short_date

Applied thanks

Yuan



More information about the sheepdog mailing list