[sheepdog] [PATCH 2/2] tests/057: fix 057 and 057.out

MORITA Kazutaka morita.kazutaka at lab.ntt.co.jp
Fri May 10 07:43:10 CEST 2013


At Fri, 10 May 2013 13:33:01 +0800,
Liu Yuan wrote:
> 
> From: Liu Yuan <tailai.ly at taobao.com>
> 
> Signed-off-by: Liu Yuan <tailai.ly at taobao.com>
> ---
>  tests/057     |   11 +++++------
>  tests/057.out |   48 ++++++++++++++++++++++++------------------------
>  2 files changed, 29 insertions(+), 30 deletions(-)
> 
> diff --git a/tests/057 b/tests/057
> index e1a33ac..69820fb 100755
> --- a/tests/057
> +++ b/tests/057
> @@ -27,34 +27,33 @@ $COLLIE cluster format
>  sleep 1
>  $COLLIE vdi create test 100M -P
>  
> -$COLLIE node md info | awk '{$2="MASKED";print $0}' | _filter_store
> +$COLLIE node md info | awk '{$4="MASKED";print $0}' | _filter_store
>  
>  # plug during node event
>  _start_sheep 3
>  _wait_for_sheep 4
>  $COLLIE node md plug  $STORE/0/d3,$STORE/0/d4
>  _wait_for_sheep_recovery 0
> -$COLLIE node md info | awk '{$2="MASKED";print $0}' | _filter_store
> +$COLLIE node md info | awk '{$4="MASKED";print $0}' | _filter_store
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
>  
>  # plug duplicate path
>  $COLLIE node md plug  $STORE/0/d3
>  $COLLIE node recovery
> -$COLLIE node md info | awk '{$2="MASKED";print $0}' | _filter_store
> +$COLLIE node md info | awk '{$4="MASKED";print $0}' | _filter_store
>  
>  # unplug
>  $COLLIE node md unplug  $STORE/0/d0,$STORE/0/d1
>  _wait_for_sheep_recovery 0
> -$COLLIE node md info | awk '{$2="MASKED";print $0}' | _filter_store
> +$COLLIE node md info | awk '{$4="MASKED";print $0}' | _filter_store
>  $COLLIE vdi check test
>  $COLLIE cluster info | _filter_cluster_info
>  
> -
>  # unplug invalid path
>  $COLLIE node md unplug  $STORE/0/d0
>  $COLLIE node recovery
> -$COLLIE node md info | awk '{$2="MASKED";print $0}' | _filter_store
> +$COLLIE node md info | awk '{$4="MASKED";print $0}' | _filter_store
>  $COLLIE cluster info | _filter_cluster_info

How about introducing _filter_md_info like as folllows?

_filter_md_info()
{
	awk '{$2="MASKED";print $0}' | _filter_store
}


Thanks,

Kazutaka



More information about the sheepdog mailing list