From: adilger Date: Wed, 6 Jul 2005 06:33:10 +0000 (+0000) Subject: Branch b1_4 X-Git-Tag: v1_7_140~1^12~3^2~55^5~101 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=87e5ea8a5cda5ba0cab0f2a1cf2d982f1caf74d4;p=fs%2Flustre-release.git Branch b1_4 Fix up liblustre testing in acceptance-small.sh. Don't require that --target be specified if it is given in the environment. --- diff --git a/lustre/liblustre/tests/recovery_small.c b/lustre/liblustre/tests/recovery_small.c index 6cd9ba4..fcd6a7e 100644 --- a/lustre/liblustre/tests/recovery_small.c +++ b/lustre/liblustre/tests/recovery_small.c @@ -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) { diff --git a/lustre/liblustre/tests/replay_single.c b/lustre/liblustre/tests/replay_single.c index 9628354..a10d684 100644 --- a/lustre/liblustre/tests/replay_single.c +++ b/lustre/liblustre/tests/replay_single.c @@ -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) { diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c index acea41e..09fcd31 100644 --- a/lustre/liblustre/tests/sanity.c +++ b/lustre/liblustre/tests/sanity.c @@ -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) { diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh index 280f81d..3e2df74 100755 --- a/lustre/tests/acceptance-small.sh +++ b/lustre/tests/acceptance-small.sh @@ -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