xfs
[Top] [All Lists]

Re: [PATCH] xfstests: small common.config cleanup

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfstests: small common.config cleanup
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 07 Jul 2009 09:05:01 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20090620173818.GA26809@xxxxxxxxxxxxx>
References: <20090620173818.GA26809@xxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)
Christoph Hellwig wrote:
> Don't list various non-mandatory options near the check for the
> mandatory ones, and make the test for the mandatory ones a proper if
> statements.
> 
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks ok to me:

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxxx>

> Index: xfstests-dev/common.config
> ===================================================================
> --- xfstests-dev.orig/common.config   2009-06-20 19:15:14.576805079 +0200
> +++ xfstests-dev/common.config        2009-06-20 19:16:48.956930262 +0200
> @@ -191,27 +191,18 @@ known_hosts()
>    [ -f $HOST_CONFIG_DIR/$HOST ]        && . $HOST_CONFIG_DIR/$HOST
>    [ -f $HOST_CONFIG_DIR/$HOST.config ] && . $HOST_CONFIG_DIR/$HOST.config
>  
> +  #  Mandatory Config values.
>    MC=""
> -#  Non-Mandatory Config values.
> -#  [ -z "$MODULAR" ]        && MC="$MC MODULAR"
> -#  [ -z "$TEST_LOGDEV" ]    && MC="$MC TEST_LOGDEV"
> -#  [ -z "$SCRATCH_LOGDEV" ] && MC="$MC SCRATCH_LOGDEV"
> -#  [ -z "$SCRATCH_RTDEV" ]  && MC="$MC SCRATCH_RTDEV"
> -#  [ -z "$SCRATCH_MNT" ]    && MC="$MC SCRATCH_MNT"
> -#  [ -z "$SCRATCH_DEV" ]    && MC="$MC SCRATCH_DEV"
> -
>    [ -z "$EMAIL" ]          && MC="$MC EMAIL"
>    [ -z "$TEST_DIR" ]       && MC="$MC TEST_DIR"
>    [ -z "$TEST_DEV" ]       && MC="$MC TEST_DEV"
>  
> -  [ "$MC" ] && (echo "Warning: need to define parameters for host $HOST";\
> -             echo "       or set variables:"; \
> -             echo "       $MC")
> -#  if [ -e configs/$HOST.config ]
> -#     then echo "Not carring, we have a configfile ($HOST_CONFIG_DIR/$HOST)"
> -#  else
> -     [ "$MC" ] &&  exit 1
> -#  fi
> +  if [ -n "$MC" ]; then
> +    echo "Warning: need to define parameters for host $HOST"
> +    echo "       or set variables:"
> +    echo "       $MC"
> +    exit 1
> +  fi
>  }
>  
>  if [ -f "$HOST_OPTIONS" ]; then
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
> 

<Prev in Thread] Current Thread [Next in Thread>