Whamcloud - gitweb
Branch b1_4
authoradilger <adilger>
Wed, 6 Jul 2005 06:33:10 +0000 (06:33 +0000)
committeradilger <adilger>
Wed, 6 Jul 2005 06:33:10 +0000 (06:33 +0000)
Fix up liblustre testing in acceptance-small.sh.
Don't require that --target be specified if it is given in the environment.

lustre/liblustre/tests/recovery_small.c
lustre/liblustre/tests/replay_single.c
lustre/liblustre/tests/sanity.c
lustre/tests/acceptance-small.sh

index 6cd9ba4..fcd6a7e 100644 (file)
@@ -320,7 +320,7 @@ int main(int argc, char * argv[])
                 {0, 0, 0, 0}
         };
 
-        if (argc < 3)
+        if (argc < 3 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE)))
                 usage(argv[0]);
 
         while ((c = getopt_long(argc, argv, "s:", long_opts, &opt_index)) != -1) {
index 9628354..a10d684 100644 (file)
@@ -345,7 +345,7 @@ int main(int argc, char * const argv[])
                 {0, 0, 0, 0}
         };
 
-        if (argc < 4)
+        if (argc < 4 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE)))
                 usage(argv[0]);
 
         while ((c = getopt_long(argc, argv, "s:b:f:", long_opts, &opt_index)) != -1) {
index acea41e..09fcd31 100644 (file)
@@ -862,7 +862,8 @@ int main(int argc, char * const argv[])
                 {0, 0, 0, 0}
         };
 
-        if (argc <= 1)
+        if (argc <= 1 && getenv(ENV_LUSTRE_MNTTGT) == NULL &&
+                         getenv(ENV_LUSTRE_DUMPFILE) == NULL)
                 usage(argv[0]);
 
         while ((c = getopt_long(argc, argv, "", long_opts, &opt_index)) != -1) {
index 280f81d..3e2df74 100755 (executable)
@@ -24,7 +24,8 @@ fi
 [ "$DEBUG_OFF" ] || DEBUG_OFF="eval echo $DEBUG_LVL > /proc/sys/portals/debug"
 [ "$DEBUG_ON" ] || DEBUG_ON="eval echo -1 > /proc/sys/portals/debug"
 
-LIBLUSTRETESTS=${LIBLUSTRETESTS:-../liblustre/tests}
+LIBLUSTRE=${LIBLUSTRE:-../liblustre}
+LIBLUSTRETESTS=${LIBLUSTRETESTS:-$LIBLUSTRE/tests}
 
 for NAME in $CONFIGS; do
        export NAME MOUNT START CLEAN
@@ -154,8 +155,10 @@ for NAME in $CONFIGS; do
        if [ "$LIBLUSTRE" != "no" ]; then
                mount | grep $MOUNT || sh llmount.sh
                IPADDR=`ping -c 1 $MDSNODE|head -n 1|sed -e "s/[^(]*(//" -e "s/).*//"`
-               export ENV_LUSTRE_MNTPNT=$MOUNT2
-               export ENV_LUSTRE_MNTTGT=$IPADDR:/$MDSNAME/$CLIENT
+               export LIBLUSTRE_MOUNT_POINT=$MOUNT2
+               export LIBLUSTRE_MOUNT_TARGET=$IPADDR:/$MDSNAME/$CLIENT
+               export LIBLUSTRE_TIMEOUT=`cat /proc/sys/lustre/timeout`
+               export LIBLUSTRE_DEBUG_MASK=`cat /proc/sys/portals/debug`
                if [ -x $LIBLUSTRETESTS/sanity ]; then
                        $LIBLUSTRETESTS/sanity --target=$ENV_LUSTRE_MNTTGT
                fi