Whamcloud - gitweb
Fixup readme a bit to reflect reality.
authoradilger <adilger>
Wed, 18 Sep 2002 16:51:42 +0000 (16:51 +0000)
committeradilger <adilger>
Wed, 18 Sep 2002 16:51:42 +0000 (16:51 +0000)
Add object type to test_getattr obdo, so it works with obdfilter.
Fix up threading again, for "asked-for-threads-but-not-running-threads" case.

lustre/tests/README
lustre/tests/runtests
lustre/utils/obd.c

index 2e50b8a..7b57867 100644 (file)
@@ -52,12 +52,13 @@ You can create a simple echo client by running the "llecho.sh" to
 run the tests locally (over TCP loopback), or edit llecho.sh to
 specify the SERVER and CLIENT names.  You would then set up as normal:
 
-    # for a single system, or for a remote server
+    # if you are using a remote server, first run:
     server# ../utils/lconf echo.xml
 
-Launch the test script via:
+Configure the client (or if you are running a single system only):
 
-    client# sh runregression-net.sh echo.xml
+    client# ../utils/lconf echo.xml
+    client# sh runregression-net.sh
 
 3. runtests
 
index c53596e..c883809 100755 (executable)
@@ -13,20 +13,19 @@ fail() {
 
 export PATH=/sbin:/usr/sbin:$SRCDIR:$PATH
 
-REFORMAT="--reformat"
 ERROR=
 SRC=/etc
 [ "$COUNT" ] || COUNT=1000
 
 [ "$LCONF" ] || LCONF=$SRCDIR/../utils/lconf
 
-OSCMT="`mount | awk '/ lustre_lite / { print $3 }'`"
+OSCMT="`mount | awk '/ lustre_lite / { print $3 }' | tail -1`"
 if [ -z "$OSCMT" ]; then
-       $LCONF $REFORMAT $@ || exit 1
+       [ -z "$*" ] && fail "usage: $0 [--reformat] <conf>.xml" 1
+       $LCONF $@ || exit 1
         trap "$LCONF --cleanup $@" 0
        OSCMT="`mount | awk '/ lustre_lite / { print $3 }'`"
-       [ -z "$OSCMT" ] && echo "no lustre filesystem mounted" 2>&1 && exit 1
-       exit $RC
+       [ -z "$OSCMT" ] && fail "no lustre filesystem mounted" 1
 fi
 
 # let's start slowly here...
index 3de5d60..24b59e5 100644 (file)
@@ -949,9 +949,11 @@ int jt_obd_test_getattr(int argc, char **argv)
         }
 
         if (argc >= 4) {
-                if (argv[3][0] == 't' && thread)
-                        objid = strtoull(argv[3] + 1, &end, 0) + thread - 1;
-                else
+                if (argv[3][0] == 't') {
+                        objid = strtoull(argv[3] + 1, &end, 0);
+                        if (thread)
+                                objid += thread - 1;
+                } else
                         objid = strtoull(argv[3], &end, 0);
                 if (*end) {
                         fprintf(stderr, "error: %s: invalid objid '%s'\n",
@@ -969,6 +971,7 @@ int jt_obd_test_getattr(int argc, char **argv)
 
         for (i = 1, next_count = verbose; i <= count; i++) {
                 data.ioc_obdo1.o_id = objid;
+                data.ioc_obdo1.o_mode = S_IFREG;
                 data.ioc_obdo1.o_valid = 0xffffffff;
                 rc = ioctl(fd, OBD_IOC_GETATTR, &data);
                 SHMEM_BUMP();
@@ -1022,9 +1025,10 @@ int jt_obd_test_brw(int argc, char **argv)
         }
 
         /* make each thread write to a different offset */
-        if (argv[1][0] == 't' && thread) {
-                thr_offset = thread - 1;
+        if (argv[1][0] == 't') {
                 count = strtoull(argv[1] + 1, &end, 0);
+                if (thread)
+                        thr_offset = thread - 1;
         } else
                 count = strtoull(argv[1], &end, 0);
 
@@ -1056,9 +1060,11 @@ int jt_obd_test_brw(int argc, char **argv)
                 }
         }
         if (argc >= 6) {
-                if (argv[5][0] == 't' && thread)
-                        objid = strtoull(argv[5] + 1, &end, 0) + thread - 1;
-                else
+                if (argv[5][0] == 't') {
+                        objid = strtoull(argv[5] + 1, &end, 0);
+                        if (thread)
+                                objid += thread - 1;
+                } else
                         objid = strtoull(argv[5], &end, 0);
                 if (*end) {
                         fprintf(stderr, "error: %s: bad objid '%s'\n",