xfs qa changes to get thinks working on irix
authorTim Shimmin <tes@sgi.com>
Tue, 10 Aug 2004 03:55:47 +0000 (03:55 +0000)
committerTim Shimmin <tes@sgi.com>
Tue, 10 Aug 2004 03:55:47 +0000 (03:55 +0000)
add verbosity to a file for debugging
reduce iteration count

013
074
080
083
084
084.out
091
common.attr
common.log
ltp/fsstress.c
src/global.h

diff --git a/013 b/013
index 2e0d74e160bceb7b5fcad8069759e4821e765b4e..2d0c71c7a4bb4a3ed405aa5778d09a08c8ffb83a 100755 (executable)
--- a/013
+++ b/013
@@ -84,9 +84,9 @@ _do_test()
     echo "-----------------------------------------------"
     echo "fsstress.$_n : $_param"
     echo "-----------------------------------------------"
-    # -v >$tmp.out
     # -m limits number of users/groups so check doesn't fail (malloc) later
-    if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -m 8 -n $_count -d $out >/dev/null 2>&1
+    dbgoutfile=$seq.full
+    if ! $here/ltp/fsstress $_param $FSSTRESS_AVOID -v -m 8 -n $_count -d $out >>$dbgoutfile 2>&1
     then
         echo "    fsstress (count=$_count) returned $? - see $seq.full"
         
@@ -111,7 +111,7 @@ _setup_testdir
 rm -f $here/$seq.full
 echo "brevity is wit..."
 
-count=2000
+count=1000
 procs=20
 
 _check_test_fs
@@ -128,6 +128,9 @@ _do_test 2 "-p $procs -r" $count
 
 _do_test 3 "-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20" $count
 
+# if all ok by here then probably don't need $seq.full
+rm -f $seq.full
+
 exit
 
 # Test with error injection:
diff --git a/074 b/074
index 6d0876ecdf61b513d3e879f60e94c634a13d984b..dacfb6cedc80e1cd0136096196a8e31d876da7b6 100755 (executable)
--- a/074
+++ b/074
@@ -134,7 +134,7 @@ _supported_os IRIX Linux
 # so we set them differently for different machines
 #
 if [ $HOSTOS == "IRIX" ]; then 
-    if uname -R | grep -i debug; then 
+    if uname -R | grep -iq debug; then 
         # e.g. getting around 37secs for 1,1,1 on IP30 debug
        numchildren=2
        numloops=1
diff --git a/080 b/080
index acc5fd8e4a25c687f880afc7bd442193cd0880fd..1269436beefee41c9f042166b87b5a08a589411a 100755 (executable)
--- a/080
+++ b/080
@@ -64,6 +64,8 @@ _supported_fs xfs
 # It does not work on Linux due to some locking issues...
 _supported_os IRIX
 
+[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
+
 _setup_testdir
 
 #quiet=-q
diff --git a/083 b/083
index c2300e7c336f84cbf50ea8bf2ac370e633e5e0cd..cc1c5017c06713490e4141d1224c196e0de5060e 100755 (executable)
--- a/083
+++ b/083
@@ -7,6 +7,12 @@
 # full boundary due to the fact that we will retry allocation
 # several times after flushing, before giving back ENOSPC.
 #
+# Note that this test will intentionally cause console msgs of form:
+#     dksc0d1s4: Process [fsstress] ran out of disk space
+#     dksc0d1s4: Process [fsstress] ran out of disk space
+#     dksc0d1s4: Process [fsstress] ran out of disk space
+#
+
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
@@ -75,6 +81,7 @@ workout()
        fsz=$1
        ags=$2
        procs=$3
+       nops=$4
 
        umount $SCRATCH_DEV >/dev/null 2>&1
        echo "*** mkfs -dsize=$fsz,agcount=$ags"    >>$seq.full
@@ -84,16 +91,26 @@ workout()
        _scratch_mount                              >>$seq.full 2>&1 \
                || _fail "mount failed"
 
-       ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n 10000 $FSSTRESS_AVOID \
+       # -w ensures that the only ops are ones which cause write I/O
+       ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
                >>$seq.full
        _check_scratch_fs
 }
 
 echo "*** test out-of-space handling for random write operations"
 
-# args: filesystem size/ag count/number fsstress processes
+filesize=100m
+agcount=6
+numprocs=15
+
+if [ $HOSTOS = "IRIX" ]; then
+    # for 10000 ops was taking 30mins on my IRIX box
+    numops=1000
+else
+    numops=10000
+fi
 
-workout 100m 6 15
+workout $filesize $agcount $numprocs $numops
 
 echo "*** done"
 status=0
diff --git a/084 b/084
index 99ddc3673c5223d4abb20418979d731c54e77932..d1f859f278b5755865144d130dd6005cb9c7f34a 100755 (executable)
--- a/084
+++ b/084
@@ -53,7 +53,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 _filter_resv()
 {
-       sed -e "s,$TEST_DIR/resv,[TESTFILE],g"
+       sed -e "s,$TEST_DIR/resv,[TESTFILE],g" \
+           -e 's/[0-9][0-9]* bytes/NUM bytes/g'
 }
 
 pgsize=`$here/src/feature -p`
@@ -67,6 +68,14 @@ pgsize=`$here/src/feature -p`
 _supported_fs xfs
 _supported_os IRIX Linux
 
+if [ $HOSTOS == "IRIX" ]; then 
+    if uname -R | grep -iq debug; then 
+        # taking up to 23 mins on my 512K octane on debug
+        # not worth worrying about
+       _notrun "don't bother running on debug IRIX"
+    fi
+fi
+
 echo
 echo "*** First case - I/O blocksize same as pagesize"
 $here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
diff --git a/084.out b/084.out
index 02d15b194017d1c665ecf0205d784670647df621..efaf4a2906e8ab46276546ea2be9e2db750aff53 100644 (file)
--- a/084.out
+++ b/084.out
@@ -1,9 +1,9 @@
 QA output created by 084
 
 *** First case - I/O blocksize same as pagesize
-reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64
+reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
 done
 
 *** Second case - 512 byte I/O blocksize
-reserved 40960000 bytes for [TESTFILE] using XFS_IOC_RESVSP64
+reserved NUM bytes for [TESTFILE] using XFS_IOC_RESVSP64
 done
diff --git a/091 b/091
index be5f6eb077b74b10f61c08d092e12e97cd00d4fe..659b0eab679342b318bcaf99ebff703277e4573e 100755 (executable)
--- a/091
+++ b/091
@@ -54,6 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux IRIX
 
+[ $HOSTOS == IRIX ] && _notrun "Not working on IRIX yet"
+
 rm -f $seq.full
 
 run_fsx()
index 9bf1e4003512ab0a0f1fb0adf85c7407b8b21aff..c3b3578da5974b8999991d4acff698ec64c13e00 100644 (file)
@@ -74,6 +74,18 @@ _acl_ls()
     ls -ln $* | awk '{ print $1, $3, $4, $NF }' | _acl_filter_id
 } 
 
+#
+_acl_list()
+{
+    _file1=$1
+
+    if [ $HOSTOS = "IRIX" ]; then
+       ls -D $_file1 | _acl_filter_id
+    else 
+        chacl -l $_file1 | _acl_filter_id
+    fi
+}
+
 # create an ACL with n ACEs in it
 #
 _create_n_aces()
index 84af5860abac9ad970e8af9f9f3df8009327387b..3f277db5115e97492a39afd3bde1316dd7e52843 100644 (file)
@@ -398,11 +398,11 @@ _cmp_output()
 _process_op_diff()
 {
     $AWK_PROG <$1 '
-       BEGIN { num_splits = 1 }
+       BEGIN { num_splits = 1; max_splits = 50 }
        /^[0-9]/ {
 
                # ensure a split happened in previous difference
-               if (num_splits < 1 || num_splits > 3) {
+               if (num_splits < 1 || num_splits > max_splits) {
                        print num_splits, " split(s) found prior to diff cmd: ", $0
                        num_splits = 1 # shut-up end condition
                        exit 1
@@ -417,7 +417,7 @@ _process_op_diff()
        }
        { next }
        END { 
-               if (num_splits < 1 || num_splits > 3) {
+               if (num_splits < 1 || num_splits > max_splits) {
                        print num_splits, " split(s) found prior to diff end"
                        exit 1
                }
index b19e4e2017758633f7bdf6a1d038cbef1fb0aaf6..e787f101464bf52d6071588d2979c031b03ebd4c 100644 (file)
 #define XFS_ERRTAG_MAX         17
 #define XFS_IDMODULO_MAX       32
 
+/* was (getpagesize()*32) BUT want it to be same
+ * on all platforms
+ */
+#define FILELEN_MAX            (32*4096)
+
 typedef enum {
        OP_ALLOCSP,
        OP_ATTR_REMOVE,
@@ -1737,7 +1742,7 @@ dread_f(int opno, long r)
        off = (off64_t)(lr % stb.st_size);
        off -= (off % align);
        lseek64(fd, off, SEEK_SET);
-       len = (random() % (getpagesize() * 32)) + 1;
+       len = (random() % FILELEN_MAX) + 1;
        len -= (len % align);
        if (len <= 0)
                len = align;
@@ -1807,7 +1812,7 @@ dwrite_f(int opno, long r)
        off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
        off -= (off % align);
        lseek64(fd, off, SEEK_SET);
-       len = (random() % (getpagesize() * 32)) + 1;
+       len = (random() % FILELEN_MAX) + 1;
        len -= (len % align);
        if (len <= 0)
                len = align;
@@ -2139,7 +2144,7 @@ read_f(int opno, long r)
        lr = ((__int64_t)random() << 32) + random();
        off = (off64_t)(lr % stb.st_size);
        lseek64(fd, off, SEEK_SET);
-       len = (random() % (getpagesize() * 32)) + 1;
+       len = (random() % FILELEN_MAX) + 1;
        buf = malloc(len);
        e = read(fd, buf, len) < 0 ? errno : 0;
        free(buf);
@@ -2539,7 +2544,7 @@ write_f(int opno, long r)
        off = (off64_t)(lr % MIN(stb.st_size + (1024 * 1024), MAXFSIZE));
        off %= maxfsize;
        lseek64(fd, off, SEEK_SET);
-       len = (random() % (getpagesize() * 32)) + 1;
+       len = (random() % FILELEN_MAX) + 1;
        buf = malloc(len);
        memset(buf, nameseq & 0xff, len);
        e = write(fd, buf, len) < 0 ? errno : 0;
index 4680ef3677d8f6175699829f70763cce8dfd513c..abe3f18eaf6ed6a267a4a1054e1852d7ab5d0e5b 100644 (file)
@@ -239,7 +239,8 @@ xfsctl(char* path, int fd, int cmd, void* arg) {
     return syssgi(SGI_FS_BULKSTAT, fd, 
                  ((xfs_fsop_bulkreq_t*)arg)->lastip,
                  ((xfs_fsop_bulkreq_t*)arg)->icount,
-                 ((xfs_fsop_bulkreq_t*)arg)->ubuffer);
+                 ((xfs_fsop_bulkreq_t*)arg)->ubuffer,
+                 ((xfs_fsop_bulkreq_t*)arg)->ocount);
   else if (cmd == SGI_FS_BULKSTAT_SINGLE)
     return syssgi(SGI_FS_BULKSTAT_SINGLE, fd, 
                  ((xfs_fsop_bulkreq_t*)arg)->lastip,