[sheepdog] [PATCH] tests/055: use _safe_remove to emulate disk failure

Liu Yuan namei.unix at gmail.com
Fri May 17 04:29:02 CEST 2013


On 05/16/2013 10:13 PM, MORITA Kazutaka wrote:
> Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
> ---
>  tests/055 | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/055 b/tests/055
> index 9b908e4..3737b17 100755
> --- a/tests/055
> +++ b/tests/055
> @@ -24,31 +24,31 @@ sleep 1
>  $COLLIE vdi create test 200M -P
>  
>  # simulate one disk failure
> -rm $STORE/0/d0 -rf
> +_safe_remove $STORE/0/d0
>  _random | $COLLIE vdi write test
>  _wait_for_sheep_recovery 0
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
>  
>  # simulate multiple disk failure
> -rm $STORE/1/d0 -rf
> +_safe_remove $STORE/1/d0
>  _random | $COLLIE vdi write test &
>  sleep 1
> -rm $STORE/1/d1 -rf
> +_safe_remove $STORE/1/d1
>  _wait_for_sheep_recovery 0
>  wait
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
>  
>  # simulate all disks failure
> -rm $STORE/1/d2 -rf
> +_safe_remove $STORE/1/d2
>  _random | $COLLIE vdi write test
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
>  
>  # simulate simultaneous multiple disks failure
> -rm $STORE/2/d0 -rf
> -rm $STORE/2/d1 -rf
> +_safe_remove $STORE/2/d0
> +_safe_remove $STORE/2/d1
>  dd if=/dev/zero | $COLLIE vdi write test
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
> 

Applied, thanks.

Yuan



More information about the sheepdog mailing list