xfs
[Top] [All Lists]

[PATCH] xfstests: small common.config cleanup

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfstests: small common.config cleanup
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sat, 20 Jun 2009 13:38:18 -0400
User-agent: Mutt/1.5.18 (2008-05-17)
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>

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

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] xfstests: small common.config cleanup, Christoph Hellwig <=