[PATCH] xfstests: small common.config cleanup

Eric Sandeen sandeen at sandeen.net
Tue Jul 7 09:05:01 CDT 2009


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 at lst.de>

Looks ok to me:

Reviewed-by: Eric Sandeen <sandeen at sandeen.net>

> 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 at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 




More information about the xfs mailing list