Fixed merge problems
authorptools <ptools>
Tue, 15 Jun 2004 07:32:36 +0000 (07:32 +0000)
committerptools <ptools>
Tue, 15 Jun 2004 07:32:36 +0000 (07:32 +0000)
144 files changed:
001
002
003
004
005
005.out
006
007
008
009
010
010.out
011
012
013
014
014.out
015
016
017
018
020
022
022.out [deleted file]
023
023.out [deleted file]
024
025
025.out
026
027
027.out
028
028.out
029
030
030.out [deleted file]
031
031.out [deleted file]
032
033
033.out [deleted file]
034
035
036
036.out [deleted file]
037
038
039
039.out [deleted file]
042
043
043.out [deleted file]
044
045
046
047
047.out
048
049
050
051
052
053
054
055
055.out [deleted file]
056
057
058
059
060
061
061.out
062
063
064
064.out
065
066
067
068
069
070
071
071.out
072
073
074
074.out
075
076
077
078
079
080
081
082
083
084
086
087
088
089
Makefile
common
common.attr
common.config
common.filter
common.log
common.rc
configure.in
include/Makefile
include/builddefs.in
include/buildmacros
lib/databin.c
lib/tlibio.c
lib/write_log.c
ltp/Makefile
ltp/doio.c
ltp/fsstress.c
ltp/fsx.c
ltp/growfiles.c
ltp/iogen.c
ltp/rwtest.sh
m4/package_gdbmdev.m4
m4/package_utilies.m4
src/acl_test.c
src/alloc.c
src/bstat.c
src/dbtest.c
src/devzero.c
src/dirstress.c
src/fault.c
src/feature.c
src/fill2.c
src/fstest.c
src/global.h
src/godown.c
src/lstat64.c
src/randholes.c
src/runas.c
src/truncfile.c
src/xfsctl.c

diff --git a/001 b/001
index 1e3ad196c519b789734f02af12527d16cf39fe1c..d3afff56a6b754bf4fd14201d4ab0ea63c3a96dd 100755 (executable)
--- a/001
+++ b/001
@@ -1,9 +1,8 @@
 #! /bin/sh
 #! /bin/sh
-#
-# XFS QA Test No. 001
+# FS QA Test No. 001
 #
 # Random file copier to produce chains of identical files so the head
 #
 # Random file copier to produce chains of identical files so the head
-# and the tail cna be diff'd at then end of each iteration.
+# and the tail can be diff'd at the end of each iteration.
 #
 # Exercises creat, write and unlink for a variety of directory sizes, and
 # checks for data corruption.
 #
 # Exercises creat, write and unlink for a variety of directory sizes, and
 # checks for data corruption.
@@ -62,8 +61,11 @@ done_cleanup=false
 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
 trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
 
 verbose=true
 
 verbose=true
+verify=$here/verify_fill
 
 if [ $# -eq 0 ]
 then
 
 if [ $# -eq 0 ]
 then
@@ -127,17 +129,18 @@ else
 fi
 
 ncopy=200              # number of file copies in the chain step
 fi
 
 ncopy=200              # number of file copies in the chain step
+udf_fsize=20240                # number of sectors for UDF
 
 _setup()
 {
 
 _setup()
 {
-    if mkdir -p $TEST_DIR/$$
+    if mkdir -p $testdir/$$
     then
        :
     else
     then
        :
     else
-       echo "Error: cannot mkdir \"$TEST_DIR/$$\""
+       echo "Error: cannot mkdir \"$testdir/$$\""
        exit 1
     fi
        exit 1
     fi
-    cd $TEST_DIR/$$
+    cd $testdir/$$
 
     $verbose && echo -n "setup "
     sed -e '/^#/d' $tmp.config \
 
     $verbose && echo -n "setup "
     sed -e '/^#/d' $tmp.config \
@@ -202,12 +205,14 @@ _mark_iteration()
 #
 _chain()
 {
 #
 _chain()
 {
-    $AWK_PROG <$tmp.config '
+    $AWK_PROG -v full_file=$here/$seq.full -v verify=$verify <$tmp.config '
 BEGIN  { nfile = 0 }
 /^\#/  { next }
        { file[nfile] = $1
 BEGIN  { nfile = 0 }
 /^\#/  { next }
        { file[nfile] = $1
+         size[nfile] = $2
          link[nfile] = 0
          nfile++
          link[nfile] = 0
          nfile++
+         total_size += $2
        }
 END    { srand('$iter')
          for (i=0; i < '$ncopy'; i++) {
        }
 END    { srand('$iter')
          for (i=0; i < '$ncopy'; i++) {
@@ -216,28 +221,39 @@ END       { srand('$iter')
            while (j < 0 || j >= nfile)
                j = int(rand() * nfile)
            if (link[j] == 0) {
            while (j < 0 || j >= nfile)
                j = int(rand() * nfile)
            if (link[j] == 0) {
+               # previous should already exist and next one should not exist
                printf "if [ ! -f %s ]; then echo \"%s missing!\"; exit; fi\n",file[j],file[j]
                printf "if [ -f %s.0 ]; then echo \"%s.0 already present!\"; exit; fi\n",file[j],file[j]
                printf "if [ ! -f %s ]; then echo \"%s missing!\"; exit; fi\n",file[j],file[j]
                printf "if [ -f %s.0 ]; then echo \"%s.0 already present!\"; exit; fi\n",file[j],file[j]
-               printf "cp %s %s.0\n",file[j],file[j]
+               printf "cp %s %s.0 || exit 1\n",file[j],file[j]
+               printf "ls -i %s.0\n", file[j] >full_file;
+               total_size += size[j]
+               printf "# total size = %d\n", total_size 
            }
            else {
            }
            else {
+               # previous should already exist and next one should not exist
                printf "if [ ! -f %s.%d ]; then echo \"%s.%d missing!\"; exit; fi\n",file[j],link[j]-1,file[j],link[j]-1
                printf "if [ -f %s.%d ]; then echo \"%s.%d already present!\"; exit; fi\n",file[j],link[j],file[j],link[j]
                printf "if [ ! -f %s.%d ]; then echo \"%s.%d missing!\"; exit; fi\n",file[j],link[j]-1,file[j],link[j]-1
                printf "if [ -f %s.%d ]; then echo \"%s.%d already present!\"; exit; fi\n",file[j],link[j],file[j],link[j]
-               printf "cp %s.%d %s.%d\n",file[j],link[j]-1,file[j],link[j]
+               printf "cp %s.%d %s.%d || exit 1\n",file[j],link[j]-1,file[j],link[j]
+               printf "ls -i %s.%d\n", file[j], link[j] >full_file;
+               total_size += size[j]
+               printf "# total size = %d\n", total_size 
            }
            link[j]++
          }
            }
            link[j]++
          }
-         # close all the chains, and remove all of the files except
-         # the head of the chain
+         # close all the chains, 
+         # if have at least one copy then move the last copy to "file[j].last"
+         # and remove all of the other files except the head of the chain
          for (j=0; j<nfile; j++) {
          for (j=0; j<nfile; j++) {
-           if (link[j] > 0)
+           if (link[j] > 0) {
                printf "mv %s.%d %s.last\n",file[j],link[j]-1,file[j]
                printf "mv %s.%d %s.last\n",file[j],link[j]-1,file[j]
+               printf "ls -i %s.last\n", file[j] >full_file;
+           }
            for (i=0; i<link[j]-1; i++) {
                printf "rm -f %s.%d\n",file[j],i
            }
          }
        }' \
            for (i=0; i<link[j]-1; i++) {
                printf "rm -f %s.%d\n",file[j],i
            }
          }
        }' \
-       | sh
+       | tee -a $here/$seq.full | sh
 }
 
 _check()
 }
 
 _check()
@@ -247,6 +263,7 @@ _check()
     sed -e '/^#/d' $tmp.config \
     | while read file nbytes
     do
     sed -e '/^#/d' $tmp.config \
     | while read file nbytes
     do
+       # the file is never removed so it should exist
        if [ ! -f $file ]
        then
            $verbose && echo
        if [ ! -f $file ]
        then
            $verbose && echo
@@ -254,6 +271,7 @@ _check()
            touch $tmp.bad
            continue
        fi
            touch $tmp.bad
            continue
        fi
+       # checks that the file and its last copy are the same
        if [ -f $file.last ]
        then
            if cmp $file $file.last >/dev/null 2>&1
        if [ -f $file.last ]
        then
            if cmp $file $file.last >/dev/null 2>&1
@@ -283,16 +301,19 @@ _cleanup()
     then
        $verbose && echo "cleanup"
        cd /
     then
        $verbose && echo "cleanup"
        cd /
-       rm -rf $TEST_DIR/$$
+       rm -rf $testdir/$$
+       _cleanup_testdir
        done_cleanup=true
     fi
 }
 
        done_cleanup=true
     fi
 }
 
+rm -f $here/$seq.full
 status=0
 _cleanup
 status=1
 done_cleanup=false
 
 status=0
 _cleanup
 status=1
 done_cleanup=false
 
+_setup_testdir
 _setup
 
 # do the test
 _setup
 
 # do the test
@@ -300,6 +321,7 @@ _setup
 for iter in 1 2 3 4 5
 do
     echo -n "iter $iter chain ... "
 for iter in 1 2 3 4 5
 do
     echo -n "iter $iter chain ... "
+    echo "iter $iter" >> $here/$seq.full
     _chain
     _check
     if [ -f $tmp.bad ]
     _chain
     _check
     if [ -f $tmp.bad ]
diff --git a/002 b/002
index cc9dd1b65001454c5ceb88c3befb6724d44339ad..d3755e9bbcc5c5fbebec3b055d974ee33800fbf2 100755 (executable)
--- a/002
+++ b/002
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
 #! /bin/sh
 #
-# XFS QA Test No. 002
+# FS QA Test No. 002
 #
 # simple inode link count test for a regular file
 #
 #
 # simple inode link count test for a regular file
 #
@@ -49,38 +49,48 @@ echo "QA output created by $seq"
 tmp=/tmp/$$
 here=`pwd`
 status=0       # success is the default!
 tmp=/tmp/$$
 here=`pwd`
 status=0       # success is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+    rm -f $tmp.*
+    _cleanup_testdir
+}
 
 # real QA test starts here
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 echo "Silence is goodness ..."
 
 # ensure target directory exists
 
 echo "Silence is goodness ..."
 
 # ensure target directory exists
-mkdir `dirname $TEST_DIR/$tmp` 2>/dev/null
+mkdir `dirname $testdir/$tmp` 2>/dev/null
 
 
-touch $TEST_DIR/$tmp.1
+touch $testdir/$tmp.1
 for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 do
 for l in 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
 do
-    ln $TEST_DIR/$tmp.1 $TEST_DIR/$tmp.$l
-    x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
+    ln $testdir/$tmp.1 $testdir/$tmp.$l
+    x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
     if [ "$l" -ne $x ]
     then
        echo "Arrgh, created link #$l and lstat64 looks like ..."
     if [ "$l" -ne $x ]
     then
        echo "Arrgh, created link #$l and lstat64 looks like ..."
-       src/lstat64 $TEST_DIR/$tmp.1
+       src/lstat64 $testdir/$tmp.1
        status=1
     fi
 done
 
 for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
 do
        status=1
     fi
 done
 
 for l in 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1
 do
-    x=`src/lstat64 $TEST_DIR/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
+    x=`src/lstat64 $testdir/$tmp.1 | sed -n -e '/ Links: /s/.*Links: *//p'`
     if [ "$l" -ne $x ]
     then
        echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
     if [ "$l" -ne $x ]
     then
        echo "Arrgh, about to remove link #$l and lstat64 looks like ..."
-       src/lstat64 $TEST_DIR/$tmp.1
+       src/lstat64 $testdir/$tmp.1
        status=1
     fi
        status=1
     fi
-    rm -f $TEST_DIR/$tmp.$l
+    rm -f $testdir/$tmp.$l
 done
 
 # success, all done
 done
 
 # success, all done
diff --git a/003 b/003
index 3322b077e567e9a6e13995991a3483e9db60be43..45d14f8674a8883b9211fecb4c4f64349334982d 100755 (executable)
--- a/003
+++ b/003
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
 #! /bin/sh
 #
-# XFS QA Test No. 003
+# FS QA Test No. 003
 #
 # exercise xfs_db bug #784078
 #
 #
 # exercise xfs_db bug #784078
 #
@@ -54,8 +54,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 _need_to_be_root
 
 # real QA test starts here
 _need_to_be_root
 
 # real QA test starts here
-
-PATH=".:$PATH"
+_supported_fs xfs
+_supported_os IRIX Linux
 
 [ -f core ] && rm -f core
 [ -f core ] && echo "Warning: can't nuke existing core file!"
 
 [ -f core ] && rm -f core
 [ -f core ] && echo "Warning: can't nuke existing core file!"
diff --git a/004 b/004
index 65e8a1de8249dfd8d668f346317d16c7cab6190a..945d41cb7edaf88234177f43ee9fd1263a18c897 100755 (executable)
--- a/004
+++ b/004
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 004
+# FS QA Test No. 004
 #
 # exercise xfs_db bug #789674 and other freesp functionality
 #
 #
 # exercise xfs_db bug #789674 and other freesp functionality
 #
@@ -57,7 +57,7 @@ _populate_scratch()
 {
        echo "=== mkfs output ===" >>$seq.full
        _scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
 {
        echo "=== mkfs output ===" >>$seq.full
        _scratch_mkfs_xfs | tee -a $seq.full | _filter_mkfs 2>$tmp.mkfs
-       source $tmp.mkfs
+       . $tmp.mkfs
        _scratch_mount
        dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
        dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
        _scratch_mount
        dd if=/dev/zero of=$SCRATCH_MNT/foo count=200 bs=4096 >/dev/null 2>&1 &
        dd if=/dev/zero of=$SCRATCH_MNT/goo count=400 bs=4096 >/dev/null 2>&1 &
@@ -72,17 +72,22 @@ _populate_scratch()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _need_to_be_root
 _require_scratch
 _require_nobigloopfs
 
 _need_to_be_root
 _require_scratch
 _require_nobigloopfs
 
-# real QA test starts here
 rm -f $seq.full
 
 _populate_scratch
 
 rm -f $seq.full
 
 _populate_scratch
 
-eval `df -P -T --block-size=512 $SCRATCH_MNT 2>&1 \
-       | $AWK_PROG 'END { printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'`
+[ "$HOSTOS" = "Linux" ] && DF_PROG="$DF_PROG -P --block-size=512"
+
+eval `$DF_PROG $SCRATCH_MNT 2>&1 \
+       | tail -1 | $AWK_PROG '{ printf "blocks=%u used=%u avail=%u\n", $3, $4, $5 }'`
 echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seq.full
 echo "blocksize from mkfs is '$dbsize'" >>$seq.full
 
 echo "df gave: blocks=$blocks used=$used avail=$avail" >>$seq.full
 echo "blocksize from mkfs is '$dbsize'" >>$seq.full
 
diff --git a/005 b/005
index 5b2878c11f6c71d37d1f2bfad472ae6bbda4078a..276df0fa910644f753e4b02d658c70aa092af98c 100755 (executable)
--- a/005
+++ b/005
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 005
+# FS QA Test No. 005
 #
 # Test symlinks & ELOOP
 #
 #
 # Test symlinks & ELOOP
 #
@@ -39,7 +39,7 @@
 owner=dxm@sgi.com
 
 #
 owner=dxm@sgi.com
 
 #
-# note ELOOP limit used to be 32 but changed to 8. Who know what
+# note ELOOP limit used to be 32 but changed to 8. Who knows what
 # it might be next.
 #
 
 # it might be next.
 #
 
@@ -53,8 +53,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    cd $TEST_DIR
+    cd $testdir
     rm -f symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
     rm -f symlink_{0,1,2,3}{0,1,2,3,4,5,6,7,8,9} symlink_self empty_file
+    cd /
+    _cleanup_testdir
 }
 
 _touch()
 }
 
 _touch()
@@ -70,9 +72,16 @@ _touch()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 
-cd $TEST_DIR
+cd $testdir
 
 o=empty_file
 _touch $o
 
 o=empty_file
 _touch $o
@@ -92,4 +101,6 @@ echo "*** touch recusive symlinks"
 echo ""
 _touch symlink_self
 
 echo ""
 _touch symlink_self
 
+
+
 exit
 exit
diff --git a/005.out b/005.out
index e8e37be0c06974f8c1793ed13ec3c2d3b0d675e6..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/005.out
+++ b/005.out
@@ -1,42 +0,0 @@
-QA output created by 005
-*** touch deep symlinks
-
-touch: symlink_05: Too many levels of symbolic links
-touch: symlink_06: Too many levels of symbolic links
-touch: symlink_07: Too many levels of symbolic links
-touch: symlink_08: Too many levels of symbolic links
-touch: symlink_09: Too many levels of symbolic links
-touch: symlink_10: Too many levels of symbolic links
-touch: symlink_11: Too many levels of symbolic links
-touch: symlink_12: Too many levels of symbolic links
-touch: symlink_13: Too many levels of symbolic links
-touch: symlink_14: Too many levels of symbolic links
-touch: symlink_15: Too many levels of symbolic links
-touch: symlink_16: Too many levels of symbolic links
-touch: symlink_17: Too many levels of symbolic links
-touch: symlink_18: Too many levels of symbolic links
-touch: symlink_19: Too many levels of symbolic links
-touch: symlink_20: Too many levels of symbolic links
-touch: symlink_21: Too many levels of symbolic links
-touch: symlink_22: Too many levels of symbolic links
-touch: symlink_23: Too many levels of symbolic links
-touch: symlink_24: Too many levels of symbolic links
-touch: symlink_25: Too many levels of symbolic links
-touch: symlink_26: Too many levels of symbolic links
-touch: symlink_27: Too many levels of symbolic links
-touch: symlink_28: Too many levels of symbolic links
-touch: symlink_29: Too many levels of symbolic links
-touch: symlink_30: Too many levels of symbolic links
-touch: symlink_31: Too many levels of symbolic links
-touch: symlink_32: Too many levels of symbolic links
-touch: symlink_33: Too many levels of symbolic links
-touch: symlink_34: Too many levels of symbolic links
-touch: symlink_35: Too many levels of symbolic links
-touch: symlink_36: Too many levels of symbolic links
-touch: symlink_37: Too many levels of symbolic links
-touch: symlink_38: Too many levels of symbolic links
-touch: symlink_39: Too many levels of symbolic links
-
-*** touch recusive symlinks
-
-touch: symlink_self: Too many levels of symbolic links
diff --git a/006 b/006
index 8df4662cc5645eb9568d4b1c700868e72ce4f747..08d605f2f42651b4c3ffa8c9de43a3050a924460 100755 (executable)
--- a/006
+++ b/006
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 006
+# FS QA Test No. 006
 #
 # permname
 #
 #
 # permname
 #
@@ -48,7 +48,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/permname.$$
+    cd /
+    rm -f $tmp.*
+    rm -rf $testdir/permname.$$
+    _cleanup_testdir
 }
 
 _count()
 }
 
 _count()
@@ -65,23 +68,26 @@ _count()
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
 
 
+_setup_testdir
 
 
-mkdir $TEST_DIR/permname.$$
+mkdir $testdir/permname.$$
 
 echo ""
 echo "single thread permname"
 echo "----------------------"
 
 echo ""
 echo "single thread permname"
 echo "----------------------"
-mkdir $TEST_DIR/permname.$$/a
-cd $TEST_DIR/permname.$$/a
+mkdir $testdir/permname.$$/a
+cd $testdir/permname.$$/a
 $here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
 find . | _count
 
 echo ""
 echo "multi thread permname"
 echo "----------------------"
 $here/src/permname -c 4 -l 6 -p 1 || echo "permname returned $?"
 find . | _count
 
 echo ""
 echo "multi thread permname"
 echo "----------------------"
-mkdir $TEST_DIR/permname.$$/b
-cd $TEST_DIR/permname.$$/b
+mkdir $testdir/permname.$$/b
+cd $testdir/permname.$$/b
 $here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
 find . | _count
 
 $here/src/permname -c 4 -l 6 -p 4 || echo "permname returned $?"
 find . | _count
 
diff --git a/007 b/007
index f8e7aac53a182de8eae3191fc241f48dd43a15fc..411d7480693053547a2bc69885627f751e0b37df 100755 (executable)
--- a/007
+++ b/007
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 007
+# FS QA Test No. 007
 #
 # drive the src/nametest program
 # which does a heap of open(create)/unlink/stat
 #
 # drive the src/nametest program
 # which does a heap of open(create)/unlink/stat
@@ -51,8 +51,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     rm -f $tmp.*
     rm -f $tmp.*
-    rm -rf $TEST_DIR/$seq
+    rm -rf $testdir/$seq
+    _cleanup_testdir
 }
 
 # get standard environment, filters and checks
 }
 
 # get standard environment, filters and checks
@@ -60,6 +62,11 @@ _cleanup()
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
+
 status=1 # default failure 
 sourcefile=$tmp.nametest
 seed=1
 status=1 # default failure 
 sourcefile=$tmp.nametest
 seed=1
@@ -74,16 +81,10 @@ while [ $i -le $num_filenames ]; do
   i=`expr $i + 1`
 done
 
   i=`expr $i + 1`
 done
 
-mkdir $TEST_DIR/$seq
-cd $TEST_DIR/$seq
+mkdir $testdir/$seq
+cd $testdir/$seq
 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
 
 $here/src/nametest -l $sourcefile -s $seed -i $iterations -z
 
-
-#optional stuff if your test has verbose output to help resolve problems
-#echo
-#echo "If failure, check $seq.full (this) and $seq.full.ok (reference)"
-
-
 # success, all done
 status=0
 exit
 # success, all done
 status=0
 exit
diff --git a/008 b/008
index fae262468ef7a9f2eb00b67193ea176ace8b75e0..d63b908d17182b96b5d6fb4432846f3639dbae90 100755 (executable)
--- a/008
+++ b/008
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 008
+# FS QA Test No. 008
 #
 # randholes test
 #
 #
 # randholes test
 #
@@ -45,11 +45,13 @@ here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 pgsize=`$here/src/feature -p`
 tmp=/tmp/$$
 status=0       # success is the default!
 pgsize=`$here/src/feature -p`
-trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/randholes.$$.*
+    rm -f $tmp.*
+    rm -rf $testdir/randholes.$$.*
+    _cleanup_testdir
 }
 
 _filter()
 }
 
 _filter()
@@ -67,7 +69,7 @@ _do_test()
     _holes="$2"
     _param="$3"
     
     _holes="$2"
     _param="$3"
     
-    out=$TEST_DIR/randholes.$$.$_n
+    out=$testdir/randholes.$$.$_n
     echo ""
     echo "randholes.$_n : $_param" | _filter
     echo "------------------------------------------"
     echo ""
     echo "randholes.$_n : $_param" | _filter
     echo "------------------------------------------"
@@ -92,6 +94,10 @@ _do_test()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 rm -f $here/$seq.out.full
 
 
 rm -f $here/$seq.out.full
 
diff --git a/009 b/009
index ecc4b45d6b930c708b39d3550d9cc43fc645f870..eefd453dd0f8e58f4fead4d6e05b457e67e78736 100755 (executable)
--- a/009
+++ b/009
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 009
+# FS QA Test No. 009
 #
 # alloc test
 #
 #
 # alloc test
 #
@@ -90,6 +90,8 @@ _filesize()
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_scratch
 
 
 _require_scratch
 
diff --git a/010 b/010
index 6bec623e142bf06ebaa7fd717fce15e32b6fdd95..72ecec81ac09fad751528b1c0cb9c3a54c4db30d 100755 (executable)
--- a/010
+++ b/010
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 010
+# FS QA Test No. 010
 #
 # dbtest
 #
 #
 # dbtest
 #
@@ -44,12 +44,15 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -f $TEST_DIR/DBtest*.{pag,dir}
+    cd /
+    rm -f $tmp.*
+    rm -f $testdir/DBtest*.{pag,dir}
+    _cleanup_testdir
 }
 }
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 # filter random number output from dbtest
 #
 
 # filter random number output from dbtest
 #
@@ -64,11 +67,29 @@ _filter_dbtest()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# link correct .out file
+_link_out_file $seq.out
+
+# put operating system in $os
+_get_os
+
 [ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
 
 # real QA test starts here
 [ -x $here/src/dbtest ] || _notrun "dbtest was not built for this platform"
 
 # real QA test starts here
-cd $TEST_DIR
-$here/src/dbtest -l 5 -n 3000 | _filter_dbtest
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
+
+rm -f $seq.full
+
+cd $testdir
+
+if [ $os == 'irix' ]; then
+    $here/src/dbtest -l 5 -n 500 2>&1 | tee -a $here/$seq.full | _filter_dbtest
+elif [ $os == 'linux' ]; then
+    $here/src/dbtest -l 5 -n 3000 2>&1 | tee -a $here/$seq.full | _filter_dbtest
+fi
 
 # success, all done
 exit
 
 # success, all done
 exit
diff --git a/010.out b/010.out
index 6472a5d032ec1ce503169966e07a3d30923cda55..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/010.out
+++ b/010.out
@@ -1,58 +0,0 @@
-QA output created by 010
-dbtest v1.0
-
-Creating database containing 3000 records...
-       performing lookups for 5 iterations...
-       using BLEEP as seed for srandom()...
-
-       
-There were BLEEP duplicate checksums generated
-
-Performing lookups on database...
-
-       Sequential lookups...
-
-
-       Random lookups...
-
-Lookups succeeded...
-
-Performing lookups on database...
-
-       Sequential lookups...
-
-
-       Random lookups...
-
-Lookups succeeded...
-
-Performing lookups on database...
-
-       Sequential lookups...
-
-
-       Random lookups...
-
-Lookups succeeded...
-
-Performing lookups on database...
-
-       Sequential lookups...
-
-
-       Random lookups...
-
-Lookups succeeded...
-
-Performing lookups on database...
-
-       Sequential lookups...
-
-
-       Random lookups...
-
-Lookups succeeded...
-
-Cleaning up database...
-       
-There were BLEEP duplicate checksums generated
diff --git a/011 b/011
index a871212cd5f3e7cfa91fd5bafa9d308311c4e0d7..529ae2a0e770b90a5c6b87eb9079d0f16e713113 100755 (executable)
--- a/011
+++ b/011
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 011
+# FS QA Test No. 011
 #
 # dirstress
 #
 #
 # dirstress
 #
@@ -41,34 +41,33 @@ owner=dxm@sgi.com
 seq=`basename $0`
 echo "QA output created by $seq"
 
 seq=`basename $0`
 echo "QA output created by $seq"
 
-# get standard environment, filters and checks
-. ./common.rc
-. ./common.filter
-
+out=""
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
-out=$TEST_DIR/dirstress.$$
-trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $out
+    cd /
+    rm -f $tmp.*
+    [ -n "$out" ] && rm -rf $out
+    _cleanup_testdir
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
-count=1000
-if ! mkdir $out
-then
-    echo "!! couldn't mkdir $out"
-    status=1
-    exit
-fi
+# real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
+
+out=$testdir/dirstress.$$
 
 
-rm -f $seq.out.full
+rm -f $seq.full
 
 _test()
 {
 
 _test()
 {
@@ -80,13 +79,19 @@ _test()
     if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1
     then
         echo "    dirstress failed"
     if ! $here/src/dirstress -d $out -f $count $args >$tmp.out 2>&1
     then
         echo "    dirstress failed"
-        echo "*** TEST $test -d $out -f $count $args" >>$seq.out.full
-        cat $tmp.out >>$seq.out.full
+        echo "*** TEST $test -d $out -f $count $args" >>$seq.full
+        cat $tmp.out >>$seq.full
         status=1
     fi
 }
 
 # dirstress doesn't check returns - this is a crash & burn test.
         status=1
     fi
 }
 
 # dirstress doesn't check returns - this is a crash & burn test.
+if ! mkdir $out
+then
+    echo "!! couldn't mkdir $out"
+    status=1
+    exit
+fi
 
 count=1000
 _test 1 "-p 1 -n 1" $count
 
 count=1000
 _test 1 "-p 1 -n 1" $count
diff --git a/012 b/012
index d1a6f067bf9896938ab33dff291e9528a07fc888..3fcc789e02a98768d380f53c30cdec2aab71a460 100755 (executable)
--- a/012
+++ b/012
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 012
+# FS QA Test No. 012
 #
 # holes
 #
 #
 # holes
 #
@@ -44,11 +44,14 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
-trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/holes.$$.*
+    cd /
+    rm -f $tmp.*
+    rm -rf $testdir/holes.$$.*
+    _cleanup_testdir
 }
 
 _filesize()
 }
 
 _filesize()
@@ -68,7 +71,7 @@ _do_test()
     
     failed=0
     
     
     failed=0
     
-    out=$TEST_DIR/holes.$$.$_n
+    out=$testdir/holes.$$.$_n
     echo ""
     echo "holes.$_n : $_param"
     echo "-----------------------------------------------"
     echo ""
     echo "holes.$_n : $_param"
     echo "-----------------------------------------------"
@@ -115,6 +118,10 @@ _do_test()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 rm -f $here/$seq.out.full
 
 
 rm -f $here/$seq.out.full
 
diff --git a/013 b/013
index e90c1a6e50e64fdd016d36f55a3b06a343f97a61..e6af9d60b6b1f7cac5da109a86a814f807754850 100755 (executable)
--- a/013
+++ b/013
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 013
+# FS QA Test No. 013
 #
 # fsstress
 #
 #
 # fsstress
 #
@@ -48,10 +48,12 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     # we might get here with a RO FS
     mount -o remount,rw $TEST_DEV >/dev/null 2>&1
     # now kill!
     # we might get here with a RO FS
     mount -o remount,rw $TEST_DEV >/dev/null 2>&1
     # now kill!
-    rm -rf $TEST_DIR/fsstress.$$.*
+    rm -rf $testdir/fsstress.$$.*
+    _cleanup_testdir
 }
 
 _filesize()
 }
 
 _filesize()
@@ -63,13 +65,16 @@ _filesize()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# put operating system in $os
+_get_os
+
 _do_test()
 {
     _n="$1"
     _param="$2"
     _count="$3"
     
 _do_test()
 {
     _n="$1"
     _param="$2"
     _count="$3"
     
-    out=$TEST_DIR/fsstress.$$.$_n
+    out=$testdir/fsstress.$$.$_n
     rm -rf $out
     if ! mkdir $out
     then
     rm -rf $out
     if ! mkdir $out
     then
@@ -101,11 +106,22 @@ _do_test()
 
 
 # real QA test starts here
 
 
 # real QA test starts here
+_supported_fs xfs udf
+_supported_os IRIX Linux
+
+_setup_testdir
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
 
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
 
-count=2000
+if [ $os == 'irix' ]; then
+    count=1024    
+elif [ $os == 'linux' ]; then
+    count=2000
+else
+    echo Error test $seq does not run on the operating system: `uname`
+    exit
+fi
 procs=20
 
 _check_test_fs
 procs=20
 
 _check_test_fs
diff --git a/014 b/014
index c51d6576e99c76ad146de7389d433389bee4c9d0..886f3ddae687658cac032c5b7f0ad54cd6610bbc 100755 (executable)
--- a/014
+++ b/014
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 014
+# FS QA Test No. 014
 #
 # truncfile
 #
 #
 # truncfile
 #
@@ -44,24 +44,31 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
-trap "rm -f $tmp.*; _cleanup; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/truncfile.$$.*
+    cd /
+    rm -f $tmp.*
+    rm -rf $testdir/truncfile.$$.*
+    _cleanup_testdir
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
 
 
-echo "berevity is wit..."
+_setup_testdir
+
+echo "brevity is wit..."
 
 echo "------"
 echo "test 1"
 echo "------"
 
 echo "------"
 echo "test 1"
 echo "------"
-if ! src/truncfile -c 10000 $TEST_DIR/truncfile.$$.0 >$tmp.out 2>&1
+if ! src/truncfile -c 10000 $testdir/truncfile.$$.0 >$tmp.out 2>&1
 then
     out=`cat $tmp.out`
     echo "truncfile returned $? : \"$out\""
 then
     out=`cat $tmp.out`
     echo "truncfile returned $? : \"$out\""
diff --git a/014.out b/014.out
index 960fcb057498995a1dba67ba657db0f5933576dd..fae7d03341e1d2755110feb9f42ee4039421b699 100644 (file)
--- a/014.out
+++ b/014.out
@@ -1,5 +1,5 @@
 QA output created by 014
 QA output created by 014
-berevity is wit...
+brevity is wit...
 ------
 test 1
 ------
 ------
 test 1
 ------
diff --git a/015 b/015
index cae6ba5eb40f9db4f53be1e6e858bdcc33511752..eb0502052d5f7f3c05276fd526c85696c297e45a 100755 (executable)
--- a/015
+++ b/015
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 015
+# FS QA Test No. 015
 #
 # check out-of-space behaviour
 #
 #
 # check out-of-space behaviour
 #
@@ -73,6 +73,9 @@ _filter_dd()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _require_scratch
 _require_nobigloopfs
 
 _require_scratch
 _require_nobigloopfs
 
diff --git a/016 b/016
index 70a24e6de9886dd5086c9cc3afddbd8de1107bb4..7e3088c2d847cf9c54e6d19fd02e5233c48a4c39 100755 (executable)
--- a/016
+++ b/016
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 016
+# FS QA Test No. 016
 #
 # test end of log overwrite bug #796141
 #
 #
 # test end of log overwrite bug #796141
 #
@@ -62,6 +62,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     rm -f $tmp.*
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
     rm -f $tmp.*
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
@@ -83,7 +84,7 @@ _init()
     [ $? -ne 0 ] && \
         _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
     _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
     [ $? -ne 0 ] && \
         _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
     _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
-    source $tmp.mkfs
+    . $tmp.mkfs
 }
 
 _log_traffic()
 }
 
 _log_traffic()
@@ -164,7 +165,7 @@ _check_corrupt()
     f="c6c6c6c6"
     echo "*** check for corruption"
     echo "expect $f..." >>$seq.full
     f="c6c6c6c6"
     echo "*** check for corruption"
     echo "expect $f..." >>$seq.full
-    xfs_db -r $1 -c "fsblock $2" -c "print" | head | tee -a $seq.full | \
+    xfs_db -r -c "fsblock $2" -c "print" $1 | head | tee -a $seq.full | \
         grep -q -v "$f $f $f $f $f $f $f $f" && \
             _fail "!!! block $2 corrupted!"
 }
         grep -q -v "$f $f $f $f $f $f $f $f" && \
             _fail "!!! block $2 corrupted!"
 }
@@ -174,6 +175,8 @@ _check_corrupt()
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 rm -f $seq.full
 
 
 rm -f $seq.full
 
diff --git a/017 b/017
index 0da28fe72141496b51fd24d4a8819efd75579643..b38cd4697836d2b32962f0482610798dc4ced7cd 100755 (executable)
--- a/017
+++ b/017
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 017
+# FS QA Test No. 017
 #
 # test remount ro - pv 795642 
 #
 #
 # test remount ro - pv 795642 
 #
@@ -44,19 +44,21 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1
 here=`pwd`
 tmp=/tmp/$$
 status=1
+trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
 }
 
 _cleanup()
 {
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
 }
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_scratch
 
 
 _require_scratch
 
diff --git a/018 b/018
index e89aede16b0a109d68fcceca8ab21b8cdd88a4c2..be183569f8470469d88361befc06e757ef5c5926 100755 (executable)
--- a/018
+++ b/018
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 018
+# FS QA Test No. 018
 #
 # xfs_logprint test - test v2 logs of different LR sizes
 #
 #
 # xfs_logprint test - test v2 logs of different LR sizes
 #
@@ -52,6 +52,7 @@ status=1      # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
@@ -60,10 +61,12 @@ _cleanup()
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # real QA test starts here
-
+_supported_fs xfs
+_supported_os IRIX Linux
 # prelim
 rm -f $seq.full $tmp.*
 _require_scratch
 # prelim
 rm -f $seq.full $tmp.*
 _require_scratch
+
 echo "*** init FS"
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 echo "*** init FS"
 umount $SCRATCH_DEV >/dev/null 2>&1
 
@@ -86,6 +89,7 @@ do
     fi
     export MKFS_OPTIONS=$mkfs
     export MOUNT_OPTIONS=$mnt
     fi
     export MKFS_OPTIONS=$mkfs
     export MOUNT_OPTIONS=$mnt
+
     _mkfs_log
     _create_log
     _check_log
     _mkfs_log
     _create_log
     _check_log
diff --git a/020 b/020
index 53bf0362663a16e1b1bae61fc40f7f5ed861e627..1bc63c6e956be9a32c3d54567b0d69adfcdb34f9 100755 (executable)
--- a/020
+++ b/020
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 020
+# FS QA Test No. 020
 #
 # extended attributes
 #
 #
 # extended attributes
 #
@@ -44,15 +44,20 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=0       # success is the default!
-trap "rm -f $tmp.* $testfile; exit \$status" 0 1 2 3 15
+trap "_cleanup; rm -f $tmp.* $testfile; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
+_cleanup()
+{
+    _cleanup_testdir
+}
+
 _filter()
 {
 _filter()
 {
-    sed "s#$TEST_DIR[^ :]*#<TESTFILE>#g; 
+    sed "s#$testdir[^ :]*#<TESTFILE>#g; 
             s#$tmp[^ :]*#<TMPFILE>#g;
             s#/proc[^ :]*#<PROCFILE>#g" $1
 }
             s#$tmp[^ :]*#<TMPFILE>#g;
             s#/proc[^ :]*#<PROCFILE>#g" $1
 }
@@ -87,14 +92,19 @@ _attr_list()
     fi
 }
 
     fi
 }
 
+
+# real QA test starts here
+_supported_fs xfs udf
+_supported_os Linux
+
 [ -x /usr/bin/attr ] || _notrun "attr is not installed"
 [ -x /usr/bin/getfattr ] || _notrun "getfattr is not installed"
 
 [ -x /usr/bin/attr ] || _notrun "attr is not installed"
 [ -x /usr/bin/getfattr ] || _notrun "getfattr is not installed"
 
-# real QA test starts here
+_setup_testdir
 
 rm -f $seq.full
 
 
 rm -f $seq.full
 
-testfile=$TEST_DIR/attribute_$$
+testfile=$testdir/attribute_$$
 
 echo "*** list non-existant file"
 _attr_list $testfile
 
 echo "*** list non-existant file"
 _attr_list $testfile
diff --git a/022 b/022
index c997b9f4a0c895232c6eb653577a5be5f7decbad..31e04e105f2da109e5201166707cc8235f19706f 100755 (executable)
--- a/022
+++ b/022
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 022
+# FS QA Test No. 022
 #
 # Test out a level 0 dump/restore to a tape of a subdir
 # i.e. it is testing out drive_scsitape.c
 #
 # Test out a level 0 dump/restore to a tape of a subdir
 # i.e. it is testing out drive_scsitape.c
@@ -52,7 +52,12 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $TAPE_DEV
 _create_dumpdir_stress
 
 _require_tape $TAPE_DEV
 _create_dumpdir_stress
diff --git a/022.out b/022.out
deleted file mode 100644 (file)
index 7372548..0000000
--- a/022.out
+++ /dev/null
@@ -1,59 +0,0 @@
-QA output created by 022
-Put scsi tape driver into variable block size mode
-Creating directory system to dump using fsstress.
-
------------------------------------------------
-fsstress : -f link=10 -f creat=10 -f mkdir=10 -f truncate=5 -f symlink=10
------------------------------------------------
-Erasing tape
-Dumping to tape...
-xfsdump  -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_022 SCRATCH_MNT
-xfsdump: using scsi tape (drive_scsitape) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_022"
-xfsdump: ino map phase 1: parsing subtree selections
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: pruning unneeded subtrees
-xfsdump: ino map phase 4: estimating dump size
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: writing stream terminator
-xfsdump: beginning media stream terminator
-xfsdump: media file 2 (media 0, file 2)
-xfsdump: ending media stream terminator
-xfsdump: media stream terminator size BLOCKSZ bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -f TAPE_DEV  -L stress_022 RESTORE_DIR
-xfsrestore: using scsi tape (drive_scsitape) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 34 directories and 94 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing listing of dump directory with restore directory
-Files TMP.dump_dir and TMP.restore_dir are identical
diff --git a/023 b/023
index 01372377ee6054b50b5110addf34dc2c12ddc24c..758792784b49c8419b8dbeb2624056fb188c486d 100755 (executable)
--- a/023
+++ b/023
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 023
+# FS QA Test No. 023
 #
 # To test xfsdump/restore to tape using a directory with
 # files with data created by src/fill.
 #
 # To test xfsdump/restore to tape using a directory with
 # files with data created by src/fill.
@@ -51,7 +51,12 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
diff --git a/023.out b/023.out
deleted file mode 100644 (file)
index 181f24a..0000000
--- a/023.out
+++ /dev/null
@@ -1,93 +0,0 @@
-QA output created by 023
-Put scsi tape driver into variable block size mode
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_023 SCRATCH_MNT
-xfsdump: using scsi tape (drive_scsitape) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_023"
-xfsdump: ino map phase 1: parsing subtree selections
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: pruning unneeded subtrees
-xfsdump: ino map phase 4: estimating dump size
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: writing stream terminator
-xfsdump: beginning media stream terminator
-xfsdump: media file 2 (media 0, file 2)
-xfsdump: ending media stream terminator
-xfsdump: media stream terminator size BLOCKSZ bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -f TAPE_DEV  -L stress_023 RESTORE_DIR
-xfsrestore: using scsi tape (drive_scsitape) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Comparing listing of dump directory with restore directory
-Files TMP.dump_dir and TMP.restore_dir are identical
diff --git a/024 b/024
index 9ef45d90565f14408cc57f5fcee30802bbfc5735..e3b1eff37786a5b68312441fddc80d27ae5cf72e 100755 (executable)
--- a/024
+++ b/024
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 024
+# FS QA Test No. 024
 #
 # Test out incremental dumps
 #
 #
 # Test out incremental dumps
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
diff --git a/025 b/025
index 9846fdc58eaf999fc0546f6c1473695ea47e4116..4ce854dbb2425bf85b9cd3370fcda4f3eeb6bb2e 100755 (executable)
--- a/025
+++ b/025
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 025
+# FS QA Test No. 025
 #
 # Test dump/restore using -m option (min strategy) 
 #
 #
 # Test dump/restore using -m option (min strategy) 
 #
@@ -50,7 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
diff --git a/025.out b/025.out
index 4d6515db3c6d2a414302fedf7f58b28b3b012ce9..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/025.out
+++ b/025.out
@@ -1,87 +0,0 @@
-QA output created by 025
-Put scsi tape driver into variable block size mode
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -m -b 1048576 -l0 -f TAPE_DEV -M stress_tape_media -L stress_025 SCRATCH_MNT
-xfsdump: using minimum scsi tape (drive_minrmt) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_025"
-xfsdump: ino map phase 1: skipping (no subtrees specified)
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: skipping (no pruning necessary)
-xfsdump: ino map phase 4: skipping (size estimated in phase 2)
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -m -b 1048576 -f TAPE_DEV  -L stress_025 RESTORE_DIR
-xfsrestore: using minimum scsi tape (drive_minrmt) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Only in SCRATCH_MNT: RESTORE_SUBDIR
diff --git a/026 b/026
index 686dbfbe4b38fb2e4fccf8ca94811c622da330e8..d1c1007c35e4643f80c77e5d0ee7cd88afd1a35e 100755 (executable)
--- a/026
+++ b/026
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 026
+# FS QA Test No. 026
 #
 # Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
 #
 #
 # Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _create_dumpdir_fill
 _do_dump_file
 
 _create_dumpdir_fill
 _do_dump_file
diff --git a/027 b/027
index f07253c37480601a92e97f2b8851025fc4cf3784..9a242b5bb42b099d6fb925b0fc35ee64517e5869 100755 (executable)
--- a/027
+++ b/027
@@ -1,5 +1,5 @@
-#! /bin/sh
-# XFS QA Test No. 027
+#! /bin/sh -x
+# FS QA Test No. 027
 #
 # Test out "xfsdump | xfsrestore"
 #
 #
 # Test out "xfsdump | xfsrestore"
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _create_dumpdir_fill
 _do_dump_restore
 
 _create_dumpdir_fill
 _do_dump_restore
diff --git a/027.out b/027.out
index da6cb2f687d82018d75ff926a356894dadf6165f..c40883b47c32380c84cf1e3d23b918adb030c53c 100644 (file)
--- a/027.out
+++ b/027.out
@@ -14,9 +14,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 0
 xfsrestore: session label: ""
 xfsrestore: media label: ""
 xfsrestore: level: 0
 xfsrestore: session label: ""
 xfsrestore: media label: ""
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: 3 directories and 39 entries processed
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: 3 directories and 39 entries processed
diff --git a/028 b/028
index bff52b425d66970c3993be1bc9905700f6610f91..db746fd7192c63032bfea74a1e26ceb2276e5a80 100755 (executable)
--- a/028
+++ b/028
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 028
+# FS QA Test No. 028
 #
 # To test out xfsinvutil
 #
 #
 # To test out xfsinvutil
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 # wipe test dir clean first
 # so dump can be real quick
 
 # wipe test dir clean first
 # so dump can be real quick
@@ -81,7 +83,7 @@ echo "middate = $middate" >>$seq.full
 # to see if it did the job
 #
 _dump_inventory
 # to see if it did the job
 #
 _dump_inventory
-_do_invutil -n
+_do_invutil -F
 _dump_inventory
 
 
 _dump_inventory
 
 
diff --git a/028.out b/028.out
index f7735a987b22ad500ca4209e53b6ee45797d75a6..cab4643976d517978fd4864ca35000f56c38a7ec 100644 (file)
--- a/028.out
+++ b/028.out
@@ -116,7 +116,7 @@ xfsdump: dump size (non-dir files) : NUM bytes
 xfsdump: dump complete: SECS seconds elapsed
 xfsdump: Dump Status: SUCCESS
 file system 0:
 xfsdump: dump complete: SECS seconds elapsed
 xfsdump: Dump Status: SUCCESS
 file system 0:
-       fs id: ID
+       fs ID: ID
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -140,7 +140,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -164,7 +164,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -188,7 +188,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 3:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 3:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -212,7 +212,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 4:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 4:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -236,7 +236,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
 xfsdump: Dump Status: SUCCESS
 Processing file /var/xfsdump/inventory/UUIDstab
    Found entry for HOSTNAME:SCRATCH_MNT
 xfsdump: Dump Status: SUCCESS
 Processing file /var/xfsdump/inventory/UUIDstab
    Found entry for HOSTNAME:SCRATCH_MNT
@@ -279,7 +279,7 @@ TIME OF DUMP        :       TIME
             Session 3: HOSTNAME:SCRATCH_MNT
             Session 4: HOSTNAME:SCRATCH_MNT
 file system 0:
             Session 3: HOSTNAME:SCRATCH_MNT
             Session 4: HOSTNAME:SCRATCH_MNT
 file system 0:
-       fs id: ID
+       fs ID: ID
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -303,7 +303,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -327,5 +327,5 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
 xfsdump: Dump Status: SUCCESS
 xfsdump: Dump Status: SUCCESS
diff --git a/029 b/029
index fd490d8876972fbcb77f4ee651b74471c60e2c06..51ac17d3347ceb66508892770b208ca9e79f8aaf 100755 (executable)
--- a/029
+++ b/029
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 029
+# FS QA Test No. 029
 #
 # exercise mkfs log (internal/external) zeroing
 #
 #
 # exercise mkfs log (internal/external) zeroing
 #
@@ -67,6 +67,9 @@ _filter_logprint()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 _require_scratch
 
 echo
 _require_scratch
 
 echo
diff --git a/030 b/030
index f3c0364b0c5ee2f15ef7c367f96e62fff5d52b3d..97e4bd89211faac9ec4690f5c67d680e44233702 100755 (executable)
--- a/030
+++ b/030
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 030
+# FS QA Test No. 030
 #
 # exercise xfs_repair repairing broken filesystems
 #
 #
 # exercise xfs_repair repairing broken filesystems
 #
@@ -47,6 +47,7 @@ status=1      # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+       cd /
        umount $SCRATCH_DEV 2>/dev/null
        rm -f $tmp.*
 }
        umount $SCRATCH_DEV 2>/dev/null
        rm -f $tmp.*
 }
@@ -58,6 +59,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.repair
 
 . ./common.filter
 . ./common.repair
 
+# link correct .out file
+_link_out_file $seq.out
+
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 # 
 _check_ag()
 # nuke the superblock, AGI, AGF, AGFL; then try repair the damage
 # 
 _check_ag()
@@ -70,6 +74,9 @@ _check_ag()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _require_nobigloopfs
 _require_scratch
 
 _require_nobigloopfs
 _require_scratch
 
@@ -103,7 +110,7 @@ src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 # now kick off the real repair test...
 # 
 _scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
 # now kick off the real repair test...
 # 
 _scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
-source $tmp.mkfs
+. $tmp.mkfs
 _check_ag 0
 _check_ag -1
 
 _check_ag 0
 _check_ag -1
 
diff --git a/030.out b/030.out
deleted file mode 100644 (file)
index 48fdedd..0000000
--- a/030.out
+++ /dev/null
@@ -1,295 +0,0 @@
-QA output created by 030
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
-Corrupting sb 0 - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-bad primary superblock - bad magic number !!!
-
-attempting to find secondary superblock...
-found candidate secondary superblock...
-verified secondary superblock...
-writing modified primary superblock
-sb root inode value INO inconsistent with calculated value INO
-resetting superblock root inode pointer to INO
-sb realtime bitmap inode INO inconsistent with calculated value INO
-resetting superblock realtime bitmap ino pointer to INO
-sb realtime summary inode INO inconsistent with calculated value INO
-resetting superblock realtime summary ino pointer to INO
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-Note - stripe unit (0) and width (0) fields have been reset.
-Please set with mount -o sunit=<value>,swidth=<value>
-done
-Corrupting agf 0 - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-bad magic # 0x0 for agf 0
-bad version # 0 for agf 0
-bad length 0 for agf 0, should be LENGTH
-reset bad agf for ag 0
-bad agbno AGBNO for btbno root, agno 0
-bad agbno AGBNO for btbcnt root, agno 0
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting agi 0 - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-bad magic # 0x0 for agi 0
-bad version # 0 for agi 0
-bad length # 0 for agi 0, should be LENGTH
-reset bad agi for ag 0
-bad agbno AGBNO for inobt root, agno 0
-root inode chunk not found
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-error following ag 0 unlinked list
-        - process known inodes and perform inode discovery...
-imap claims in-use inode INO is free, correcting imap
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting agfl 0 - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting sb 0 - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-bad primary superblock - bad magic number !!!
-
-attempting to find secondary superblock...
-found candidate secondary superblock...
-verified secondary superblock...
-writing modified primary superblock
-sb root inode value INO inconsistent with calculated value INO
-resetting superblock root inode pointer to INO
-sb realtime bitmap inode INO inconsistent with calculated value INO
-resetting superblock realtime bitmap ino pointer to INO
-sb realtime summary inode INO inconsistent with calculated value INO
-resetting superblock realtime summary ino pointer to INO
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-Note - stripe unit (0) and width (0) fields have been reset.
-Please set with mount -o sunit=<value>,swidth=<value>
-done
-Corrupting agf 0 - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-bad magic # 0xffffffff for agf 0
-bad version # -1 for agf 0
-bad sequence # -1 for agf 0
-bad length -1 for agf 0, should be LENGTH
-flfirst -1 in agf 0 too large (max = MAX)
-fllast -1 in agf 0 too large (max = MAX)
-reset bad agf for ag 0
-freeblk count 1 != flcount -1 in ag 0
-bad agbno AGBNO for btbno root, agno 0
-bad agbno AGBNO for btbcnt root, agno 0
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting agi 0 - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-bad magic # 0xffffffff for agi 0
-bad version # -1 for agi 0
-bad sequence # -1 for agi 0
-bad length # -1 for agi 0, should be LENGTH
-reset bad agi for ag 0
-bad agbno AGBNO for inobt root, agno 0
-root inode chunk not found
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-imap claims in-use inode INO is free, correcting imap
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting agfl 0 - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
diff --git a/031 b/031
index 0194d15d1bc0d804a32d16224431a2a4b37854c6..a7e37a992fb5439c7ebfe5e1a67b48490f1e2c9e 100755 (executable)
--- a/031
+++ b/031
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 031
+# FS QA Test No. 031
 #
 # exercise xfs_repair - ensure repeated use doesn't corrupt
 #
 #
 # exercise xfs_repair - ensure repeated use doesn't corrupt
 #
@@ -51,6 +51,9 @@ rm -f $seq.full
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# link correct .out file
+_link_out_file $seq.out
+
 _check_repair()
 {
        _scratch_xfs_repair >$tmp.0 2>&1
 _check_repair()
 {
        _scratch_xfs_repair >$tmp.0 2>&1
@@ -103,7 +106,9 @@ EOF
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
-# 
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _require_nobigloopfs
 _require_scratch
 
 _require_nobigloopfs
 _require_scratch
 
@@ -116,7 +121,7 @@ _create_proto 0
 echo "=== version 1, one entry"
 _scratch_mkfs_xfs $MKFSV1 >$tmp.mkfs0 2>&1
 _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
 echo "=== version 1, one entry"
 _scratch_mkfs_xfs $MKFSV1 >$tmp.mkfs0 2>&1
 _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
-source $tmp.mkfs
+. $tmp.mkfs
 _check_repair
 echo "=== version 2, one entry (shortform)"
 _scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
 _check_repair
 echo "=== version 2, one entry (shortform)"
 _scratch_mkfs_xfs $MKFSV2 | _filter_mkfs >/dev/null 2>&1
diff --git a/031.out b/031.out
deleted file mode 100644 (file)
index baebe63..0000000
--- a/031.out
+++ /dev/null
@@ -1,237 +0,0 @@
-QA output created by 031
-=== version 1, one entry
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-
-=== version 2, one entry (shortform)
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-
-=== version 1, twenty entries
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-
-=== version 2, twenty entries (block form)
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-
-=== version 1, thousand entries
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-Phase 7 - verify and correct link counts...
-done
-
-=== version 2, thousand entries (leaf form)
-Repairing, iteration 1
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 2
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 3
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-Repairing, iteration 4
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-Phase 3 - for each AG...
-Phase 4 - check for duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-Phase 6 - check inode connectivity...
-rebuilding directory inode INO
-Phase 7 - verify and correct link counts...
-done
-
diff --git a/032 b/032
index 408901f5c127a6c37d2663e31055e86b3c5cf646..dbd9fdd2a1e28bcc73154cdb7774168431e0afd6 100755 (executable)
--- a/032
+++ b/032
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 032
+# FS QA Test No. 032
 #
 # cross check mkfs detection of foreign filesystems
 #
 #
 # cross check mkfs detection of foreign filesystems
 #
@@ -52,7 +52,9 @@ rm -f $seq.full
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
-# 
+_supported_fs xfs
+_supported_os Linux
+
 _require_nobigloopfs
 _require_scratch
 
 _require_nobigloopfs
 _require_scratch
 
diff --git a/033 b/033
index 5f988d0b452de7a6530c15153219d1b67f5ba3cf..e3386709b63de2abbe280dd4231cbf33df0fc8d6 100755 (executable)
--- a/033
+++ b/033
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 033
+# FS QA Test No. 033
 #
 # exercise xfs_repair repairing broken filesystems (root inodes)
 #
 #
 # exercise xfs_repair repairing broken filesystems (root inodes)
 #
@@ -47,8 +47,9 @@ status=1      # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
-       umount $SCRATCH_DEV 2>/dev/null
-       rm -f $tmp.*
+    cd /
+    umount $SCRATCH_DEV 2>/dev/null
+    rm -f $tmp.*
 }
 
 trap "_cleanup; exit \$status" 0 1 2 3 15
 }
 
 trap "_cleanup; exit \$status" 0 1 2 3 15
@@ -58,6 +59,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.repair
 
 . ./common.filter
 . ./common.repair
 
+# link correct .out file
+_link_out_file $seq.out
+
 # nuke the root, rt bitmap, and rt summary inodes
 # 
 _check_root_inos()
 # nuke the root, rt bitmap, and rt summary inodes
 # 
 _check_root_inos()
@@ -71,12 +75,15 @@ _check_root_inos()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 _require_nobigloopfs
 _require_scratch
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 _require_nobigloopfs
 _require_scratch
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
-source $tmp.mkfs
+. $tmp.mkfs
 [ $isize -lt 512 ] && \
        _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
 
 [ $isize -lt 512 ] && \
        _scratch_mkfs_xfs -isize=512 | _filter_mkfs >/dev/null 2>&1
 
diff --git a/033.out b/033.out
deleted file mode 100644 (file)
index 50f273d..0000000
--- a/033.out
+++ /dev/null
@@ -1,229 +0,0 @@
-QA output created by 033
-meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks
-data     = bsize=XXX blocks=XXX, imaxpct=PCT
-         = sunit=XXX swidth=XXX, unwritten=X
-naming   =VERN bsize=XXX
-log      =LDEV bsize=XXX blocks=XXX
-realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
-Corrupting root inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-imap claims a free inode INO is in use, correcting imap and clearing inode
-cleared root inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-root inode lost
-        - clear lost+found (if it exists) ...
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing root directory
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-resetting inode INO nlinks from 2 to 3
-done
-Corrupting rt bitmap inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-imap claims a free inode INO is in use, correcting imap and clearing inode
-cleared realtime bitmap inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime bitmap inode
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting rt summary inode - setting bits to 0
-Wrote X.XXKb (value 0x0)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0x0 on inode INO
-bad version number 0x0 on inode INO
-bad magic number 0x0 on inode INO, resetting magic number
-bad version number 0x0 on inode INO, resetting version number
-imap claims a free inode INO is in use, correcting imap and clearing inode
-cleared realtime summary inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime summary inode
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-Phase 7 - verify and correct link counts...
-done
-Corrupting root inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-bad (negative) size -1 on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-bad (negative) size -1 on inode INO
-cleared root inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-root inode lost
-        - clear lost+found (if it exists) ...
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing root directory
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-disconnected dir inode INO, moving to lost+found
-Phase 7 - verify and correct link counts...
-resetting inode INO nlinks from 2 to 3
-done
-Corrupting rt bitmap inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-bad (negative) size -1 on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-bad (negative) size -1 on inode INO
-cleared realtime bitmap inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime bitmap inode
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-disconnected dir inode INO, moving to lost+found
-Phase 7 - verify and correct link counts...
-done
-Corrupting rt summary inode - setting bits to -1
-Wrote X.XXKb (value 0xffffffff)
-Phase 1 - find and verify superblock...
-Phase 2 - using <TYPEOF> log
-        - zero log...
-        - scan filesystem freespace and inode maps...
-        - found root inode chunk
-Phase 3 - for each AG...
-        - scan and clear agi unlinked lists...
-        - process known inodes and perform inode discovery...
-bad magic number 0xffff on inode INO
-bad version number 0xffffffff on inode INO
-bad (negative) size -1 on inode INO
-bad magic number 0xffff on inode INO, resetting magic number
-bad version number 0xffffffff on inode INO, resetting version number
-bad (negative) size -1 on inode INO
-cleared realtime summary inode INO
-        - process newly discovered inodes...
-Phase 4 - check for duplicate blocks...
-        - setting up duplicate extent list...
-        - clear lost+found (if it exists) ...
-        - clearing existing "lost+found" inode
-        - deleting existing "lost+found" entry
-        - check for inodes claiming duplicate blocks...
-Phase 5 - rebuild AG headers and trees...
-        - reset superblock...
-Phase 6 - check inode connectivity...
-reinitializing realtime summary inode
-        - resetting contents of realtime bitmap and summary inodes
-        - ensuring existence of lost+found directory
-        - traversing filesystem starting at / ... 
-        - traversal finished ... 
-        - traversing all unattached subtrees ... 
-        - traversals finished ... 
-        - moving disconnected inodes to lost+found ... 
-disconnected dir inode INO, moving to lost+found
-Phase 7 - verify and correct link counts...
-done
diff --git a/034 b/034
index 325c19de9009a821f7ada187742717db32a797a9..f2996b80793e29cc0c1905014ae287083a09b9c0 100755 (executable)
--- a/034
+++ b/034
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 034
+# FS QA Test No. 034
 #
 # pv 801241 - check for reference leaks from the *handle xfsctls
 #
 #
 # pv 801241 - check for reference leaks from the *handle xfsctls
 #
@@ -47,16 +47,20 @@ status=1    # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
+    rm -f $tmp.*
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
 }
     echo "*** unmount"
     umount $SCRATCH_MNT 2>/dev/null
 }
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_scratch
 
 
 _require_scratch
 
diff --git a/035 b/035
index a9142909a807f82cfec3c22227ebd77b55d5e8f2..6691dc0ac693762dbca617a760f88112a4a21827 100755 (executable)
--- a/035
+++ b/035
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 035
+# FS QA Test No. 035
 #
 # Test doing multiple dumps to tape and restoring the 2nd one
 #
 #
 # Test doing multiple dumps to tape and restoring the 2nd one
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $TAPE_DEV
 _create_dumpdir_fill
diff --git a/036 b/036
index 6d3a98f3f9135cd542f4392a5dfdffb17ffa9ea3..a4e1c0165bdcf48acb6323db4f4148d9f625d0f5 100755 (executable)
--- a/036
+++ b/036
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 036
+# FS QA Test No. 036
 #
 # Test xfsdump/restore minrmt to a remote IRIX tape 
 #
 #
 # Test xfsdump/restore minrmt to a remote IRIX tape 
 #
@@ -50,7 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
diff --git a/036.out b/036.out
deleted file mode 100644 (file)
index 8f7473a..0000000
--- a/036.out
+++ /dev/null
@@ -1,87 +0,0 @@
-QA output created by 036
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -o -F -m -b 1048576 -l0 -f TAPE_DEV -M stress_tape_media -L stress_036 SCRATCH_MNT
-xfsdump: using minimum scsi tape (drive_minrmt) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_036"
-xfsdump: ino map phase 1: skipping (no subtrees specified)
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: skipping (no pruning necessary)
-xfsdump: ino map phase 4: skipping (size estimated in phase 2)
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: WARNING: media may contain data. Overwrite option specified
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -m -b 1048576 -f TAPE_DEV  -L stress_036 RESTORE_DIR
-xfsrestore: using minimum scsi tape (drive_minrmt) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Only in SCRATCH_MNT: RESTORE_SUBDIR
diff --git a/037 b/037
index ae6f7b0fbfbe3d645204d6a679bdfd68e9a5e526..79fd0de383e9a3652f3f2959b0e8385ae86b888c 100755 (executable)
--- a/037
+++ b/037
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 037
+# FS QA Test No. 037
 #
 # Test xfsdump/restore minrmt to a remote linux tape 
 #
 #
 # Test xfsdump/restore minrmt to a remote linux tape 
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_tape $RMT_TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $RMT_TAPE_DEV
 _create_dumpdir_fill
diff --git a/038 b/038
index d3159cc441aa690f35f9a4e644230221b7826c25..c1e55993cc7d363a88f42efb13fee3df0c010148 100755 (executable)
--- a/038
+++ b/038
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 038
+# FS QA Test No. 038
 #
 # Test xfsdump/restore to a remote linux tape 
 #
 #
 # Test xfsdump/restore to a remote linux tape 
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_tape $RMT_TAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $RMT_TAPE_DEV
 _create_dumpdir_fill
diff --git a/039 b/039
index a2bcfbab3916d5bafb94f5f25afcd9a5de950f6c..4fb54e36e8ca4c164f0be423a71d1c2236a4de06 100755 (executable)
--- a/039
+++ b/039
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 039
+# FS QA Test No. 039
 #
 # Test xfsdump/restore to a remote IRIX tape 
 #
 #
 # Test xfsdump/restore to a remote IRIX tape 
 #
@@ -50,7 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
diff --git a/039.out b/039.out
deleted file mode 100644 (file)
index b537985..0000000
--- a/039.out
+++ /dev/null
@@ -1,92 +0,0 @@
-QA output created by 039
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -o -F -f TAPE_DEV -M stress_tape_media -L stress_039 SCRATCH_MNT
-xfsdump: using scsi tape (drive_scsitape) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_039"
-xfsdump: ino map phase 1: skipping (no subtrees specified)
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: skipping (no pruning necessary)
-xfsdump: ino map phase 4: skipping (size estimated in phase 2)
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: WARNING: media may contain data. Overwrite option specified
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: writing stream terminator
-xfsdump: beginning media stream terminator
-xfsdump: media file 2 (media 0, file 2)
-xfsdump: ending media stream terminator
-xfsdump: media stream terminator size 245760 bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -f TAPE_DEV  -L stress_039 RESTORE_DIR
-xfsrestore: using scsi tape (drive_scsitape) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Only in SCRATCH_MNT: RESTORE_SUBDIR
diff --git a/042 b/042
index 1b5d22a172715e95b879cf8b8316347ec01357aa..77ff580465ac34475b47024a458b086129f329db 100755 (executable)
--- a/042
+++ b/042
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 042
+# FS QA Test No. 042
 #
 # xfs_fsr QA tests
 # create a large fragmented file and check that xfs_fsr doesn't corrupt
 #
 # xfs_fsr QA tests
 # create a large fragmented file and check that xfs_fsr doesn't corrupt
@@ -60,6 +60,8 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_scratch
 
 
 _require_scratch
 
@@ -137,7 +139,7 @@ _do "sum $SCRATCH_MNT/fragmented >$tmp.sum1"
 _do "Remove other files" "rm -rf $SCRATCH_MNT/{pad,hole*}"
 
 # defragment
 _do "Remove other files" "rm -rf $SCRATCH_MNT/{pad,hole*}"
 
 # defragment
-_do "Run xfs_fsr on filesystem" "xfs_fsr -v $SCRATCH_DEV"
+_do "Run xfs_fsr on filesystem" "$XFS_FSR_PROG -v $SCRATCH_DEV"
 _do "xfs_bmap -v $SCRATCH_MNT/fragmented"
 _do "Check 4k files" "src/fill2fs_check $tmp.manifest"
 
 _do "xfs_bmap -v $SCRATCH_MNT/fragmented"
 _do "Check 4k files" "src/fill2fs_check $tmp.manifest"
 
diff --git a/043 b/043
index d26496c1c0f4c8f2bc9e86658c2dce3ff90358a3..fae06a6e959775ebd26a796dc8339c8b993016cb 100755 (executable)
--- a/043
+++ b/043
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 043
+# FS QA Test No. 043
 #
 # Test out xfsdump/restore but rmv inventory prior to restore.
 # This checks that the on-disk inventory can be successfully
 #
 # Test out xfsdump/restore but rmv inventory prior to restore.
 # This checks that the on-disk inventory can be successfully
@@ -52,7 +52,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $TAPE_DEV 
 _create_dumpdir_fill
 
 _require_tape $TAPE_DEV 
 _create_dumpdir_fill
diff --git a/043.out b/043.out
deleted file mode 100644 (file)
index 2c62d68..0000000
--- a/043.out
+++ /dev/null
@@ -1,108 +0,0 @@
-QA output created by 043
-Put scsi tape driver into variable block size mode
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -s DUMP_SUBDIR -f TAPE_DEV -M stress_tape_media -L stress_043 SCRATCH_MNT
-xfsdump: using scsi tape (drive_scsitape) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_043"
-xfsdump: ino map phase 1: parsing subtree selections
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: pruning unneeded subtrees
-xfsdump: ino map phase 4: estimating dump size
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: writing stream terminator
-xfsdump: beginning media stream terminator
-xfsdump: media file 2 (media 0, file 2)
-xfsdump: ending media stream terminator
-xfsdump: media stream terminator size BLOCKSZ bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -f TAPE_DEV  -L stress_043 RESTORE_DIR
-xfsrestore: using scsi tape (drive_scsitape) strategy
-xfsrestore: searching media for dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: found dump matching specified label:
-xfsrestore: hostname: HOSTNAME
-xfsrestore: mount point: SCRATCH_MNT
-xfsrestore: volume: SCRATCH_DEV
-xfsrestore: session time: TIME
-xfsrestore: level: 0
-xfsrestore: session label: "stress_043"
-xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
-xfsrestore: session id: ID
-xfsrestore: media id: ID
-xfsrestore: searching media for directory dump
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: examining media file 1
-xfsrestore: incorporating on-media session inventory into online inventory
-xfsrestore: /var/xfsdump/inventory created
-xfsrestore: using on-media session inventory
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Comparing listing of dump directory with restore directory
-Files TMP.dump_dir and TMP.restore_dir are identical
diff --git a/044 b/044
index aa2f2e4b756c4cd43a2a78fafd607743835939f4..8a1e424361dbe3bb9b1bd4a3024298192072dcf1 100755 (executable)
--- a/044
+++ b/044
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 044
+# FS QA Test No. 044
 #
 # external log uuid/format tests (TODO - version 2 log format)
 #
 #
 # external log uuid/format tests (TODO - version 2 log format)
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_logdev
 
 
 _require_logdev
 
diff --git a/045 b/045
index 6264861b476c1ff71e62138b4bc135732499012a..6cdf4a8829469f4b6fd09eeaeeb6dcd8932b4695 100755 (executable)
--- a/045
+++ b/045
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 045
+# FS QA Test No. 045
 #
 # test mount of two FSes with identical UUID and mount with unknown option
 #
 #
 # test mount of two FSes with identical UUID and mount with unknown option
 #
@@ -56,6 +56,8 @@ _get_existing_uuid()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 _require_scratch
 
 
 _require_scratch
 
diff --git a/046 b/046
index 5f3eb903d94e32f0ed54143431c46eedbb9fb965..f4412f213899c8440ca20ca27c2b8fac240a1d06 100755 (executable)
--- a/046
+++ b/046
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 046
+# FS QA Test No. 046
 #
 # check on symlinks permissions
 #
 #
 # check on symlinks permissions
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _create_dumpdir_symlinks
 _do_dump_file
 
 _create_dumpdir_symlinks
 _do_dump_file
diff --git a/047 b/047
index 6e55b48335dae68f49c9a8e28eedeb6eaf8b3d32..db382c40951a040a734d902c26bee220f36596f8 100755 (executable)
--- a/047
+++ b/047
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 047
+# FS QA Test No. 047
 #
 # invutil with interactive responses
 #
 #
 # invutil with interactive responses
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 # wipe test dir clean first
 # so dump can be real quick
 
 # wipe test dir clean first
 # so dump can be real quick
diff --git a/047.out b/047.out
index 450e3dba264c226952fdff907f37159bb670fe1a..40ff0f9b57e82d9114ba757ce924e4a47b010032 100644 (file)
--- a/047.out
+++ b/047.out
@@ -116,7 +116,7 @@ xfsdump: dump size (non-dir files) : NUM bytes
 xfsdump: dump complete: SECS seconds elapsed
 xfsdump: Dump Status: SUCCESS
 file system 0:
 xfsdump: dump complete: SECS seconds elapsed
 xfsdump: Dump Status: SUCCESS
 file system 0:
-       fs id: ID
+       fs ID: ID
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -140,7 +140,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -164,7 +164,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -188,7 +188,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 3:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 3:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -212,7 +212,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 4:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 4:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -236,7 +236,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
 xfsdump: Dump Status: SUCCESS
 Processing file /var/xfsdump/inventory/UUIDstab
    Found entry for HOSTNAME:SCRATCH_MNT
 xfsdump: Dump Status: SUCCESS
 Processing file /var/xfsdump/inventory/UUIDstab
    Found entry for HOSTNAME:SCRATCH_MNT
@@ -254,7 +254,7 @@ MOUNT POINT :       HOSTNAME:SCRATCH_MNT
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
-Do you want to prune this entry: [y/n] -------------------------------------------------
+Do you want to prune this entry: [y/n]
 
             Session 1: HOSTNAME:SCRATCH_MNT
 -------------------------------------------------
 
             Session 1: HOSTNAME:SCRATCH_MNT
 -------------------------------------------------
@@ -264,7 +264,7 @@ MOUNT POINT :       HOSTNAME:SCRATCH_MNT
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
-Do you want to prune this entry: [y/n] -------------------------------------------------
+Do you want to prune this entry: [y/n]
 
             Session 2: HOSTNAME:SCRATCH_MNT
 -------------------------------------------------
 
             Session 2: HOSTNAME:SCRATCH_MNT
 -------------------------------------------------
@@ -274,12 +274,12 @@ MOUNT POINT       :       HOSTNAME:SCRATCH_MNT
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
 DEV PATH       :       HOSTNAME:SCRATCH_DEV
 TIME OF DUMP   :       TIME
 
-Do you want to prune this entry: [y/n] -------------------------------------------------
+Do you want to prune this entry: [y/n]
 
             Session 3: HOSTNAME:SCRATCH_MNT
             Session 4: HOSTNAME:SCRATCH_MNT
 file system 0:
 
             Session 3: HOSTNAME:SCRATCH_MNT
             Session 4: HOSTNAME:SCRATCH_MNT
 file system 0:
-       fs id: ID
+       fs ID: ID
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 0:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -303,7 +303,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 1:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -327,7 +327,7 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
        session 2:
                mount point:    HOSTNAME:SCRATCH_MNT
                device:         HOSTNAME:SCRATCH_DEV
@@ -351,5 +351,5 @@ file system 0:
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
                                mfile start:    ino INO offset 0
                                mfile end:      ino INO offset 0
                                media label:    "stress_tape_media"
-                               media id: ID
+                               media ID: ID
 xfsdump: Dump Status: SUCCESS
 xfsdump: Dump Status: SUCCESS
diff --git a/048 b/048
index 0b325f2e7a2da244d3c332b4073239b61a165942..2cfb80302baccbb8f38ef3f017408d5f3701da56 100755 (executable)
--- a/048
+++ b/048
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 048
+# FS QA Test No. 048
 #
 # test return codes from xfsctl on bad userspace address
 #
 #
 # test return codes from xfsctl on bad userspace address
 #
@@ -44,15 +44,26 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
+_cleanup()
+{
+    cd /
+    rm -f $tmp.*
+    _cleanup_testdir
+}
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 
-src/fault $TEST_DIR || exit
+src/fault $testdir || exit
 
 # success, all done
 status=0
 
 # success, all done
 status=0
diff --git a/049 b/049
index dd7270f43c843270945d7d78d8991119b07ea1c0..49a47f08ce580e79f443ded1f163e32959b47b5d 100755 (executable)
--- a/049
+++ b/049
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 049
+# FS QA Test No. 049
 #
 # XFS on loop test
 #
 #
 # XFS on loop test
 #
@@ -43,6 +43,7 @@ echo "QA output created by $seq"
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     umount $SCRATCH_MNT/test2 > /dev/null 2>&1
     umount $SCRATCH_MNT/test > /dev/null 2>&1
     rm -f $tmp.*
     umount $SCRATCH_MNT/test2 > /dev/null 2>&1
     umount $SCRATCH_MNT/test > /dev/null 2>&1
     rm -f $tmp.*
@@ -63,6 +64,10 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 _log()
 {
     echo "--- $*"
 _log()
 {
     echo "--- $*"
@@ -74,9 +79,6 @@ _require_nonexternal
 _require_scratch
 _require_loop
 
 _require_scratch
 _require_loop
 
-
-# real QA test starts here
-
 rm -f $seq.full
 
 echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seq.full
 rm -f $seq.full
 
 echo "(dev=$SCRATCH_DEV, mount=$SCRATCH_MNT)" >> $seq.full
diff --git a/050 b/050
index b20e493f06b8cfa9c03aae6fea4193f9ecba1ef0..55a1c65d7c18ddfc698652ed8b0ff422407a853b 100755 (executable)
--- a/050
+++ b/050
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 050
+# FS QA Test No. 050
 #
 # Exercises basic XFS quota functionality
 #      MOUNT_OPTIONS env var switches the test type (uid/gid/acct/enfd)
 #
 # Exercises basic XFS quota functionality
 #      MOUNT_OPTIONS env var switches the test type (uid/gid/acct/enfd)
@@ -47,6 +47,8 @@ here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 
 tmp=/tmp/$$
 status=1       # failure is the default!
 
+export MOUNT_OPTIONS=-ousrquota
+
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
@@ -54,11 +56,18 @@ status=1    # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+       cd /
        echo; echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
        echo; echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
+
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 rm -f $seq.out
 cp /dev/null $seq.full
 chmod a+rwx $seq.full  # arbitrary users will write here
 rm -f $seq.out
 cp /dev/null $seq.full
 chmod a+rwx $seq.full  # arbitrary users will write here
@@ -92,7 +101,6 @@ _filter_and_check_blocks()
        ' | _filter_repquota $1
 }
 
        ' | _filter_repquota $1
 }
 
-# real QA test starts here
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 
@@ -164,6 +172,9 @@ _file_as_id $SCRATCH_MNT/softie $id $type 1024 540
 _qmount
 repquota -$type $SCRATCH_DEV | _filter_and_check_blocks 7
 
 _qmount
 repquota -$type $SCRATCH_DEV | _filter_and_check_blocks 7
 
+
+export -n MOUNT_OPTIONS
+
 # success, all done
 status=0
 exit
 # success, all done
 status=0
 exit
diff --git a/051 b/051
index 2e91304135a67fda4a311822bec95744ad8c8cb8..b16adb1c327a3d7de47fa552957963690df374e9 100755 (executable)
--- a/051
+++ b/051
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 051
+# FS QA Test No. 051
 #
 # Test out ACLs.
 #
 #
 # Test out ACLs.
 #
@@ -53,8 +53,10 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     rm -f $tmp.*
     rm -f $tmp.*
-    rm -rf $TEST_DIR/$seq.dir1
+    [ -n "$testdir" ] && rm -rf $testdir/$seq.dir1
+    _cleanup_testdir
 }
 
 # -----
 }
 
 # -----
@@ -80,23 +82,29 @@ _cleanup()
 #   -> this would be done by simultaneously matching on ACEs
 #   -> interesting if it allows user to specify ACEs in any order
 #
 #   -> this would be done by simultaneously matching on ACEs
 #   -> interesting if it allows user to specify ACEs in any order
 #
+
+# real QA test starts here
+_supported_fs xfs udf
+_supported_os Linux
+
+[ -x /usr/bin/chacl ] || _notrun "chacl executable not found"
+[ -x $runas ] || _notrun "$runas executable not found"
+
 rm -f $seq.full
 
 rm -f $seq.full
 
+_setup_testdir
+
 _need_to_be_root
 _acl_setup_ids
 _acl_requirements
 _need_to_be_root
 _acl_setup_ids
 _acl_requirements
-[ -x $runas ] || _notrun "$runas executable not found"
 
 # get dir
 
 # get dir
-cd $TEST_DIR
+cd $testdir
 rm -rf $seq.dir1
 mkdir $seq.dir1
 cd $seq.dir1
 
 rm -rf $seq.dir1
 mkdir $seq.dir1
 cd $seq.dir1
 
-#-------------------------------------------------------
-# real QA test starts here
 echo "QA output created by $seq"
 echo "QA output created by $seq"
-
 echo ""
 echo "=== Test minimal ACE ==="
 
 echo ""
 echo "=== Test minimal ACE ==="
 
diff --git a/052 b/052
index 87a4a0dbdb53f51120be7129b147a0a60af3e214..e523e3d1438136db0b66e1a58522bb63c2839103 100755 (executable)
--- a/052
+++ b/052
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 052
+# FS QA Test No. 052
 #
 # Ensure that quota(1) displays blocksizes matching ondisk dquots.
 #
 #
 # Ensure that quota(1) displays blocksizes matching ondisk dquots.
 #
@@ -48,6 +48,8 @@ here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 
 tmp=/tmp/$$
 status=1       # failure is the default!
 
+export MOUNT_OPTIONS=-ousrquota
+
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
@@ -55,10 +57,16 @@ status=1    # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+       cd /
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 rm -f $seq.full
 
 _require_scratch
 rm -f $seq.full
 
 _require_scratch
@@ -69,7 +77,6 @@ if [ -z "$MOUNT_OPTIONS" ]; then
         MOUNT_OPTIONS="-o usrquota"; export MOUNT_OPTIONS
 fi
 
         MOUNT_OPTIONS="-o usrquota"; export MOUNT_OPTIONS
 fi
 
-# real QA test starts here
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 chmod a+w $seq.full     # arbitrary users will write here
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seq.full
 chmod a+w $seq.full     # arbitrary users will write here
@@ -134,6 +141,8 @@ echo Comparing out of quota and xfs_db
 diff $tmp.quota $tmp.xfs_db 
 [ $? -eq 0 ] && echo OK.
 
 diff $tmp.quota $tmp.xfs_db 
 [ $? -eq 0 ] && echo OK.
 
+export -n MOUNT_OPTIONS
+
 # success, all done
 status=0
 exit
 # success, all done
 status=0
 exit
diff --git a/053 b/053
index a4d4d1e9eacd0275ce20f8c1e502e54131116a68..7ae25bd7f21ae5cd8694a59c42f6aa231649e708 100755 (executable)
--- a/053
+++ b/053
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 053
+# FS QA Test No. 053
 #
 # xfs_repair breaks acls
 #
 #
 # xfs_repair breaks acls
 #
@@ -51,9 +51,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.attr
 
 . ./common.filter
 . ./common.attr
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 [ ! -x /bin/chacl -a ! -x /usr/bin/chacl ] && _notrun "chacl command not found"
 
 [ ! -x /bin/chacl -a ! -x /usr/bin/chacl ] && _notrun "chacl command not found"
 
-# real QA test starts here
 _require_scratch
 _acl_setup_ids
 _do_die_on_error=y
 _require_scratch
 _acl_setup_ids
 _do_die_on_error=y
diff --git a/054 b/054
index f5fbb82e6fc88705257383714337f1704fe8307c..98df0f87e185a3feaf7006dd018b78a55817d53a 100755 (executable)
--- a/054
+++ b/054
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 054
+# FS QA Test No. 054
 #
 # Check behavior of chown with both user and group quota enabled,
 # and changing both user and group together via chown(2).
 #
 # Check behavior of chown with both user and group quota enabled,
 # and changing both user and group together via chown(2).
@@ -57,6 +57,11 @@ _cleanup()
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
        rm -f $tmp.*
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 cp /dev/null $seq.full
 chmod ugo+rwx $seq.full
 
 cp /dev/null $seq.full
 chmod ugo+rwx $seq.full
 
@@ -108,7 +113,6 @@ _exercise()
        umount $SCRATCH_MNT 2>/dev/null
 }
 
        umount $SCRATCH_MNT 2>/dev/null
 }
 
-# real QA test starts here
 _scratch_mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
 MOUNT_OPTIONS="$MOUNT_OPTIONS -ousrquota,grpquota"; export MOUNT_OPTIONS
 _qmount
 _scratch_mkfs_xfs $SCRATCH_DEV >/dev/null 2>&1
 MOUNT_OPTIONS="$MOUNT_OPTIONS -ousrquota,grpquota"; export MOUNT_OPTIONS
 _qmount
diff --git a/055 b/055
index d2215585aa8837e992fd9835ff686143d437a500..e89eee01133b8e49df7963e831535b46baabbb5d 100755 (executable)
--- a/055
+++ b/055
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 055
+# FS QA Test No. 055
 #
 # Test xfsdump/restore to a remote IRIX tape using RMT user
 #
 #
 # Test xfsdump/restore to a remote IRIX tape using RMT user
 #
@@ -50,7 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.dump
 
 . ./common.rc
 . ./common.dump
 
+# link correct .out file
+_link_out_file $seq.out
+
 # real QA test starts here
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_tape $RMT_TAPE_USER@$RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
 
 _require_tape $RMT_TAPE_USER@$RMT_IRIXTAPE_DEV
 _create_dumpdir_fill
diff --git a/055.out b/055.out
deleted file mode 100644 (file)
index f09dd2e..0000000
--- a/055.out
+++ /dev/null
@@ -1,92 +0,0 @@
-QA output created by 055
-Creating directory system to dump using src/fill.
-Setup ....................................
-Erasing tape
-Dumping to tape...
-xfsdump  -o -F -f TAPE_DEV -M stress_tape_media -L stress_055 SCRATCH_MNT
-xfsdump: using scsi tape (drive_scsitape) strategy
-xfsdump: level 0 dump of HOSTNAME:SCRATCH_MNT
-xfsdump: dump date: DATE
-xfsdump: session id: ID
-xfsdump: session label: "stress_055"
-xfsdump: ino map phase 1: skipping (no subtrees specified)
-xfsdump: ino map phase 2: constructing initial dump list
-xfsdump: ino map phase 3: skipping (no pruning necessary)
-xfsdump: ino map phase 4: skipping (size estimated in phase 2)
-xfsdump: ino map phase 5: skipping (only one dump stream)
-xfsdump: ino map construction complete
-xfsdump: estimated dump size: NUM bytes
-xfsdump: /var/xfsdump/inventory created
-xfsdump: preparing drive
-xfsdump: WARNING: media may contain data. Overwrite option specified
-xfsdump: creating dump session media file 0 (media 0, file 0)
-xfsdump: dumping ino map
-xfsdump: dumping directories
-xfsdump: dumping non-directory files
-xfsdump: ending media file
-xfsdump: media file size NUM bytes
-xfsdump: dumping session inventory
-xfsdump: beginning inventory media file
-xfsdump: media file 1 (media 0, file 1)
-xfsdump: ending inventory media file
-xfsdump: inventory media file size NUM bytes
-xfsdump: writing stream terminator
-xfsdump: beginning media stream terminator
-xfsdump: media file 2 (media 0, file 2)
-xfsdump: ending media stream terminator
-xfsdump: media stream terminator size 245760 bytes
-xfsdump: dump size (non-dir files) : NUM bytes
-xfsdump: dump complete: SECS seconds elapsed
-xfsdump: Dump Status: SUCCESS
-Rewinding tape
-Restoring from tape...
-xfsrestore  -f TAPE_DEV  -L stress_055 RESTORE_DIR
-xfsrestore: using scsi tape (drive_scsitape) strategy
-xfsrestore: using online session inventory
-xfsrestore: searching media for directory dump
-xfsrestore: preparing drive
-xfsrestore: examining media file 0
-xfsrestore: reading directories
-xfsrestore: 3 directories and 38 entries processed
-xfsrestore: directory post-processing
-xfsrestore: restoring non-directory files
-xfsrestore: restore complete: SECS seconds elapsed
-xfsrestore: Restore Status: SUCCESS
-Comparing dump directory with restore directory
-Files DUMP_DIR/big and RESTORE_DIR/DUMP_SUBDIR/big are identical
-Files DUMP_DIR/small and RESTORE_DIR/DUMP_SUBDIR/small are identical
-Files DUMP_DIR/sub/a and RESTORE_DIR/DUMP_SUBDIR/sub/a are identical
-Files DUMP_DIR/sub/a00 and RESTORE_DIR/DUMP_SUBDIR/sub/a00 are identical
-Files DUMP_DIR/sub/a000 and RESTORE_DIR/DUMP_SUBDIR/sub/a000 are identical
-Files DUMP_DIR/sub/b and RESTORE_DIR/DUMP_SUBDIR/sub/b are identical
-Files DUMP_DIR/sub/b00 and RESTORE_DIR/DUMP_SUBDIR/sub/b00 are identical
-Files DUMP_DIR/sub/big and RESTORE_DIR/DUMP_SUBDIR/sub/big are identical
-Files DUMP_DIR/sub/c and RESTORE_DIR/DUMP_SUBDIR/sub/c are identical
-Files DUMP_DIR/sub/c00 and RESTORE_DIR/DUMP_SUBDIR/sub/c00 are identical
-Files DUMP_DIR/sub/d and RESTORE_DIR/DUMP_SUBDIR/sub/d are identical
-Files DUMP_DIR/sub/d00 and RESTORE_DIR/DUMP_SUBDIR/sub/d00 are identical
-Files DUMP_DIR/sub/e and RESTORE_DIR/DUMP_SUBDIR/sub/e are identical
-Files DUMP_DIR/sub/e00 and RESTORE_DIR/DUMP_SUBDIR/sub/e00 are identical
-Files DUMP_DIR/sub/e000 and RESTORE_DIR/DUMP_SUBDIR/sub/e000 are identical
-Files DUMP_DIR/sub/f and RESTORE_DIR/DUMP_SUBDIR/sub/f are identical
-Files DUMP_DIR/sub/f00 and RESTORE_DIR/DUMP_SUBDIR/sub/f00 are identical
-Files DUMP_DIR/sub/g and RESTORE_DIR/DUMP_SUBDIR/sub/g are identical
-Files DUMP_DIR/sub/g00 and RESTORE_DIR/DUMP_SUBDIR/sub/g00 are identical
-Files DUMP_DIR/sub/h and RESTORE_DIR/DUMP_SUBDIR/sub/h are identical
-Files DUMP_DIR/sub/h00 and RESTORE_DIR/DUMP_SUBDIR/sub/h00 are identical
-Files DUMP_DIR/sub/h000 and RESTORE_DIR/DUMP_SUBDIR/sub/h000 are identical
-Files DUMP_DIR/sub/i and RESTORE_DIR/DUMP_SUBDIR/sub/i are identical
-Files DUMP_DIR/sub/i00 and RESTORE_DIR/DUMP_SUBDIR/sub/i00 are identical
-Files DUMP_DIR/sub/j and RESTORE_DIR/DUMP_SUBDIR/sub/j are identical
-Files DUMP_DIR/sub/j00 and RESTORE_DIR/DUMP_SUBDIR/sub/j00 are identical
-Files DUMP_DIR/sub/k and RESTORE_DIR/DUMP_SUBDIR/sub/k are identical
-Files DUMP_DIR/sub/k00 and RESTORE_DIR/DUMP_SUBDIR/sub/k00 are identical
-Files DUMP_DIR/sub/k000 and RESTORE_DIR/DUMP_SUBDIR/sub/k000 are identical
-Files DUMP_DIR/sub/l and RESTORE_DIR/DUMP_SUBDIR/sub/l are identical
-Files DUMP_DIR/sub/l00 and RESTORE_DIR/DUMP_SUBDIR/sub/l00 are identical
-Files DUMP_DIR/sub/m and RESTORE_DIR/DUMP_SUBDIR/sub/m are identical
-Files DUMP_DIR/sub/m00 and RESTORE_DIR/DUMP_SUBDIR/sub/m00 are identical
-Files DUMP_DIR/sub/n and RESTORE_DIR/DUMP_SUBDIR/sub/n are identical
-Files DUMP_DIR/sub/n00 and RESTORE_DIR/DUMP_SUBDIR/sub/n00 are identical
-Files DUMP_DIR/sub/small and RESTORE_DIR/DUMP_SUBDIR/sub/small are identical
-Only in SCRATCH_MNT: RESTORE_SUBDIR
diff --git a/056 b/056
index b2080104dff8caa00bf05b7ad866ca6dd748f54d..fe1ee2f53738c1b52683fccb5d5e072f6cffdbd0 100755 (executable)
--- a/056
+++ b/056
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 056
+# FS QA Test No. 056
 #
 # Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
 # and test restoring various permissions/modes
 #
 # Test xfsdump/xfsrestore to a dump file (as opposed to a tape)
 # and test restoring various permissions/modes
@@ -52,6 +52,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _create_dumpdir_fill_perm
 _do_dump_file
 
 _create_dumpdir_fill_perm
 _do_dump_file
diff --git a/057 b/057
index c70a594129ac08f3929f2d17eaf818dfb214da7a..b8f07e43d2842fd1a960e36fc858b6be6547dc17 100755 (executable)
--- a/057
+++ b/057
@@ -1,7 +1,7 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 057
+# FS QA Test No. 057
 #
 #
-# Test out the different acl_get semantics
+# Place holder for test 075. Test out the different acl_get semantics
 #
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
 #
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
 # creator
 owner=tes@sgi.com
 
 # creator
 owner=tes@sgi.com
 
-# get standard environment, filters and checks
-. ./common.rc
-. ./common.filter
-. ./common.attr
-
 seq=`basename $0`
 echo "QA output created by $seq"
 
 seq=`basename $0`
 echo "QA output created by $seq"
 
-_cleanup()
-{
-    rm -f $tmp.*
-    rm -rf $TEST_DIR/$seq.dir1
-}
-
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
+trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 
-acl_get=$here/src/acl_get
-
-_get_file()
-{
-    _file=$1
-
-    ls -ln $_file | awk '{ print $1, $3, $4, $NF }'
-    echo ""
-
-    echo "access, default, irix-semantics"
-    $acl_get -adi $_file
-    echo ""
-
-    echo "access, default, linux-semantics"
-    $acl_get -ad $_file
-    echo ""
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
 
 
-    echo "access, fd, irix-semantics"
-    $acl_get -afi $_file
-    echo ""
+_notrun "Place holder for IRIX test 057"
 
 
-    echo "access, fd, linux-semantics"
-    $acl_get -af $_file
-    echo ""
-}
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX
 
 
-_acl_on()
-{
-    # test if acl_get syscall is operational
-    # and hence the ACL config has been turned on  
-    touch syscalltest
-    if $acl_get -l syscalltest 2>&1 | tee -a $here/$seq.full \
-    | grep 'Function not implemented' >/dev/null
-    then
-      cd $here
-      _notrun "requires kernel ACL support"
-    fi
-}
+# success, all done
+status=0
+exit
 
 
-# real QA test starts here
-[ `uname` = Linux ] && _notrun "IRIX acl_get semantics no longer required"
 
 
-rm -f $seq.full
 
 
-_need_to_be_root
 
 
-[ -x $acl_get ] || _notrun "$acl_get command not found" 
-[ ! -x /bin/chacl -a ! -x /usr/bin/chacl ] && _notrun "chacl command not found"
 
 
-# get dir
-cd $TEST_DIR
-rm -rf $seq.dir1
-mkdir $seq.dir1
-cd $seq.dir1
 
 
-_acl_on
 
 
-touch file1
-chmod 752 file1
-_get_file file1
 
 
-# ensure that full blown acls' get/set work, not just minimal ones
-_acl_setup_ids
-chacl u::rwx,g::rw-,o::---,u:$acl1:r-x,g:$acl1:r--,m::rwx file1 2>&1
-chacl -l file1 | _acl_filter_id
-_get_file file1 | _acl_filter_id
 
 
-# success, all done
-status=0
-exit
diff --git a/058 b/058
index 73d3943367dddc6778f47155422bcc88a01f537b..9f70f5d1ddccfb8fd232b6fd29348b4d8c8e0cd3 100755 (executable)
--- a/058
+++ b/058
@@ -1,7 +1,7 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 058
+# FS QA Test No. 058
 #
 #
-# Test some ACL API functions.
+# Place holder test 068. Test some ACL API functions.
 #
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
 #
 #-----------------------------------------------------------------------
 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
@@ -50,11 +50,11 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
-[ `uname` = IRIX -o `uname` = IRIX64 ] || \
-       _notrun "acl_test.c requires the IRIX ACL API"
+_notrun "Place holder for IRIX test 058"
 
 # real QA test starts here
 
 # real QA test starts here
-src/acl_test
+_supported_fs xfs
+_supported_os IRIX
 
 # success, all done
 status=0
 
 # success, all done
 status=0
diff --git a/059 b/059
index eca7b565b7b4b3a9c24d8ac342322cf0b0d9a0b3..f762ea2291fc8dd61ec0d99fae9d476ac5362db5 100755 (executable)
--- a/059
+++ b/059
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 059
+# FS QA Test No. 059
 #
 # place holder for IRIX 059 test for xfsdump/xfsrestore multi streams
 #
 #
 # place holder for IRIX 059 test for xfsdump/xfsrestore multi streams
 #
@@ -50,10 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
-# real QA test starts here
-
 _notrun "Place holder for IRIX test 059"
 
 _notrun "Place holder for IRIX test 059"
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX
+
 # success, all done
 status=0
 exit
 # success, all done
 status=0
 exit
diff --git a/060 b/060
index 2d8ee04c88930146feb9b7079c84deae31609773..2f47177527ac1739b3d3a208df27a1cb2ef5c69c 100755 (executable)
--- a/060
+++ b/060
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 060
+# FS QA Test No. 060
 #
 # place holder for IRIX 060 test for xfsdump/xfsrestore multi streams
 #
 #
 # place holder for IRIX 060 test for xfsdump/xfsrestore multi streams
 #
@@ -50,10 +50,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
-# real QA test starts here
-
 _notrun "Place holder for IRIX test 060"
 
 _notrun "Place holder for IRIX test 060"
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX
+
 # success, all done
 status=0
 exit
 # success, all done
 status=0
 exit
diff --git a/061 b/061
index 40967e940c1e12f86c877b3962b50c5b0db1b813..3c7be32c014326ae75062c8f5976e7b9f5de0978 100755 (executable)
--- a/061
+++ b/061
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 061
+# FS QA Test No. 061
 #
 # Test restoring a dump created in IRIX/XFS
 #
 #
 # Test restoring a dump created in IRIX/XFS
 #
@@ -51,6 +51,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 # src/dumpfile based on dumping from
 # _create_dumpdir_fill_perm (small dump)
 
 # src/dumpfile based on dumping from
 # _create_dumpdir_fill_perm (small dump)
diff --git a/061.out b/061.out
index be3f3822fd053a4749f46a82cab7a4d0d9e23502..37092e6ae0707896a941f1034f8945023407a18e 100644 (file)
--- a/061.out
+++ b/061.out
@@ -14,9 +14,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 0
 xfsrestore: session label: "stress_056"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 0
 xfsrestore: session label: "stress_056"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: 7 directories and 11 entries processed
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: 7 directories and 11 entries processed
diff --git a/062 b/062
index 63014d37701e1df0e8ef3907320f3430fec51fda..892369b6e2bde74977fa487a80515a4ff4670966 100755 (executable)
--- a/062
+++ b/062
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 062
+# FS QA Test No. 062
 #
 # Exercises the getfattr/setfattr tools
 # Derived from tests originally written by Andreas Gruenbacher for ext2
 #
 # Exercises the getfattr/setfattr tools
 # Derived from tests originally written by Andreas Gruenbacher for ext2
@@ -50,8 +50,11 @@ status=1     # failure is the default!
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+_get_os
+
 _cleanup()
 {
 _cleanup()
 {
+        cd /
        echo; echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
        echo; echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
        rm -f $tmp.*
@@ -60,17 +63,58 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _filter_scratch()
 {
 
 _filter_scratch()
 {
-       sed -e "s,$SCRATCH_MNT,SCRATCH_MNT,g"
+           sed -e "s,$SCRATCH_MNT,SCRATCH_MNT,g"
+}
+
+_linux_attr_calls()
+{
+    echo "*** set/get one initially empty attribute"
+    setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
+    getfattr -m $nsp $SCRATCH_MNT/$inode
+
+    echo "*** overwrite empty, set several new attributes"
+    setfattr -h -n $nsp.name -v 0xbabe $SCRATCH_MNT/$inode
+    setfattr -h -n $nsp.name2 -v 0xdeadbeef $SCRATCH_MNT/$inode
+    setfattr -h -n $nsp.name3 -v 0xdeface $SCRATCH_MNT/$inode
+
+    echo "*** fetch several attribute names and values (hex)"
+    getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+
+    echo "*** fetch several attribute names and values (base64)"
+    getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
+
+    echo "*** shrink value of an existing attribute"
+    setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
+    getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+
+    echo "*** grow value of existing attribute"
+    setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
+    getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
+
+    echo "*** set an empty value for second attribute"
+    setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
+    getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode
+
+    echo "*** overwrite empty value"
+    setfattr -h -n $nsp.name2 -v 0xcafe $SCRATCH_MNT/$inode
+    getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode
+
+    echo "*** remove attribute"
+    setfattr -h -x $nsp.name2 $SCRATCH_MNT/$inode
+    getfattr -m $nsp -e hex -n $nsp.name2 $SCRATCH_MNT/$inode
+
+    echo "*** final list (strings, type=$inode, nsp=$nsp)"
+    getfattr -m '.' -e hex $SCRATCH_MNT/$inode
 }
 
 getfattr()
 {
 }
 
 getfattr()
 {
-       /usr/bin/getfattr --absolute-names -dh $@ 2>&1 | _filter_scratch
+    /usr/bin/getfattr --absolute-names -dh $@ 2>&1 | _filter_scratch
 }
 
 setfattr()
 {
 }
 
 setfattr()
 {
-       /usr/bin/setfattr $@
+    /usr/bin/setfattr $@
 }
 
 _create_test_bed()
 }
 
 _create_test_bed()
@@ -87,6 +131,11 @@ _create_test_bed()
        find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
 }
 
        find $SCRATCH_MNT | LC_COLLATE=POSIX sort | _filter_scratch
 }
 
+# real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os Linux
+
+
 _require_scratch
 rm -f $tmp.backup1 $tmp.backup2 $seq.full
 
 _require_scratch
 rm -f $tmp.backup1 $tmp.backup2 $seq.full
 
@@ -104,8 +153,8 @@ for nsp in $ATTR_MODES; do
        for inode in reg dir lnk dev/b dev/c dev/p; do
 
                echo; echo "=== TYPE $inode; NAMESPACE $nsp"; echo
        for inode in reg dir lnk dev/b dev/c dev/p; do
 
                echo; echo "=== TYPE $inode; NAMESPACE $nsp"; echo
-
                echo "*** set/get one initially empty attribute"
                echo "*** set/get one initially empty attribute"
+    
                setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
                getfattr -m $nsp $SCRATCH_MNT/$inode
 
                setfattr -h -n $nsp.name $SCRATCH_MNT/$inode
                getfattr -m $nsp $SCRATCH_MNT/$inode
 
@@ -119,7 +168,7 @@ for nsp in $ATTR_MODES; do
 
                echo "*** fetch several attribute names and values (base64)"
                getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
 
                echo "*** fetch several attribute names and values (base64)"
                getfattr -m $nsp -e base64 $SCRATCH_MNT/$inode
-
+               
                echo "*** shrink value of an existing attribute"
                setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
                getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
                echo "*** shrink value of an existing attribute"
                setfattr -h -n $nsp.name2 -v 0xdeaf $SCRATCH_MNT/$inode
                getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
@@ -127,7 +176,7 @@ for nsp in $ATTR_MODES; do
                echo "*** grow value of existing attribute"
                setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
                getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
                echo "*** grow value of existing attribute"
                setfattr -h -n $nsp.name2 -v 0xdecade $SCRATCH_MNT/$inode
                getfattr -m $nsp -e hex $SCRATCH_MNT/$inode
-
+               
                echo "*** set an empty value for second attribute"
                setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
                getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode
                echo "*** set an empty value for second attribute"
                setfattr -h -n $nsp.name2 $SCRATCH_MNT/$inode
                getfattr -m $nsp -n $nsp.name2 $SCRATCH_MNT/$inode
@@ -142,6 +191,7 @@ for nsp in $ATTR_MODES; do
 
                echo "*** final list (strings, type=$inode, nsp=$nsp)"
                getfattr -m '.' -e hex $SCRATCH_MNT/$inode
 
                echo "*** final list (strings, type=$inode, nsp=$nsp)"
                getfattr -m '.' -e hex $SCRATCH_MNT/$inode
+       
        done
 done
 
        done
 done
 
diff --git a/063 b/063
index b34500aea4a591cca8589679f21f5481f2698b0b..a74936981659640886fd05450eb8333b0e67e69e 100755 (executable)
--- a/063
+++ b/063
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 063
+# FS QA Test No. 063
 #
 # xfsdump/xfsrestore with EAs
 #
 #
 # xfsdump/xfsrestore with EAs
 #
@@ -52,6 +52,8 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.dump
 
 # real QA test starts here
 . ./common.dump
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 # create files with EAs
 _create_dumpdir_fill_ea
 
 # create files with EAs
 _create_dumpdir_fill_ea
diff --git a/064 b/064
index d48498e8646d1c464869359d12d4dda97195f846..fa42d104367d038313603388f11d639530d0c875 100755 (executable)
--- a/064
+++ b/064
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 064
+# FS QA Test No. 064
 #
 # test multilevel dump and restores with hardlinks
 #
 #
 # test multilevel dump and restores with hardlinks
 #
@@ -66,6 +66,8 @@ _ls_size_filter()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _create_dumpdir_hardlinks 9
 
 
 _create_dumpdir_hardlinks 9
 
diff --git a/064.out b/064.out
index d089179a7c2d365665a0646382273a6e7f9004c2..cbedffc63236045b56d876e62950c0a04441b78d 100644 (file)
--- a/064.out
+++ b/064.out
@@ -348,9 +348,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 0
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 0
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -429,9 +429,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 1
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 1
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -462,9 +462,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 2
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 2
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -495,9 +495,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 3
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 3
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -528,9 +528,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 4
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 4
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -561,9 +561,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 5
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 5
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -594,9 +594,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 6
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 6
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -627,9 +627,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 7
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 7
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -660,9 +660,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 8
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 8
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -693,9 +693,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 9
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 9
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -727,9 +727,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 0
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 0
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -808,9 +808,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 1
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 1
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -889,9 +889,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 2
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 2
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -970,9 +970,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 3
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 3
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1051,9 +1051,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 4
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 4
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1132,9 +1132,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 5
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 5
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1213,9 +1213,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 6
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 6
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1294,9 +1294,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 7
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 7
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1375,9 +1375,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 8
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 8
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
@@ -1456,9 +1456,9 @@ xfsrestore: session time: TIME
 xfsrestore: level: 9
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
 xfsrestore: level: 9
 xfsrestore: session label: "stress_064"
 xfsrestore: media label: "stress_tape_media"
-xfsrestore: file system id: ID
+xfsrestore: file system ID: ID
 xfsrestore: session id: ID
 xfsrestore: session id: ID
-xfsrestore: media id: ID
+xfsrestore: media ID: ID
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
 xfsrestore: using online session inventory
 xfsrestore: searching media for directory dump
 xfsrestore: reading directories
diff --git a/065 b/065
index aaa0edfd4511905539f8a14b49736dbc4c701d7a..c4da1ff2ea5b0c253324b01fb1f6d95c19a68242 100755 (executable)
--- a/065
+++ b/065
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 065
+# FS QA Test No. 065
 #
 # Testing incremental dumps and cumulative restores with
 # "adding, deleting, renaming, linking, and unlinking files and 
 #
 # Testing incremental dumps and cumulative restores with
 # "adding, deleting, renaming, linking, and unlinking files and 
@@ -54,7 +54,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 . ./common.dump
 
 . ./common.filter
 . ./common.dump
 
-
 _my_ls_filter()
 {
     #
 _my_ls_filter()
 {
     #
@@ -75,6 +74,8 @@ _my_ls_filter()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 #
 # too much hassle to get output matching with quotas turned on
 
 #
 # too much hassle to get output matching with quotas turned on
diff --git a/066 b/066
index 75acf460676c50a17778e57e047c3aed811951bb..aab03bf3b395fd301c4ebb6c1dfb127c09df7dc1 100755 (executable)
--- a/066
+++ b/066
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 066
+# FS QA Test No. 066
 #
 # Test dumping of large files
 #
 #
 # Test dumping of large files
 #
@@ -44,27 +44,38 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 . ./common.dump
 
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 . ./common.dump
 
+_cleanup()
+{
+    cd /
+    rm -f $tmp.*
+    _cleanup_testdir
+}
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+_setup_testdir
+
 _my_ls_filter()
 {
    $AWK_PROG 'NF > 5 {print $5, $9}'
 }
 
 _my_ls_filter()
 {
    $AWK_PROG 'NF > 5 {print $5, $9}'
 }
 
-rm -f $TEST_DIR/testfile
-if src/feature -t $TEST_DIR/testfile; then
+rm -f $testdir/testfile
+if src/feature -t $testdir/testfile; then
        :
 else
        _notrun "Installed libc doesn't correctly handle setrlimit/ftruncate64"
 fi
 
        :
 else
        _notrun "Installed libc doesn't correctly handle setrlimit/ftruncate64"
 fi
 
-# real QA test starts here
-
 _create_dumpdir_largefile
 echo "ls dumpdir/largefile"
 ls -l $dump_dir | _my_ls_filter
 _create_dumpdir_largefile
 echo "ls dumpdir/largefile"
 ls -l $dump_dir | _my_ls_filter
diff --git a/067 b/067
index 74ecbd1b3c3961bfa46a3fddf5fc4d50902badb8..53603b55d7e04f82ab46ccb7b808874b55a26f3c 100755 (executable)
--- a/067
+++ b/067
@@ -1,5 +1,5 @@
-#! /bin/sh
-# XFS QA Test No. 067
+#! /bin/sh -x
+# FS QA Test No. 067
 #
 # Test out acl/dacls which fit in shortform in the inode
 #
 #
 # Test out acl/dacls which fit in shortform in the inode
 #
@@ -52,7 +52,11 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.attr
 
 # real QA test starts here
 . ./common.attr
 
 # real QA test starts here
-# 
+_supported_fs xfs
+_supported_os Linux
+
+[ -x /usr/bin/chacl ] || _notrun "chacl executable not found"
+
 _need_to_be_root
 _acl_requirements
 _require_scratch
 _need_to_be_root
 _acl_requirements
 _require_scratch
diff --git a/068 b/068
index fec586bfdcad9920fb561eb87e6f8a5fce4a5e39..c23c010ad0609dfccf768c9465d9ecbaba095821 100755 (executable)
--- a/068
+++ b/068
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 068
+# FS QA Test No. 068
 #
 # Test Linux LVM snapshot creation
 #
 #
 # Test Linux LVM snapshot creation
 #
@@ -103,6 +103,10 @@ trap "_cleanup" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 if [ -e "$SCRATCH_SNAP_MNT" ]; then
        rmdir "$SCRATCH_SNAP_MNT" || _notrun "Cannot rmdir $SCRATCH_SNAP_MNT"
 fi
 if [ -e "$SCRATCH_SNAP_MNT" ]; then
        rmdir "$SCRATCH_SNAP_MNT" || _notrun "Cannot rmdir $SCRATCH_SNAP_MNT"
 fi
@@ -134,8 +138,6 @@ if grep device-mapper /proc/devices > /dev/null; then LVM=true; fi
 [ "$LVM" = false ] && _notrun "LVM is not present in the running kernel."
 
 
 [ "$LVM" = false ] && _notrun "LVM is not present in the running kernel."
 
 
-# real QA test starts here
-
 # Create a PV set from the scratch partition
 #TODO # (I don't know if this is needed.and it is dangerous because it intentionally deletes the partition table!!! 
 #TODO # dd if=/dev/zero of="$SCRATCH_LVM_DEV" bs=512 count=1
 # Create a PV set from the scratch partition
 #TODO # (I don't know if this is needed.and it is dangerous because it intentionally deletes the partition table!!! 
 #TODO # dd if=/dev/zero of="$SCRATCH_LVM_DEV" bs=512 count=1
diff --git a/069 b/069
index 6139d4397871bc470655ff19d2aaee08fafeaa29..930dc31f7f3e7b3339eac1f612b4bf98fddb00e7 100755 (executable)
--- a/069
+++ b/069
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 069
+# FS QA Test No. 069
 #
 # Test out writes with O_APPEND flag sets.
 #
 #
 # Test out writes with O_APPEND flag sets.
 #
@@ -51,6 +51,8 @@ trap "rm -rf $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
 
 _require_scratch
 rm -f $seq.full
 
 _require_scratch
 rm -f $seq.full
@@ -58,7 +60,7 @@ rm -f $seq.full
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 echo "*** mkfs"
 umount $SCRATCH_DEV >/dev/null 2>&1
 
 echo "*** mkfs"
-_scratch_mkfs_xfs >/dev/null || _fail "mkfs failed"
+_scratch_mkfs >/dev/null || _fail "mkfs failed"
   
 echo "*** mount FS"
 _scratch_mount >/dev/null || _fail "mount failed"
   
 echo "*** mount FS"
 _scratch_mount >/dev/null || _fail "mount failed"
diff --git a/070 b/070
index f2eb6e7f091518fdebfd444fce87138b37b0b875..4a7db46193a36bca870e35802ca14aaf680efb96 100755 (executable)
--- a/070
+++ b/070
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 070
+# FS QA Test No. 070
 #
 # fsstress incarnation testing extended attributes writes
 #
 #
 # fsstress incarnation testing extended attributes writes
 #
@@ -44,16 +44,27 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
+
+_cleanup()
+{
+    cd /
+    rm -f $tmp.*
+    _cleanup_testdir
+}
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 $here/ltp/fsstress \
 
 $here/ltp/fsstress \
-       -d $TEST_DIR/fsstress \
+       -d $testdir/fsstress \
        -f allocsp=0 \
        -f freesp=0 \
        -f bulkstat=0 \
        -f allocsp=0 \
        -f freesp=0 \
        -f bulkstat=0 \
diff --git a/071 b/071
index 78387574715b7f4c1f785b9f7119b78f162962cf..7beab8dc1062ed271a6c637ba01477d598658e0e 100755 (executable)
--- a/071
+++ b/071
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 071
+# FS QA Test No. 071
 #
 # Exercise IO at large file offsets.
 #
 #
 # Exercise IO at large file offsets.
 #
@@ -48,6 +48,7 @@ status=1      # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     rm -f $tmp.*
     umount $SCRATCH_DEV 2>/dev/null
 }
     rm -f $tmp.*
     umount $SCRATCH_DEV 2>/dev/null
 }
@@ -67,6 +68,11 @@ _filter_off()
     sed -e "s/$1/<OFFSET>/g" | _filter_io
 }
 
     sed -e "s/$1/<OFFSET>/g" | _filter_io
 }
 
+_filter_xfs_io()
+{
+    sed -e "s/[0-9/.]* bytes, [0-9] ops\; [0-9/.]* sec ([0-9/.]* [MKiBbytes]*\/sec and [0-9/.]* ops\/sec)/XXX bytes, X ops\; XXX sec (X YYY\/sec and XXX ops\/sec/"
+}
+
 write_block()
 {
     location=$1
 write_block()
 {
     location=$1
@@ -80,13 +86,13 @@ write_block()
     echo "Writing $bytes bytes, offset is $words (direct=$direct)" | _filter_io
     echo "Writing $bytes bytes at $location $words (direct=$direct)" >>$seq.full
     xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \
     echo "Writing $bytes bytes, offset is $words (direct=$direct)" | _filter_io
     echo "Writing $bytes bytes at $location $words (direct=$direct)" >>$seq.full
     xfs_io -c "pwrite $offset 512" $flags $SCRATCH_MNT/$seq \
-       2>&1 | _filter_off $offset | tee -a $seq.full
+       2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full
     xfs_bmap -v $SCRATCH_MNT/$seq >>$seq.full
 
     echo "Reading $bytes bytes (direct=$direct)" | _filter_io
     echo "Reading $bytes bytes at $location (direct=$direct)" >>$seq.full
     xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \
     xfs_bmap -v $SCRATCH_MNT/$seq >>$seq.full
 
     echo "Reading $bytes bytes (direct=$direct)" | _filter_io
     echo "Reading $bytes bytes at $location (direct=$direct)" >>$seq.full
     xfs_io -c "pread $offset $bytes" $flags $SCRATCH_MNT/$seq \
-       2>&1 | _filter_off $offset | tee -a $seq.full
+       2>&1 | _filter_off $offset | _filter_xfs_io | tee -a $seq.full
 
     xfs_io -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full
 
 
     xfs_io -c "pread -v $offset $bytes" $flags $SCRATCH_MNT/$seq >>$seq.full
 
@@ -94,9 +100,14 @@ write_block()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found"
+
 _require_scratch
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
 _require_scratch
 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
-source $tmp.mkfs
+. $tmp.mkfs
 echo
 _scratch_mount
 
 echo
 _scratch_mount
 
diff --git a/071.out b/071.out
index 2ea0ef02a51ee5ba16bef75d854c24577885778a..26d45aa7143e7917acb0b94e33624ddfb16048b3 100644 (file)
--- a/071.out
+++ b/071.out
@@ -8,33 +8,45 @@ realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX
 
 Writing 512 bytes, offset is +0 (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is +0 (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 1 bytes (direct=false)
 read 1/1 bytes at offset <OFFSET>
 Reading 1 bytes (direct=false)
 read 1/1 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 1FSB bytes (direct=true)
 read 512/1FSB bytes at offset <OFFSET>
 Reading 1FSB bytes (direct=true)
 read 512/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 1FSB bytes (direct=true)
 read 513/1FSB bytes at offset <OFFSET>
 Reading 1FSB bytes (direct=true)
 read 513/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 === Iterating, 2 remains
 
 
 === Iterating, 2 remains
 
@@ -43,31 +55,39 @@ Writing 512 bytes, offset is +0 (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
 Reading 512 bytes (direct=false)
 read 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 wrote 512/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 Reading 1 bytes (direct=false)
 read 1/1 bytes at offset <OFFSET>
 Reading 1 bytes (direct=false)
 read 1/1 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 === Iterating, 1 remains
 
 
 === Iterating, 1 remains
 
@@ -76,31 +96,37 @@ Writing 512 bytes, offset is +0 (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1 byte (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
 
 Writing 512 bytes, offset is minus 1FSB (direct=false)
 pwrite64: File too large
 Reading 512 bytes (direct=false)
 read 0/512 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 pwrite64: File too large
 Reading 1 bytes (direct=false)
 read 0/1 bytes at offset <OFFSET>
 
 Writing 1 bytes, offset is minus 1FSB (direct=false)
 pwrite64: File too large
 Reading 1 bytes (direct=false)
 read 0/1 bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is +0 (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
 
 Writing 1FSB bytes, offset is minus 1FSB (direct=true)
 pwrite64: File too large
 Reading 1FSB bytes (direct=true)
 read 0/1FSB bytes at offset <OFFSET>
+XXX bytes, X ops; XXX sec (X YYY/sec and XXX ops/sec
 
 === Iterating, 0 remains
 
 
 === Iterating, 0 remains
 
diff --git a/072 b/072
index 3f54571fc7ef7f8d7f95d5549011f99d7c590270..af150bc70c020afdfd20c6b92a87be0d74583325 100755 (executable)
--- a/072
+++ b/072
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 072
+# FS QA Test No. 072
 #
 # Check some unwritten extent boundary conditions
 #
 #
 # Check some unwritten extent boundary conditions
 #
@@ -43,8 +43,9 @@ echo "QA output created by $seq"
 
 _cleanup()
 {
 
 _cleanup()
 {
-       umount $SCRATCH_MNT 2>/dev/null
+       cd /
        rm -f $tmp.*
        rm -f $tmp.*
+       umount $SCRATCH_MNT 2>/dev/null
 }
 
 here=`pwd`
 }
 
 here=`pwd`
@@ -57,6 +58,11 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
+[ -x /usr/sbin/xfs_io ] || _notrun "xfs_io executable not found"
+
 _require_scratch
 
 rm -f $seq.full
 _require_scratch
 
 rm -f $seq.full
diff --git a/073 b/073
index 3107543ac78a7008e850dfbcc148d9addd0e00d2..65c2f5861be7c319fe74c9ddaaf10b1dd571e204 100755 (executable)
--- a/073
+++ b/073
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 073
+# FS QA Test No. 073
 #
 # Test xfs_copy
 #
 #
 # Test xfs_copy
 #
@@ -46,6 +46,7 @@ tmp=/tmp/$$
 status=1       # failure is the default!
 _cleanup()
 {
 status=1       # failure is the default!
 _cleanup()
 {
+       cd /
        umount $SCRATCH_MNT 2>/dev/null
        umount $tmp.loop 2>/dev/null
        [ -d $tmp.loop ] && rmdir $tmp.loop
        umount $SCRATCH_MNT 2>/dev/null
        umount $tmp.loop 2>/dev/null
        [ -d $tmp.loop ] && rmdir $tmp.loop
@@ -79,7 +80,7 @@ _verify_copy()
        [ $source = $SCRATCH_DEV ] && _scratch_mount
 
        echo checking new image
        [ $source = $SCRATCH_DEV ] && _scratch_mount
 
        echo checking new image
-       _check_filesystem $target
+       _check_xfs_filesystem $target
 
        echo mounting new image on loopback
        rmdir $target_dir 2>/dev/null
 
        echo mounting new image on loopback
        rmdir $target_dir 2>/dev/null
@@ -130,10 +131,14 @@ _verify_copy()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+
+# real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 [ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
 [ -x /usr/sbin/xfs_copy ] || _notrun "xfs_copy binary not yet installed"
 
 [ "$USE_EXTERNAL" = yes ] && _notrun "Cannot xfs_copy with external devices"
 [ -x /usr/sbin/xfs_copy ] || _notrun "xfs_copy binary not yet installed"
 
-# real QA test starts here
 _require_scratch
 _require_loop
 
 _require_scratch
 _require_loop
 
diff --git a/074 b/074
index cec6c6dc2f583dfae6421c36901656bc6b8584a3..8f9d4721cceca43511980df4fc8732669494edb4 100755 (executable)
--- a/074
+++ b/074
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 074
+# FS QA Test No. 074
 #
 # fstest
 #
 #
 # fstest
 #
@@ -48,19 +48,24 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/fstest.$$.* $tmp.*
+    cd /
+    rm -rf $testdir/fstest.$$.* $tmp.*
+    _cleanup_testdir
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 }
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
+# link correct .out file
+_link_out_file $seq.out
+
 _do_test()
 {
     _n="$1"
     _param="$2"
 
 _do_test()
 {
     _n="$1"
     _param="$2"
 
-    out=$TEST_DIR/fstest.$$.$_n
+    out=$testdir/fstest.$$.$_n
     rm -rf $out
     if ! mkdir $out
     then
     rm -rf $out
     if ! mkdir $out
     then
@@ -85,6 +90,10 @@ _do_test()
 
 
 # real QA test starts here
 
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
@@ -110,6 +119,5 @@ _do_test 0 ""                       # defaults
 _do_test 1 "-s $size10 -b 8192 -m"
 
 _do_test 2 "-n 3 -Fp -f 10 -s $size30 -b 512"
 _do_test 1 "-s $size10 -b 8192 -m"
 
 _do_test 2 "-n 3 -Fp -f 10 -s $size30 -b 512"
-
 _do_test 3 "-n 3 -Fp -f 10 -s $size30 -b 512 -m"
 
 _do_test 3 "-n 3 -Fp -f 10 -s $size30 -b 512 -m"
 
diff --git a/074.out b/074.out
index c1395bbb851c5395c98c66e86fec9b6c572a1c45..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
--- a/074.out
+++ b/074.out
@@ -1,18 +0,0 @@
-QA output created by 074
-brevity is wit...
-
------------------------------------------------
-fstest.0 : 
------------------------------------------------
-
------------------------------------------------
-fstest.1 : -s 10485760 -b 8192 -m
------------------------------------------------
-
------------------------------------------------
-fstest.2 : -n 3 -Fp -f 10 -s 31457280 -b 512
------------------------------------------------
-
------------------------------------------------
-fstest.3 : -n 3 -Fp -f 10 -s 31457280 -b 512 -m
------------------------------------------------
diff --git a/075 b/075
index 80cf9d5112b23056e3449a7543b054fa9d1d8fde..2ecbca2950f1e7702826cf8c19e27927f5f3d732 100755 (executable)
--- a/075
+++ b/075
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 075
+# FS QA Test No. 075
 #
 # fsx
 #
 #
 # fsx
 #
@@ -48,7 +48,9 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
-    rm -rf $TEST_DIR/fsx.* $tmp.*
+    cd /
+    rm -rf $testdir/fsx.* $tmp.*
+    _cleanup_testdir
 }
 
 # get standard environment, filters and checks
 }
 
 # get standard environment, filters and checks
@@ -60,7 +62,7 @@ _do_test()
     _n="$1"
     _param="$2"
 
     _n="$1"
     _param="$2"
 
-    out=$TEST_DIR/fsx
+    out=$testdir/fsx
     rm -rf $out
     if ! mkdir $out
     then
     rm -rf $out
     if ! mkdir $out
     then
@@ -74,6 +76,15 @@ _do_test()
     echo "fsx.$_n : $_param"
     echo "-----------------------------------------------"
 
     echo "fsx.$_n : $_param"
     echo "-----------------------------------------------"
 
+    if [ "$FSTYP" = "nfs" ]
+    then
+       if [ "$_n" = "1" -o "$_n" = "3" ]
+       then
+           # HACK: nfs don't handle preallocation (-x) so just skip this test
+           return
+       fi
+    fi
+
     # This cd and use of -P gets full debug on $here (not TEST_DEV)
     cd $out
     if ! $here/ltp/fsx $_param -P $here $seq.$_n >/dev/null
     # This cd and use of -P gets full debug on $here (not TEST_DEV)
     cd $out
     if ! $here/ltp/fsx $_param -P $here $seq.$_n >/dev/null
@@ -90,6 +101,10 @@ _do_test()
 
 
 # real QA test starts here
 
 
 # real QA test starts here
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
+_setup_testdir
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
 
 rm -f $here/$seq.full
 echo "brevity is wit..."
diff --git a/076 b/076
index 44e4ad2ff0f580395ef5497ebf6f8d449b91a30c..45d32ec2cccbcca2b3d671917efd5d1c55b59f40 100755 (executable)
--- a/076
+++ b/076
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 076
+# FS QA Test No. 076
 #
 # Test blockdev reads in parallel with filesystem reads/writes
 #
 #
 # Test blockdev reads in parallel with filesystem reads/writes
 #
@@ -67,6 +67,8 @@ trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs udf
+_supported_os IRIX Linux
 
 _require_scratch
 
 
 _require_scratch
 
diff --git a/077 b/077
index 21e2b159ef2878d08466b836bc07576e7a4a468b..8b1175f1cf3017bfb31d32481d6c288c4c0d9d5b 100755 (executable)
--- a/077
+++ b/077
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 077
+# FS QA Test No. 077
 #
 # Check use of ACLs (extended attributes) on a full filesystem
 #
 #
 # Check use of ACLs (extended attributes) on a full filesystem
 #
@@ -44,10 +44,12 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1
 here=`pwd`
 tmp=/tmp/$$
 status=1
-filler=$here/../../linux
+#filler=$here/../../linux
+filler=/home/fsgqa/isms/2.4.x-xfs
 
 _cleanup()
 {
 
 _cleanup()
 {
+       cd /
        echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
 }
        echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
 }
@@ -58,6 +60,8 @@ trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
 
 [ ! -d $filler ] && _notrun "No linux directory to source files from"
 
 
 [ ! -d $filler ] && _notrun "No linux directory to source files from"
 
diff --git a/078 b/078
index e16632658ea952bddf369a972b2c7fb3bc405811..11570173b0a49c510027ba9a508726317eb2a926 100755 (executable)
--- a/078
+++ b/078
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 078
+# FS QA Test No. 078
 #
 # Check several growfs corner cases
 #
 #
 # Check several growfs corner cases
 #
@@ -45,12 +45,21 @@ here=`pwd`
 tmp=/tmp/$$
 status=1
 
 tmp=/tmp/$$
 status=1
 
+trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+
+# get standard environment, filters and checks
+. ./common.rc
+. ./common.filter
+
+
 _cleanup()
 {
 _cleanup()
 {
-       umount $LOOP_MNT 2>/dev/null
-       rmdir $LOOP_MNT
+    cd /
+    rm -f $tmp.*
+    umount $LOOP_MNT 2>/dev/null
+    rmdir $LOOP_MNT
+    _cleanup_testdir
 }
 }
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 
 # get standard environment, filters and checks
 . ./common.rc
@@ -95,7 +104,7 @@ _grow_loop()
 
        echo "*** unmount and check"
        umount $LOOP_MNT
 
        echo "*** unmount and check"
        umount $LOOP_MNT
-       _check_filesystem $LOOP_DEV
+       _check_xfs_filesystem $LOOP_DEV
        rm -f $LOOP_DEV
 }
 
        rm -f $LOOP_DEV
 }
 
diff --git a/079 b/079
index bb55f0c2d29cbb2998e81424b95674ed2f11c8f4..df5ff8d2cf07bfc8cd16004acff6baa7a38d5419 100755 (executable)
--- a/079
+++ b/079
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 079
+# FS QA Test No. 079
 #
 # Run the t_immutable test program for immutable/append-only files.
 #
 #
 # Run the t_immutable test program for immutable/append-only files.
 #
@@ -49,6 +49,7 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     echo "*** cleaning up"
     $timmutable -r $SCRATCH_MNT/$seq
     umount $SCRATCH_MNT
     echo "*** cleaning up"
     $timmutable -r $SCRATCH_MNT/$seq
     umount $SCRATCH_MNT
@@ -58,6 +59,9 @@ _cleanup()
 . ./common.rc
 . ./common.filter
 
 . ./common.rc
 . ./common.filter
 
+_supported_fs xfs
+_supported_os Linux
+
 _require_scratch
 [ -x $timmutable ] || _notrun "t_immutable was not built for this platform"
 
 _require_scratch
 [ -x $timmutable ] || _notrun "t_immutable was not built for this platform"
 
diff --git a/080 b/080
index 6dad71cfe65f6199d7650c210e20db1a0c50a71c..548df04eac52a35bc9f79ff37648fa43e86043c0 100755 (executable)
--- a/080
+++ b/080
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 080
+# FS QA Test No. 080
 #
 # rwtest (iogen|doio)
 #
 #
 # rwtest (iogen|doio)
 #
@@ -44,17 +44,29 @@ echo "QA output created by $seq"
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
 here=`pwd`
 tmp=/tmp/$$
 status=1       # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
+_cleanup()
+{ 
+    cd /
+    rm -f $tmp.*
+   _cleanup_testdir
+}
+
+_supported_fs xfs
+_supported_os IRIX Linux
+
+_setup_testdir
+
 quiet=-q
 clean=-c
 
 export here
 quiet=-q
 clean=-c
 
 export here
-cd $TEST_DIR
+cd $testdir
 echo
 
 # real QA test starts here
 echo
 
 # real QA test starts here
diff --git a/081 b/081
index 3179619f9181ebc613b103ff069a20fa8ac670bf..98af9e6895c6c15c0c031e585296c3a0c1741e92 100755 (executable)
--- a/081
+++ b/081
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 081
+# FS QA Test No. 081
 #
 # To test out logprint with quotas
 #
 #
 # To test out logprint with quotas
 #
@@ -50,8 +50,13 @@ status=1     # failure is the default!
 . ./common.filter
 . ./common.log
 
 . ./common.filter
 . ./common.log
 
+# real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _cleanup()
 {
 _cleanup()
 {
+    cd /
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
@@ -59,8 +64,6 @@ _cleanup()
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
 }
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
-# real QA test starts here
-
 # prelim
 rm -f $seq.full $tmp.*
 _require_scratch
 # prelim
 rm -f $seq.full $tmp.*
 _require_scratch
diff --git a/082 b/082
index 11707e4f718f56883d801c2248309dcdc44d56e9..8f231d5c5b06f8c970133d2f831d6a76edcb8d3a 100755 (executable)
--- a/082
+++ b/082
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 082
+# FS QA Test No. 082
 #
 # Test out the v2 stripe logs with logprint
 #
 #
 # Test out the v2 stripe logs with logprint
 #
@@ -36,7 +36,7 @@
 #-----------------------------------------------------------------------
 #
 # creator
 #-----------------------------------------------------------------------
 #
 # creator
-owner=root@icy.melbourne.sgi.com
+owner=tes@melbourne.sgi.com
 
 seq=`basename $0`
 echo "QA output created by $seq"
 
 seq=`basename $0`
 echo "QA output created by $seq"
@@ -52,6 +52,7 @@ status=1      # failure is the default!
 
 _cleanup()
 {
 
 _cleanup()
 {
+    cd /
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
     _cleanup_logfiles
     rm -f $tmp.*
     echo "*** unmount"
diff --git a/083 b/083
index c34051e113687d7a316d1aac11a0211fa2068488..c3022d611a58dabd620f4eaabb98a45f567d6d47 100755 (executable)
--- a/083
+++ b/083
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 083
+# FS QA Test No. 083
 #
 # Exercise filesystem full behaviour - run numerous fsstress
 # processes in write mode on a small filesystem.  NB: delayed
 #
 # Exercise filesystem full behaviour - run numerous fsstress
 # processes in write mode on a small filesystem.  NB: delayed
@@ -53,14 +53,18 @@ _cleanup()
 {
        echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
 {
        echo "*** unmount"
        umount $SCRATCH_MNT 2>/dev/null
+       rm -f $tmp.*
 }
 }
-trap "_cleanup; rm -f $tmp.*; exit \$status" 0 1 2 3 15
+trap "_cleanup; exit \$status" 0 1 2 3 15
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
 
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 _require_scratch
 _require_nobigloopfs
 
 _require_scratch
 _require_nobigloopfs
 
diff --git a/084 b/084
index 8a9c28de108fd0d416d9a3eadaa4f3a4093e304b..99ddc3673c5223d4abb20418979d731c54e77932 100755 (executable)
--- a/084
+++ b/084
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 084
+# FS QA Test No. 084
 #
 # Exercises unwritten extent reads and writes, looking
 # for data corruption (zeroes read) near the end of file.
 #
 # Exercises unwritten extent reads and writes, looking
 # for data corruption (zeroes read) near the end of file.
@@ -64,6 +64,9 @@ pgsize=`$here/src/feature -p`
 # -s == preallocation size
 
 # real QA test starts here
 # -s == preallocation size
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 echo
 echo "*** First case - I/O blocksize same as pagesize"
 $here/src/resvtest -i 20 -b $pgsize "$TEST_DIR/resv" | _filter_resv
 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/086 b/086
index 03cf1b9ca476c8c0e13f9435e2f0f47dcd1782ff..99573e0e582fd2bb78918724b4f7556a82927d28 100755 (executable)
--- a/086
+++ b/086
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 086
+# FS QA Test No. 086
 #
 # To test log replay with version 2 logs
 # Initially keep this simple with just creates.
 #
 # To test log replay with version 2 logs
 # Initially keep this simple with just creates.
@@ -54,6 +54,9 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.log
 
 # real QA test starts here
 . ./common.log
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 rm -f $seq.full $tmp.*
 _require_scratch
 
 rm -f $seq.full $tmp.*
 _require_scratch
 
diff --git a/087 b/087
index 4054ec578e53d824b9ce4e9b448fa2553aa0be9b..5a0214713979712e58a6cedfff6a6aac344fa038 100755 (executable)
--- a/087
+++ b/087
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 087
+# FS QA Test No. 087
 #
 # * like 086 but want to create more/different kinds of metadata
 #   and so will use fsstress
 #
 # * like 086 but want to create more/different kinds of metadata
 #   and so will use fsstress
@@ -67,6 +67,9 @@ _do_meta()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
+
 rm -f $seq.full $tmp.*
 _require_scratch
 
 rm -f $seq.full $tmp.*
 _require_scratch
 
diff --git a/088 b/088
index a19752ffc67e96178f11bc0eff95a701e508319f..b530023ae1690d319a15f3a03869e9c767234c26 100755 (executable)
--- a/088
+++ b/088
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 088
+# FS QA Test No. 088
 #
 # test out CAP_DAC_OVERRIDE and CAP_DAC_SEARCH code in 
 # xfs_iaccess(ip,mode,cr)
 #
 # test out CAP_DAC_OVERRIDE and CAP_DAC_SEARCH code in 
 # xfs_iaccess(ip,mode,cr)
@@ -58,6 +58,8 @@ _filter()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 path=$TEST_DIR/t_access
 src/t_access_root $path | _filter
 
 path=$TEST_DIR/t_access
 src/t_access_root $path | _filter
diff --git a/089 b/089
index 00825486c4e97212e99da6a270d51b69a6fb7be1..114138d78344b015fcddf88fb6c623d3e528596a 100755 (executable)
--- a/089
+++ b/089
@@ -1,5 +1,5 @@
 #! /bin/sh
 #! /bin/sh
-# XFS QA Test No. 089
+# FS QA Test No. 089
 #
 # Emulate the way Linux mount manipulates /etc/mtab to attempt to
 # reproduce a possible bug in rename (see src/t_mtab.c).
 #
 # Emulate the way Linux mount manipulates /etc/mtab to attempt to
 # reproduce a possible bug in rename (see src/t_mtab.c).
@@ -63,6 +63,9 @@ addentries()
 }
 
 # real QA test starts here
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
 rm -f $seq.full
 [ "X$TEST_DIR" = "X" ] && exit 1
 cd $TEST_DIR
 rm -f $seq.full
 [ "X$TEST_DIR" = "X" ] && exit 1
 cd $TEST_DIR
index 28df9f353c451fb1d6290efaf120266b8a7254ce..aabe9c995fa11f3659b959bf54a7f3a0cd2fc52e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -38,7 +38,7 @@ include $(TOPDIR)/include/builddefs
 endif
 
 TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
 endif
 
 TESTS = $(shell sed -n -e '/^[0-9][0-9][0-9]*/s/ .*//p' group)
-CONFIGURE = configure include/builddefs
+CONFIGURE = configure include/builddefs include/config.h
 LSRCFILES = configure configure.in aclocal.m4 README VERSION
 LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
        check.log check.time
 LSRCFILES = configure configure.in aclocal.m4 README VERSION
 LDIRT = config.log .dep config.status config.cache confdefs.h conftest* \
        check.log check.time
@@ -59,6 +59,7 @@ clean:  # if configure hasn't run, nothing to clean
 endif
 
 $(CONFIGURE):
 endif
 
 $(CONFIGURE):
+       autoheader
        autoconf
        ./configure
 
        autoconf
        ./configure
 
diff --git a/common b/common
index 531e1c2f6209eb0eb3a0e083d219518f3da3e82b..736500aa56beb672dc4345564818f6d1a251e4a4 100644 (file)
--- a/common
+++ b/common
@@ -1,4 +1,4 @@
-##/bin/sh
+##/bin/sh 
 #
 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 #
 # Copyright (c) 2000-2001 Silicon Graphics, Inc.  All Rights Reserved.
 # 
@@ -49,15 +49,15 @@ check=${check-true}
 
 if $check
 then
 
 if $check
 then
-    if make >/tmp/$$.make 2>&1
+    if $MAKE_PROG >/tmp/$$.gmake 2>&1
     then
        :
     else
     then
        :
     else
-       cat /tmp/$$.make
-       echo "Warning: make failed -- some tests may be missing"
+       cat /tmp/$$.gmake
+       echo "Warning: $MAKE_PROG failed -- some tests may be missing"
        warn=1
     fi
        warn=1
     fi
-    rm -f /tmp/$$.make
+    rm -f /tmp/$$.gmake
 fi
 
 diff=diff
 fi
 
 diff=diff
@@ -66,6 +66,7 @@ then
     which xdiff >/dev/null 2>&1 && diff=xdiff
     which gdiff >/dev/null 2>&1 && diff=gdiff
     which tkdiff >/dev/null 2>&1 && diff=tkdiff
     which xdiff >/dev/null 2>&1 && diff=xdiff
     which gdiff >/dev/null 2>&1 && diff=gdiff
     which tkdiff >/dev/null 2>&1 && diff=tkdiff
+    which xxdiff >/dev/null 2>&1 && diff=xxdiff
 fi
 verbose=false
 quick=${quick-false}
 fi
 verbose=false
 quick=${quick-false}
@@ -77,6 +78,8 @@ expunge=true
 have_test_arg=false
 rm -f $tmp.list $tmp.tmp $tmp.sed
 
 have_test_arg=false
 rm -f $tmp.list $tmp.tmp $tmp.sed
 
+export FSTYP=xfs
+
 for r
 do
 
 for r
 do
 
@@ -147,16 +150,35 @@ common options
     -v                 verbose
 
 check options
     -v                 verbose
 
 check options
+    -xfs                test XFS
+    -udf                test UDF
+    -nfs                test NFS
     -g group[,group...]        include tests from these groups
     -l                 line mode diff [xdiff]
     -n                 show me, do not run tests
     -q                 quick, no checks (you are on your own)
     -T                 output timestamps
     -x group[,group...]        exclude tests from these groups
     -g group[,group...]        include tests from these groups
     -l                 line mode diff [xdiff]
     -n                 show me, do not run tests
     -q                 quick, no checks (you are on your own)
     -T                 output timestamps
     -x group[,group...]        exclude tests from these groups
+    -r                         randomize order
 '
            exit 0
            ;;
 
 '
            exit 0
            ;;
 
+       -udf)   # -udf ... set FSTYP to udf
+           FSTYP=udf
+           xpand=false
+           ;;
+
+       -xfs)   # -xfs ... set FSTYP to xfs
+           FSTYP=xfs
+           xpand=false
+           ;;
+
+       -nfs)   # -nfs ... set FSTYP to nfs
+           FSTYP=nfs
+           xpand=false
+           ;;
+
        -g)     # -g group ... pick from group file
            group=true
            xpand=false
        -g)     # -g group ... pick from group file
            group=true
            xpand=false
@@ -186,12 +208,10 @@ check options
            verbose=true
            xpand=false
            ;;
            verbose=true
            xpand=false
            ;;
-
        -x)     # -x group ... exclude from group file
            xgroup=true
            xpand=false
            ;;
        -x)     # -x group ... exclude from group file
            xgroup=true
            xpand=false
            ;;
-
        '[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]')
            echo "No tests?"
            status=1
        '[0-9][0-9][0-9] [0-9][0-9][0-9][0-9]')
            echo "No tests?"
            status=1
@@ -275,17 +295,32 @@ if $quick
 then
     :
 else
 then
     :
 else
-
-    if ( cd src; make -i )
+    
+    if ( cd src; $MAKE_PROG -is)
     then
        :
     else
        echo
        echo ":----------------------------------------------"
     then
        :
     else
        echo
        echo ":----------------------------------------------"
-       echo ": Warning: make failed in src -- some tests may fail as a result"
+       echo ": Warning: $MAKE_PROG failed in src -- some tests may fail as a result"
        echo ":----------------------------------------------"
        echo
        warn=1
     fi
 
 fi
        echo ":----------------------------------------------"
        echo
        warn=1
     fi
 
 fi
+
+case "$FSTYP" in
+    xfs)
+        [ "$XFS_LOGPRINT_PROG" = "" ] && _fatal "xfs_logprint not found"
+        [ "$XFS_REPAIR_PROG" = "" ] && _fatal "xfs_repair not found"
+        [ "$XFS_CHECK_PROG" = "" ] && _fatal "xfs_check not found"
+        [ "$XFS_DB_PROG" = "" ] && _fatal "xfs_db not found"
+        [ "$MKFS_XFS_PROG" = "" ] && _fatal "mkfs_xfs not found" 
+        ;;
+    udf)
+        [ "$MKFS_UDF_PROG" = "" ] && _fatal "mkfs_udf not found"
+        ;;
+    nfs)
+        ;;
+esac
\ No newline at end of file
index 80aa6360092649ac569c2c1bd00f76beb9727d05..9bf1e4003512ab0a0f1fb0adf85c7407b8b21aff 100644 (file)
@@ -109,9 +109,10 @@ _filter_aces()
 _acl_requirements()
 {
     xfsdir=$TEST_DIR
 _acl_requirements()
 {
     xfsdir=$TEST_DIR
+    
 
 
-    if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl ]; then
-       _notrun "chacl command not found"
+    if [ ! -x /bin/chacl -a ! -x /usr/bin/chacl -a ! -x /sbin/chacl ]; then
+       _notrun "chacl command not found"
     fi
 
     # test if acl_get syscall is operational
     fi
 
     # test if acl_get syscall is operational
index ec67b319b8ee92146133f47c9f87c09c091a7704..2a791277cdcb83d01596f32d40b1ed6455f80e98 100644 (file)
@@ -1,5 +1,4 @@
 ##/bin/sh
 ##/bin/sh
-
 #
 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 #
 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
 # 
 #   validity or mountedness.
 #
 
 #   validity or mountedness.
 #
 
+# Warning: don't put freeware before /usr/bsd on IRIX coz you'll
+#          get the wrong hostname and set your system name to -s  :)
+[ -d /usr/bsd ] && PATH=$PATH:/usr/bsd
+[ -d /usr/freeware/bin ] && PATH=$PATH:/usr/freeware/bin
+PATH=".:$PATH"
+
 HOST=`hostname -s`
 HOST=`hostname -s`
+HOSTOS=`uname -s`
+[ "$HOSTOS" = "IRIX64" ] && HOSTOS="IRIX"
+
 MODULAR=0              # using XFS as a module or not
 BOOT="/boot"           # install target for kernels
 export EXTRA=${EXTRA:=xfs-qa}
 MODULAR=0              # using XFS as a module or not
 BOOT="/boot"           # install target for kernels
 export EXTRA=${EXTRA:=xfs-qa}
@@ -72,15 +80,101 @@ SOAK_STRESS=10000  # -n option to fsstress
 SOAK_PASSES=-1         # count of repetitions of fsstress (while soaking)
 EMAIL=root@localhost   # where auto-qa will send its status messages
 export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
 SOAK_PASSES=-1         # count of repetitions of fsstress (while soaking)
 EMAIL=root@localhost   # where auto-qa will send its status messages
 export HOST_OPTIONS=${HOST_OPTIONS:=local.config}
-export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
-export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
 export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
 export BENCH_PASSES=${BENCH_PASSES:=5}
 export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
 export BENCH_PASSES=${BENCH_PASSES:=5}
+export XFS_MKFS_OPTIONS=${XFS_MKFS_OPTIONS:=-bsize=4096}
+[ "$HOSTOS" == "Linux" ] && export XFS_MOUNT_OPTIONS=${XFS_MOUNT_OPTIONS:=-ologbufs=2}
+export UDF_MKFS_OPTIONS=${UDF_MKFS_OPTIONS}
+export UDF_MOUNT_OPTIONS=${UDF_MOUNT_OPTIONS}
+export NFS_MKFS_OPTIONS=${NFS_MKFS_OPTIONS}
+export NFS_MOUNT_OPTIONS=${NFS_MOUNT_OPTIONS}
 
 #export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
 export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
 export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes}
 
 
 #export DEBUG=${DEBUG:=...} # arbitrary CFLAGS really.
 export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
 export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes}
 
+# $1 = prog to look for, $2* = default pathnames if not found in $PATH
+set_prog_path()
+{
+    p=`which $1 2> /dev/null`
+    if [ -n "$p" -a -x "$p" ]
+    then
+       echo $p
+       return 0
+    fi
+    p=$1
+
+    shift
+    for f
+    do
+       if [ -x $f ]
+       then
+           echo $f
+           return 0
+       fi
+    done
+
+    echo ""
+    return 1
+}
+
+_fatal()
+{
+    echo "$*"
+    status=1
+    exit 1
+}
+
+export MKFS_PROG="`set_prog_path mkfs`"
+[ "$MKFS_PROG" = "" ] && _fatal "mkfs not found"
+
+export AWK_PROG="`set_prog_path awk`"
+[ "$AWK_PROG" = "" ] && _fatal "awk not found"
+
+export MOUNT_PROG="`set_prog_path mount`"
+[ "$MOUNT_PROG" = "" ] && _fatal "mount not found"
+
+export UMOUNT_PROG="`set_prog_path umount`"
+[ "$UMOUNT_PROG" = "" ] && _fatal "umount not found"
+
+export NSLOOKUP_PROG="`set_prog_path nslookup`"
+[ "$NSLOOKUP_PROG" = "" ] && _fatal "nslookup not found"
+
+export PERL_PROG="`set_prog_path perl`"
+[ "$PERL_PROG" = "" ] && _fatal "perl not found"
+
+export SED_PROG="`set_prog_path sed`"
+[ "$SED_PROG" = "" ] && _fatal "sed not found"
+
+export MAKE_PROG="`set_prog_path gmake`"
+[ "$MAKE_PROG" = "" ] && _fatal "gmake not found"
+
+export PS_ALL_FLAGS="-ef"
+
+export DF_PROG="`set_prog_path df`"
+[ "$DF_PROG" = "" ] && _fatal "df not found"
+[ "$HOSTOS" = "Linux" ] && export DF_PROG="$DF_PROG -T"
+
+export XFS_LOGPRINT_PROG="`set_prog_path xfs_logprint`"
+export XFS_REPAIR_PROG="`set_prog_path xfs_repair`"
+export XFS_CHECK_PROG="`set_prog_path xfs_check`"
+export XFS_DB_PROG="`set_prog_path xfs_db`"
+
+case "$HOSTOS" in
+    IRIX*)
+          export MKFS_XFS_PROG="`set_prog_path mkfs_xfs`"
+          export MKFS_UDF_PROG="`set_prog_path mkfs_udf`" 
+          export XFS_FSR_PROG="`set_prog_path /usr/etc/fsr_xfs`"
+          export MKFS_NFS_PROG="false" 
+          ;;
+    Linux)
+          export MKFS_XFS_PROG="`set_prog_path mkfs.xfs`"
+          export MKFS_UDF_PROG="`set_prog_path mkfs.udf`"
+          export XFS_FSR_PROG="`set_prog_path xfs_fsr`"
+          export MKFS_NFS_PROG="false" 
+          ;;
+esac
+
 known_hosts()
 {
        case "$HOST"
 known_hosts()
 {
        case "$HOST"
@@ -229,14 +323,15 @@ known_hosts()
 }
 
 if [ -f "$HOST_OPTIONS" ]; then
 }
 
 if [ -f "$HOST_OPTIONS" ]; then
-    source "$HOST_OPTIONS"
+    . ./"$HOST_OPTIONS"
 else
     known_hosts
 fi
 
 else
     known_hosts
 fi
 
-if [ ! -b "$TEST_DEV" ]
+echo $TEST_DEV | grep -q ":" > /dev/null 2>&1
+if [ ! -b "$TEST_DEV" -a "$?" != "0" ]
 then
 then
-    echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device"
+    echo "common.config: Error: \$TEST_DEV ($TEST_DEV) is not a block device or a NFS filesystem"
     exit 1
 fi
 
     exit 1
 fi
 
@@ -246,13 +341,14 @@ then
     exit 1
 fi
 
     exit 1
 fi
 
-if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" ]
+echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
+if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
 then
 then
-    echo "common.config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device"
+    echo "common.config: Error: \$SCRATCH_DEV ($SCRATCH_DEV) is not a block device or a NFS filesystem"
     exit 1
 fi
 
     exit 1
 fi
 
-if [ ! -z "$SCRATCH_DEV" -a ! -d "$SCRATCH_MNT" ]
+if [ ! -z "$SCRATCH_MNT" -a ! -d "$SCRATCH_MNT" ]
 then
     echo "common.config: Error: \$SCRATCH_MNT ($SCRATCH_MNT) is not a directory"
     exit 1
 then
     echo "common.config: Error: \$SCRATCH_MNT ($SCRATCH_MNT) is not a directory"
     exit 1
index 2fef30331ec489e81686275cfbac66044637822a..1875bd9bf59c35c3e99ddcc931ac4fee4de7a550 100644 (file)
@@ -166,7 +166,8 @@ _filter_mkfs()
        print STDERR "dirversion=$1\ndirbsize=$2\n";
        print STDOUT "naming   =VERN bsize=XXX\n";
     }
        print STDERR "dirversion=$1\ndirbsize=$2\n";
        print STDOUT "naming   =VERN bsize=XXX\n";
     }
-    if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/) {
+    if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/ || 
+       /^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+)/) {
        print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n";
        print STDOUT "log      =LDEV bsize=XXX blocks=XXX\n";
     }
        print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n";
        print STDOUT "log      =LDEV bsize=XXX blocks=XXX\n";
     }
index 78413713d4373a6be01331c7b27ed669a9aeca48..0cfa72b746607abd91920cbb394ec2fd5edc7b22 100644 (file)
@@ -169,7 +169,7 @@ _filter_logprint()
        /^[     ]*$/d;
        s/  */ /g;
        s/ $//;
        /^[     ]*$/d;
        s/  */ /g;
        s/ $//;
-    ' |\
+    '|\
     awk '
        # collapse BUF DATA group into 1 line
         # for Oper data this can be over separate operations...ughh
     awk '
        # collapse BUF DATA group into 1 line
         # for Oper data this can be over separate operations...ughh
@@ -225,8 +225,10 @@ _print_logstate()
 _print_operation()
 {
     mkdir $fulldir >/dev/null 2>&1
 _print_operation()
 {
     mkdir $fulldir >/dev/null 2>&1
-    raw=$fulldir/op.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw
-    filtered=$fulldir/op.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered
+    mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'`
+    mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'`
+    raw=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
+    filtered=$fulldir/op.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
 
     echo "### xfs_logprint output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -c  2>&1 \
 
     echo "### xfs_logprint output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -c  2>&1 \
@@ -247,8 +249,10 @@ _print_transaction_inode()
 {
     _start=$1
     mkdir $fulldir >/dev/null 2>&1
 {
     _start=$1
     mkdir $fulldir >/dev/null 2>&1
-    raw=$fulldir/trans_inode.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw
-    filtered=$fulldir/trans_inode.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered
+    mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'`
+    mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'`
+    raw=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
+    filtered=$fulldir/trans_inode.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
 
     echo "### xfs_logprint -t -i -s START output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -t -i -s $_start 2>&1 \
 
     echo "### xfs_logprint -t -i -s START output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -t -i -s $_start 2>&1 \
@@ -261,8 +265,10 @@ _print_transaction_buf()
 {
     _start=$1
     mkdir $fulldir >/dev/null 2>&1
 {
     _start=$1
     mkdir $fulldir >/dev/null 2>&1
-    raw=$fulldir/trans_buf.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.raw
-    filtered=$fulldir/trans_buf.mnt$MOUNT_OPTIONS.mkfs$MKFS_OPTIONS$sync_suffix.filtered
+    mntopt=`echo $MOUNT_OPTIONS | sed 's/ /_/g'`
+    mkfsopt=`echo $MKFS_OPTIONS | sed 's/ /_/g'`
+    raw=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.raw
+    filtered=$fulldir/trans_buf.mnt$mntopt.mkfs$mkfsopt$sync_suffix.filtered
 
     echo "### xfs_logprint -t -b -s START output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -t -b -s $_start 2>&1 \
 
     echo "### xfs_logprint -t -b -s START output ###" | tee $raw >$filtered
     _scratch_xfs_logprint -t -b -s $_start 2>&1 \
@@ -275,7 +281,7 @@ _mkfs_log()
 {
     # create the FS
     _full "mkfs"
 {
     # create the FS
     _full "mkfs"
-    extra_ops="-lsize=2000b"
+    extra_ops="-l size=2000b"
     _scratch_mkfs_xfs $extra_ops >>$seq.full 2>&1
     if [ $? -ne 0 ] ; then 
        _echofull "Cannot mkfs for this test using option specified: $MKFS_OPTIONS $extra_ops"
     _scratch_mkfs_xfs $extra_ops >>$seq.full 2>&1
     if [ $? -ne 0 ] ; then 
        _echofull "Cannot mkfs for this test using option specified: $MKFS_OPTIONS $extra_ops"
index 30b719cb3e2d8f6a2e9e3b8cff333b8626258ee9..225b2f46bef5e792316e3e65c38c6b618fed945e 100644 (file)
--- a/common.rc
+++ b/common.rc
 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 #
 
 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 #
 
+
+_mount_opts()
+{
+    case $FSTYP in
+    xfs)
+       export MOUNT_OPTIONS=$XFS_MOUNT_OPTIONS
+       ;;
+    udf)
+       export MOUNT_OPTIONS=$UDF_MOUNT_OPTIONS
+       ;;
+    nfs)
+       export MOUNT_OPTIONS=$NFS_MOUNT_OPTIONS
+       ;;
+    *)
+       ;;
+    esac
+}
+
+_mkfs_opts()
+{
+    case $FSTYP in
+    xfs)
+       export MKFS_OPTIONS=$XFS_MKFS_OPTIONS
+       ;;
+    udf)
+       [ ! -z "$udf_fsize" ] && \
+           UDF_MKFS_OPTIONS="$UDF_MKFS_OPTIONS -s $udf_fsize"
+       export MKFS_OPTIONS=$UDF_MKFS_OPTIONS
+       ;;
+    nfs)
+       export MKFS_OPTIONS=$NFS_MKFS_OPTIONS
+       ;;
+    *)
+       ;;
+    esac
+}
+
+[ -z "$FSTYP" ] && FSTYP=xfs
+[ -z "$MOUNT_OPTIONS" ] && _mount_opts
+[ -z "$MKFS_OPTIONS" ] && _mkfs_opts
+
+
 # we need common.config
 if ! . ./common.config
 then
 # we need common.config
 if ! . ./common.config
 then
@@ -42,98 +84,117 @@ fi
 # make sure we have a standard umask
 umask 022
 
 # make sure we have a standard umask
 umask 022
 
-# awk
-AWK_PROG=awk
-export AWK_PROG
-
-# we override mount and mkfs.xfs so we can specify extra options
+_mount()
+{
+    $MOUNT_PROG $*
+}
 
 
-mount()
+_scratch_options()
 {
 {
-    case "$*"
-    in
-        *remount*)
-            /bin/mount $*
-            ;;
-        *ext2*)
-            /bin/mount $*
-            ;;
-        *xfs*)
-            /bin/mount $* $MOUNT_OPTIONS
-            ;;
-        *)
-            /bin/mount $*
-            ;;
+    type=$1
+    SCRATCH_OPTIONS=""
+
+    if [ $FSTYP != "xfs" ]; then
+        return
+    fi
+
+    case $type in
+    mkfs)
+       rt_opt="-r"
+        log_opt="-l"
+       ;;
+    mount)
+       rt_opt="-o"
+        log_opt="-o"
+       ;;
     esac
     esac
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
+       SCRATCH_OPTIONS="$SCRATCH_OPTIONS ${rt_opt}rtdev=$SCRATCH_RTDEV"
+    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+       SCRATCH_OPTIONS="$SCRATCH_OPTIONS ${log_opt}logdev=$SCRATCH_LOGDEV"
 }
 
 }
 
-_test_mount()
+_test_options()
 {
 {
+    type=$1
     TEST_OPTIONS=""
     TEST_OPTIONS=""
+
+    if [ $FSTYP != "xfs" ]; then
+        return
+    fi
+
+    case $type
+    in
+    mkfs)
+       rt_opt="-r"
+        log_opt="-l"
+       ;;
+    mount)
+       rt_opt="-o"
+        log_opt="-o"
+       ;;
+    esac
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_RTDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
+       TEST_OPTIONS="$TEST_OPTIONS ${rt_opt}rtdev=$TEST_RTDEV"
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
-        TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
-    [ -z "$FSTYP" ] && FSTYP=xfs
-    mount -t $FSTYP $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
+       TEST_OPTIONS="$TEST_OPTIONS ${log_opt}logdev=$TEST_LOGDEV"
 }
 
 _scratch_mount_options()
 {
 }
 
 _scratch_mount_options()
 {
-    SCRATCH_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ortdev=$SCRATCH_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ologdev=$SCRATCH_LOGDEV"
+    _scratch_options mount
     echo $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
 }
 
 _scratch_mount()
 {
     echo $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
 }
 
 _scratch_mount()
 {
-    SCRATCH_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ortdev=$SCRATCH_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ologdev=$SCRATCH_LOGDEV"
-    [ -z "$FSTYP" ] && FSTYP=xfs
-    mount -t $FSTYP $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
+    _mount -t $FSTYP `_scratch_mount_options $*`
 }
 
 }
 
-_scratch_mkfs_options()
+_test_mount()
 {
 {
-    SCRATCH_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -rrtdev=$SCRATCH_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -llogdev=$SCRATCH_LOGDEV"
-    echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
+    _test_options mount 
+    _mount -t $FSTYP $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
 }
 
 }
 
-_scratch_mkfs()
+_scratch_mkfs_options()
 {
 {
-    if [ -z "$FSTYP" -o "$FSTYP" = xfs ]; then
-        _scratch_mkfs_xfs $*
-    else
-        /sbin/mkfs.$FSTYP $MKFS_OPTIONS $* $SCRATCH_DEV
-    fi
+    _scratch_options mkfs 
+    echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
 }
 
 _scratch_mkfs_xfs()
 }
 
 _scratch_mkfs_xfs()
-{
-    SCRATCH_OPTIONS=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -rrtdev=$SCRATCH_RTDEV"
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -llogdev=$SCRATCH_LOGDEV"
-    /sbin/mkfs.xfs -f $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
+{ 
+    _scratch_options mkfs 
+    [ "$HOSTOS" != "IRIX" ] && \
+        SCRATCH_OPTIONS="$SCRATCH_OPTIONS -f"
+
+    $MKFS_XFS_PROG $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
     mkfs_status=$?
     mkfs_status=$?
+
     if [ "$USE_BIG_LOOPFS" = yes ]; then
        [ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
         ./tools/ag-wipe -q -r $RETAIN_AG_BYTES $SCRATCH_DEV
     fi
     if [ "$USE_BIG_LOOPFS" = yes ]; then
        [ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
         ./tools/ag-wipe -q -r $RETAIN_AG_BYTES $SCRATCH_DEV
     fi
+
     return $mkfs_status
 }
 
     return $mkfs_status
 }
 
+_scratch_mkfs()
+{
+    case $FSTYP in
+    xfs)
+        _scratch_mkfs_xfs $*
+       ;;
+    nfs*)
+       # do nothing for nfs
+       ;;
+    udf|*)
+        $MKFS_PROG -t $FSTYP $MKFS_OPTIONS $* > /dev/null
+       ;;
+    esac
+}
+
 _scratch_xfs_db_options()
 {
     SCRATCH_OPTIONS=""
 _scratch_xfs_db_options()
 {
     SCRATCH_OPTIONS=""
@@ -147,7 +208,7 @@ _scratch_xfs_logprint()
     SCRATCH_OPTIONS=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
     SCRATCH_OPTIONS=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
-    /usr/sbin/xfs_logprint $SCRATCH_OPTIONS $* $SCRATCH_DEV
+    $XFS_LOGPRINT_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 
 _scratch_xfs_repair()
 }
 
 _scratch_xfs_repair()
@@ -156,7 +217,7 @@ _scratch_xfs_repair()
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
     [ "$USE_BIG_LOOPFS" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
     [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
         SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
     [ "$USE_BIG_LOOPFS" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
-    /sbin/xfs_repair $SCRATCH_OPTIONS $* $SCRATCH_DEV
+    $XFS_REPAIR_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
 }
 
 _get_pids_by_name()
 }
 
 _get_pids_by_name()
@@ -189,7 +250,7 @@ _get_pids_by_name()
 _get_fqdn()
 {
     host=`hostname`
 _get_fqdn()
 {
     host=`hostname`
-    nslookup $host | $AWK_PROG '{ if ($1 == "Name:") print $2 }'
+    $NSLOOKUP_PROG $host | $AWK_PROG '{ if ($1 == "Name:") print $2 }'
 }
 
 # fix malloc libs output
 }
 
 # fix malloc libs output
@@ -197,7 +258,7 @@ _get_fqdn()
 _fix_malloc()
 {
     # filter out the Electric Fence notice
 _fix_malloc()
 {
     # filter out the Electric Fence notice
-    perl -e '
+    $PERL_PROG -e '
         while (<>) {
             if (defined $o && /^\s+Electric Fence/) {
                 chomp($o);
         while (<>) {
             if (defined $o && /^\s+Electric Fence/) {
                 chomp($o);
@@ -217,7 +278,7 @@ _fix_malloc()
 #
 _need_to_be_root()
 {
 #
 _need_to_be_root()
 {
-    id=`id | sed -e 's/(.*//' -e 's/.*=//'`
+    id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`
     if [ "$id" -ne 0 ]
     then
        echo "Arrgh ... you need to be root (not uid=$id) to run this test"
     if [ "$id" -ne 0 ]
     then
        echo "Arrgh ... you need to be root (not uid=$id) to run this test"
@@ -243,7 +304,7 @@ _df_device()
        exit 1
     fi
     
        exit 1
     fi
     
-    df -T 2>/dev/null | $AWK_PROG -v what=$1 '
+    $DF_PROG 2>/dev/null | $AWK_PROG -v what=$1 '
         match($1,what) && NF==1 { 
             v=$1
             getline
         match($1,what) && NF==1 { 
             v=$1
             getline
@@ -273,7 +334,7 @@ _df_dir()
        exit 1
     fi
     
        exit 1
     fi
     
-    df -T $1 2>/dev/null | $AWK_PROG -v what=$1 '
+    $DF_PROG $1 2>/dev/null | $AWK_PROG -v what=$1 '
         NR == 2 && NF==1 { 
             v=$1
             getline 
         NR == 2 && NF==1 { 
             v=$1
             getline 
@@ -317,6 +378,10 @@ _fs_type()
 
 # return the FS mount options of a mounted device
 #
 
 # return the FS mount options of a mounted device
 #
+# should write a version which just parses the output of mount for IRIX
+# compatibility, but since this isn't used at all, at the moment I'll leave
+# this for now
+#
 _fs_options()
 {
     if [ $# -ne 1 ]
 _fs_options()
 {
     if [ $# -ne 1 ]
@@ -356,37 +421,37 @@ _is_block_dev()
 
 _do()
 {
 
 _do()
 {
-  if [ $# -eq 1 ]; then
-    _cmd=$1
-  elif [ $# -eq 2 ]; then
-    _note=$1
-    _cmd=$2
-    echo -n "$_note... "
-  else
-    echo "Usage: _do [note] cmd" 1>&2
-    status=1; exit
-  fi
-
-  (eval "echo '---' \"$_cmd\"") >>$seq.full
-  (eval "$_cmd") >$tmp._out 2>&1; ret=$?
-  cat $tmp._out | _fix_malloc >>$seq.full
-  if [ $# -eq 2 ]; then
-    if [ $ret -eq 0 ]; then
-      echo "done"
+    if [ $# -eq 1 ]; then
+       _cmd=$1
+    elif [ $# -eq 2 ]; then
+       _note=$1
+       _cmd=$2
+       echo -n "$_note... "
     else
     else
-      echo "fail"
+       echo "Usage: _do [note] cmd" 1>&2
+       status=1; exit
     fi
     fi
-  fi
-  if [ $ret -ne 0  ] \
-     && [ "$_do_die_on_error" = "always" \
-        -o \( $# -eq 2 -a "$_do_die_on_error" = "message_only" \) ]
-  then
-      [ $# -ne 2 ] && echo
-      eval "echo \"$_cmd\" failed \(returned $ret\): see $seq.full"
-      status=1; exit
-  fi
 
 
-  return $ret
+    (eval "echo '---' \"$_cmd\"") >>$here/$seq.full
+    (eval "$_cmd") >$tmp._out 2>&1; ret=$?
+    cat $tmp._out | _fix_malloc >>$here/$seq.full
+    if [ $# -eq 2 ]; then
+       if [ $ret -eq 0 ]; then
+           echo "done"
+       else
+           echo "fail"
+       fi
+    fi
+    if [ $ret -ne 0  ] \
+       && [ "$_do_die_on_error" = "always" \
+           -o \( $# -eq 2 -a "$_do_die_on_error" = "message_only" \) ]
+    then
+       [ $# -ne 2 ] && echo
+       eval "echo \"$_cmd\" failed \(returned $ret\): see $seq.full"
+       status=1; exit
+    fi
+
+    return $ret
 }
 
 # bail out, setting up .notrun file
 }
 
 # bail out, setting up .notrun file
@@ -403,37 +468,82 @@ _notrun()
 # 
 _fail()
 {
 # 
 _fail()
 {
-    echo "$*" | tee -a $seq.full
+    echo "$*" | tee -a $here/$seq.full
     echo "(see $seq.full for details)"
     status=1
     exit 1
 }
 
     echo "(see $seq.full for details)"
     status=1
     exit 1
 }
 
+# tests whether $FSTYP is one of the supported filesystems for a test
+#
+_supported_fs()
+{
+    for f
+    do
+       if [ "$f" = "$FSTYP" ]
+       then
+           return
+       fi
+    done
+
+    _notrun "not suitable for this filesystem type: $FSTYP"
+}
+
+# tests whether $FSTYP is one of the supported OSes for a test
+#
+_supported_os()
+{
+    for h
+    do
+       if [ "$h" = "$HOSTOS" ]
+       then
+           return
+       fi
+    done
+
+    _notrun "not suitable for this OS: $HOSTOS"
+}
+
 # this test needs a scratch partition - check we're ok & unmount it
 # 
 _require_scratch()
 {
 # this test needs a scratch partition - check we're ok & unmount it
 # 
 _require_scratch()
 {
-    if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
-    then
-        _notrun "this test requires a valid \$SCRATCH_DEV"
-    fi
-    
-    if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev $TEST_DEV`" ]
-    then
-        _notrun "this test requires a valid \$SCRATCH_DEV"
-    fi
+    case "$FSTYP" in
+       xfs|udf)
+                if [ -z "$SCRATCH_DEV" -o "`_is_block_dev $SCRATCH_DEV`" = "" ]
+                then
+                    _notrun "this test requires a valid \$SCRATCH_DEV"
+                fi
+                
+                if [ "`_is_block_dev $SCRATCH_DEV`" = "`_is_block_dev $TEST_DEV`" ]
+                then
+                    _notrun "this test requires a valid \$SCRATCH_DEV"
+                fi
+                ;;
+       nfs*)
+                echo $SCRATCH_DEV | grep -q ":" > /dev/null 2>&1
+                if [ ! -z "$SCRATCH_DEV" -a ! -b "$SCRATCH_DEV" -a "$?" != "0" ]
+                then
+                    _notrun "this test requires a valid \$SCRATCH_DEV"
+                fi
+                ;;
+       *)
+                _notrun "\$FSTYP ($FSTYP) unknown or not specified"
+                ;;
+    esac
+
     
     # mounted?
     
     # mounted?
-    if mount | grep -q $SCRATCH_DEV
+    if _mount | grep -q $SCRATCH_DEV
     then 
         # if it's mounted, make sure its on $SCRATCH_MNT
     then 
         # if it's mounted, make sure its on $SCRATCH_MNT
-        if ! mount | grep $SCRATCH_DEV | grep -q $SCRATCH_MNT
+        if ! _mount | grep $SCRATCH_DEV | grep -q $SCRATCH_MNT
         then 
             echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
             exit 1
         fi
         # and then unmount it
         then 
             echo "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
             exit 1
         fi
         # and then unmount it
-        if ! umount $SCRATCH_DEV
+        if ! $UMOUNT_PROG $SCRATCH_DEV
         then
             echo "failed to unmount $SCRATCH_DEV"
             exit 1
         then
             echo "failed to unmount $SCRATCH_DEV"
             exit 1
@@ -451,13 +561,18 @@ _require_logdev()
         _notrun "This test requires USE_EXTERNAL to be enabled"
 
     # ensure its not mounted
         _notrun "This test requires USE_EXTERNAL to be enabled"
 
     # ensure its not mounted
-    umount $SCRATCH_LOGDEV 2>/dev/null
+    $UMOUNT_PROG $SCRATCH_LOGDEV 2>/dev/null
 }
 
 # this test requires loopback device support
 # 
 _require_loop()
 {
 }
 
 # this test requires loopback device support
 # 
 _require_loop()
 {
+    if [ "$HOSTOS" != "Linux" ]
+    then
+       _notrun "This test requires linux for loopback device support"
+    fi
+
     modprobe loop >/dev/null 2>&1
     if grep loop /proc/devices >/dev/null 2>&1
     then
     modprobe loop >/dev/null 2>&1
     if grep loop /proc/devices >/dev/null 2>&1
     then
@@ -495,7 +610,7 @@ _xfs_mounted()
     
     device=$1
     
     
     device=$1
     
-    if mount | grep $device | $AWK_PROG '
+    if _mount | grep $device | $AWK_PROG '
         /type xfs/  { print $3 ; exit 0 }
         END         { exit 1 }
     '
         /type xfs/  { print $3 ; exit 0 }
         END         { exit 1 }
     '
@@ -523,10 +638,6 @@ _remount()
         echo "_remount: failed to remount filesystem on $device as $mode"
         exit 1
     fi
         echo "_remount: failed to remount filesystem on $device as $mode"
         exit 1
     fi
-    
-    # we might like to check here later
-    #options=`_fs_options $device`
-
 }
 
 # run xfs_check and friends on a FS. 
 }
 
 # run xfs_check and friends on a FS. 
@@ -537,7 +648,7 @@ _remount()
 
 USE_REMOUNT=0
 
 
 USE_REMOUNT=0
 
-_check_filesystem()
+_check_xfs_filesystem()
 {
     if [ $# -ne 1 -a $# -ne 2 ]
     then
 {
     if [ $# -ne 1 -a $# -ne 2 ]
     then
@@ -565,51 +676,50 @@ _check_filesystem()
         if [ $USE_REMOUNT -eq 0 ]
         then
             mountpoint=`_xfs_mounted $device`
         if [ $USE_REMOUNT -eq 0 ]
         then
             mountpoint=`_xfs_mounted $device`
-            umount $device
+            $UMOUNT_PROG $device
         else
             _remount $device ro
         fi
     fi
 
         else
             _remount $device ro
         fi
     fi
 
-    /usr/sbin/xfs_logprint -t $extra_log_options $device 2>&1 \
+    $XFS_LOGPRINT_PROG -t $extra_log_options $device 2>&1 \
                 | tee $tmp.fs_check | grep -q "<CLEAN>"
                 | tee $tmp.fs_check | grep -q "<CLEAN>"
-    if [ $? -ne 0 ]
+    if [ $? -ne 0 -a "$HOSTOS" = "Linux" ]
     then
         echo "_check_fs: filesystem on $device has dirty log (see $seq.full)"
         
     then
         echo "_check_fs: filesystem on $device has dirty log (see $seq.full)"
         
-        echo "_check_fs: filesystem on $device has dirty log"   >>$seq.full
-        echo "*** xfs_logprint -t output ***"                   >>$seq.full
-        cat $tmp.fs_check                                       >>$seq.full
-        echo "*** end xfs_logprint output"                      >>$seq.full
+        echo "_check_fs: filesystem on $device has dirty log"   >>$here/$seq.full
+        echo "*** xfs_logprint -t output ***"                   >>$here/$seq.full
+        cat $tmp.fs_check                                       >>$here/$seq.full
+        echo "*** end xfs_logprint output"                      >>$here/$seq.full
         
         ok=0
     fi
 
         
         ok=0
     fi
 
-    /usr/sbin/xfs_check $testoption $extra_log_options $device 2>&1 | \
-                       _fix_malloc >$tmp.fs_check 
+    $XFS_CHECK_PROG $testoption $extra_log_options $device 2>&1 |\
+        _fix_malloc >$tmp.fs_check 
     if [ -s $tmp.fs_check ]
     then
         echo "_check_fs: filesystem on $device is inconsistent (c) (see $seq.full)"
         
     if [ -s $tmp.fs_check ]
     then
         echo "_check_fs: filesystem on $device is inconsistent (c) (see $seq.full)"
         
-        echo "_check_fs: filesystem on $device is inconsistent" >>$seq.full
-        echo "*** xfs_check output ***"                         >>$seq.full
-        cat $tmp.fs_check                                       >>$seq.full
-        echo "*** end xfs_check output"                         >>$seq.full
+        echo "_check_fs: filesystem on $device is inconsistent" >>$here/$seq.full
+        echo "*** xfs_check output ***"                         >>$here/$seq.full
+        cat $tmp.fs_check                                       >>$here/$seq.full
+        echo "*** end xfs_check output"                         >>$here/$seq.full
         
         ok=0
     fi
         
         ok=0
     fi
-
     # repair doesn't scale massively at this stage, optionally skip it for now
     [ "$USE_BIG_LOOPFS" = yes ] || \
     # repair doesn't scale massively at this stage, optionally skip it for now
     [ "$USE_BIG_LOOPFS" = yes ] || \
-    /sbin/xfs_repair -n $extra_log_options $device >$tmp.fs_check 2>&1
+    $XFS_REPAIR_PROG -n $extra_log_options $device >$tmp.fs_check 2>&1
     if [ $? -ne 0 ]
     then
         echo "_check_fs: filesystem on $device is inconsistent (r) (see $seq.full)"
         
     if [ $? -ne 0 ]
     then
         echo "_check_fs: filesystem on $device is inconsistent (r) (see $seq.full)"
         
-        echo "_check_fs: filesystem on $device is inconsistent" >>$seq.full
-        echo "*** xfs_repair -n output ***"                     >>$seq.full
-        cat $tmp.fs_check | _fix_malloc                         >>$seq.full
-        echo "*** end xfs_repair output"                        >>$seq.full
+        echo "_check_fs: filesystem on $device is inconsistent" >>$here/$seq.full
+        echo "*** xfs_repair -n output ***"                     >>$here/$seq.full
+        cat $tmp.fs_check | _fix_malloc                         >>$here/$seq.full
+        echo "*** end xfs_repair output"                        >>$here/$seq.full
         
         ok=0
     fi
         
         ok=0
     fi
@@ -617,15 +727,15 @@ _check_filesystem()
  
     if [ $ok -eq 0 ]
     then
  
     if [ $ok -eq 0 ]
     then
-        echo "*** mount output ***"                             >>$seq.full
-        mount                                                   >>$seq.full
-        echo "*** end mount output"                             >>$seq.full
+        echo "*** mount output ***"                             >>$here/$seq.full
+        _mount                                                  >>$here/$seq.full
+        echo "*** end mount output"                             >>$here/$seq.full
     elif [ "$type" = "xfs" ]
     then
         # mounted... 
         if [ $USE_REMOUNT -eq 0 ]
         then
     elif [ "$type" = "xfs" ]
     then
         # mounted... 
         if [ $USE_REMOUNT -eq 0 ]
         then
-            if ! mount -t xfs $extra_mount_options $device $mountpoint
+            if ! _mount -t xfs $extra_mount_options $device $mountpoint
             then
                 echo "!!! failed to remount $device on $mountpoint"
                 ok=0
             then
                 echo "!!! failed to remount $device on $mountpoint"
                 ok=0
@@ -639,54 +749,218 @@ _check_filesystem()
     return 0    
 }
 
     return 0    
 }
 
+_check_udf_filesystem()
+{
+    if [ $# -ne 1 -a $# -ne 2 ]
+    then
+       echo "Usage: _check_fs device [last_block]" 1>&2
+       exit 1
+    fi
+
+    device=$1
+    if [ $# -eq 2 ];
+    then
+        LAST_BLOCK=`expr \( $2 - 1 \)`
+        OPT_ARG="-lastvalidblock $LAST_BLOCK"
+    fi
+
+    # Output messages format:
+    #       Error messages contain :   "Error:" or   "error:"
+    #     Warning messages contain : "Warning:" or "warning:"
+    #   Attention messages contain :    "Note:" or    "note:"
+    # Message continuation lines start with a "-" character.
+
+    rm -f $seq.checkfs
+    sleep 1 # Due to a problem with time stamps in udf_test
+    $here/src/udf_test $OPT_ARG $device | tee $here/$seq.checkfs | \
+       egrep -i "error:|warning:|Error count:|Warning count:" | \
+       egrep -v "Error count:   0|Warning count:   0"
+}
+
 _check_test_fs()
 {
     TEST_LOG=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
         TEST_LOG="$TEST_LOGDEV"
 _check_test_fs()
 {
     TEST_LOG=""
     [ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
         TEST_LOG="$TEST_LOGDEV"
-    _check_filesystem $TEST_DEV $TEST_LOG
+
+    _check_xfs_filesystem $TEST_DEV $TEST_LOG
 }
 
 _check_scratch_fs()
 {
 }
 
 _check_scratch_fs()
 {
-    SCRATCH_LOG=""
-    [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
-        SCRATCH_LOG="$SCRATCH_LOGDEV"
-    _check_filesystem $SCRATCH_DEV $SCRATCH_LOG
+
+
+    case $FSTYP in
+    xfs)
+       SCRATCH_LOG=""
+       [ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
+           SCRATCH_LOG="$SCRATCH_LOGDEV"
+
+       _check_xfs_filesystem $SCRATCH_DEV $SCRATCH_LOG
+       ;;
+    udf)
+       _check_udf_filesystem $SCRATCH_DEV $udf_fsize
+       ;;
+    nfs*)
+       # Don't know how to check an NFS filesystem, yet.
+       ;;
+    *)
+       ;;
+    esac
 }
 
 _full_fstyp_details()
 {
 }
 
 _full_fstyp_details()
 {
-    [ -z "$FSTYP" ] && FSTYP=xfs
-    if [ $FSTYP = xfs ]; then
-       if grep 'debug 0' /proc/fs/xfs/stat >/dev/null; then
-           FSTYP="$FSTYP (non-debug)"
-       elif grep 'debug 1' /proc/fs/xfs/stat >/dev/null; then
-           FSTYP="$FSTYP (debug)"
-       fi
-    fi
-    echo $FSTYP
+     [ -z "$FSTYP" ] && FSTYP=xfs
+     if [ $FSTYP = xfs ]; then
+       if grep 'debug 0' /proc/fs/xfs/stat >/dev/null; then
+           FSTYP="$FSTYP (non-debug)"
+       elif grep 'debug 1' /proc/fs/xfs/stat >/dev/null; then
+           FSTYP="$FSTYP (debug)"
+       fi
+     fi
+     echo $FSTYP
 }
 
 _full_platform_details()
 {
 }
 
 _full_platform_details()
 {
-    os=`uname -s`
-    host=`hostname -s`
-    kernel=`uname -r`
-    platform=`uname -m`
-    echo "$os/$platform $host $kernel"
+     os=`uname -s`
+     host=`hostname -s`
+     kernel=`uname -r`
+     platform=`uname -m`
+     echo "$os/$platform $host $kernel"
 }
 
 }
 
-################################################################################
+_check_testdir()
+{
+  
+
+    case $FSTYP in
+    xfs)
+       _check_test_fs
+       ;;
+    udf)
+       _cleanup_testdir
+       _check_scratch_fs
+       _scratch_mount
+       ;;
+    nfs*)
+       # Don't know how to check an NFS filesystem, yet.
+       ;;
+    *)
+       ;;
+    esac
+}
 
 
-[ -d /usr/bsd ] && PATH=$PATH:/usr/bsd
-[ -d /usr/freeware/bin ] && PATH=$PATH:/usr/freeware/bin
+
+_setup_xfs_testdir()
+{
+    [ "$FSTYP" != "xfs" ] \
+       && _fail "setup_xfs_testdir: \$FSTYP ($FSTYP) is not xfs"
+    
+    testdir=$TEST_DIR
+}
+
+_setup_udf_testdir()
+{
+    [ "$FSTYP" != "udf" ] \
+       && _fail "setup_udf_testdir: \$FSTYP is not udf"
+    [ -z "$SCRATCH_DEV" -o ! -b "$SCRATCH_DEV" ] \
+       && _notrun "this test requires a valid \$SCRATCH_DEV"
+    [ -z "$SCRATCH_MNT" ] \
+       && _notrun "this test requires a valid \$SCRATCH_MNT"
+    
+    # mounted?
+    if _mount | grep -q $SCRATCH_DEV
+    then 
+        # if it's mounted, make sure its on $TEST_RW_DIR
+        if ! _mount | grep $SCRATCH_DEV | grep -q $SCRATCH_MNT
+        then 
+            _fail "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
+        fi
+       $UMOUNT_PROG $SCRATCH_DEV
+    fi 
+
+    _scratch_mkfs
+    _scratch_mount
+
+    testdir=$SCRATCH_MNT
+}
+
+_setup_nfs_testdir()
+{
+    [ "$FSTYP" != "nfs" ] \
+       && _fail "setup_udf_testdir: \$FSTYP is not nfs"
+    [ -z "$SCRATCH_DEV" ] \
+       && _notrun "this test requires a valid host fs for \$SCRATCH_DEV"
+    [ -z "$SCRATCH_MNT" ] \
+       && _notrun "this test requires a valid \$SCRATCH_MNT"
+    
+    # mounted?
+    if _mount | grep -q $SCRATCH_DEV
+    then 
+        # if it's mounted, make sure its on $TEST_RW_DIR
+        if ! _mount | grep $SCRATCH_DEV | grep -q $SCRATCH_MNT
+        then 
+            _fail "\$SCRATCH_DEV is mounted but not on \$SCRATCH_MNT - aborting"
+        fi
+       $UMOUNT_PROG $SCRATCH_DEV
+    fi 
+
+    _scratch_mkfs
+    _scratch_mount
+
+    testdir=$SCRATCH_MNT
+}
+
+_setup_testdir()
+{
+
+
+    case $FSTYP in
+    xfs)
+       _setup_xfs_testdir
+       ;;
+    udf)
+       _setup_udf_testdir
+       ;;
+    nfs*)
+       _setup_nfs_testdir
+       ;;
+    *)
+       _fail "\$FSTYP is not xfs, udf or nfs"
+       ;;
+    esac    
+}
+
+_cleanup_testdir()
+{
+
+
+    case $FSTYP in
+    xfs)
+       # do nothing, testdir is $TEST_DIR
+       ;;
+    udf)
+       # umount testdir as it is $SCRATCH_MNT which could be used by xfs next
+       [ -n "$testdir" ] && $UMOUNT_PROG $testdir
+       ;;
+    nfs*)
+       # umount testdir as it is $SCRATCH_MNT which could be used by xfs next
+       [ -n "$testdir" ] && $UMOUNT_PROG $testdir
+       ;;
+    *)
+       _fail "\$FSTYP is not xfs, udf or nfs"
+       ;;
+    esac    
+}
+
+################################################################################
 
 if [ "$iam" != new -a "$iam" != bench ]
 then
 
 if [ "$iam" != new -a "$iam" != bench ]
 then
-
     # make some further configuration checks here
     # make some further configuration checks here
-    
+
     if [ "$TEST_DEV" = ""  ]
     then
         echo "common.rc: Error: \$TEST_DEV is not set"
     if [ "$TEST_DEV" = ""  ]
     then
         echo "common.rc: Error: \$TEST_DEV is not set"
@@ -712,24 +986,41 @@ then
     if [ "`_fs_type $TEST_DEV`" != "xfs" ]
     then
         echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED XFS filesystem"
     if [ "`_fs_type $TEST_DEV`" != "xfs" ]
     then
         echo "common.rc: Error: \$TEST_DEV ($TEST_DEV) is not a MOUNTED XFS filesystem"
-        df -T $TEST_DEV
+        $DF_PROG $TEST_DEV
         exit 1
     fi
 
 fi
 
         exit 1
     fi
 
 fi
 
-# check for some required binaries on our $PATH
-#
-for exec in mkfs.xfs xfs_logprint xfs_check xfs_repair xfs_db
-do
-    if which $exec >/dev/null 2>&1 
-    then
-       :
-    else
-       echo "common.rc: cannot find $exec on \$PATH=$PATH"
-       exit 1
-    fi
-done
+_link_out_file()
+{
+   if [ -z "$1" ]; then
+      echo Error must pass \$seq.
+      exit     
+   fi
+   rm -f $1
+   if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
+      ln -s $1.irix $1
+   elif [ "`uname`" == "Linux" ]; then
+      ln -s $1.linux $1
+   else
+      echo Error test $seq does not run on the operating system: `uname`
+      exit
+   fi
+}
+
+_get_os()
+{
+   
+   if [ "`uname`" == "IRIX64" ] || [ "`uname`" == "IRIX" ]; then
+      os=irix
+   elif [ "`uname`" == "Linux" ]; then
+      os=linux
+   else
+      echo Error test does not run on the operating system: `uname`
+      exit
+   fi
+}
 
 # make sure this script returns success
 /bin/true
 
 # make sure this script returns success
 /bin/true
index 56150c99d848a192301445fb17bef69e86ac7441..e3cf4b5810547d7cfaf55b211ce6676fc51ed9ab 100644 (file)
@@ -2,20 +2,61 @@ AC_INIT(src/xfsctl.c)
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
 
 AC_PACKAGE_GLOBALS(xfstests)
 AC_PACKAGE_UTILITIES(xfstests)
 
-AC_PACKAGE_NEED_UUID_H
+AC_HEADER_STDC
+    AC_CHECK_HEADERS([ assert.h                \
+                       bstring.h               \
+                       libgen.h                \
+                       dirent.h                \
+                       errno.h                 \
+                       malloc.h                \
+                       uuid.h                  \
+                       uuid/uuid.h             \
+                       sys/uuid.h              \
+                       sys/file.h              \
+                       sys/fcntl.h             \
+                       sys/syssgi.h            \
+                       sys/param.h             \
+                       sys/stat.h              \
+                       sys/statvfs.h           \
+                       sys/time.h              \
+                       sys/ioctl.h             \
+                       sys/wait.h              \
+                       sys/types.h             \
+                       strings.h               \
+                       err.h
+    ])
+    AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h      \
+                       sys/fs/xfs_itable.h     \
+                       xfs/platform_defs.h     \
+    ])
+
 AC_PACKAGE_NEED_UUIDCOMPARE
 
 AC_PACKAGE_NEED_UUIDCOMPARE
 
-AC_PACKAGE_NEED_XFS_LIBXFS_H
-AC_PACKAGE_NEED_XFSCTL_MACRO
-AC_PACKAGE_NEED_XFS_HANDLE_H
-AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
+case $pkg_platform
+in
+       irix)
+               AC_PACKAGE_NEED_SYS_ACL_H
+               AC_PACKAGE_NEED_ATTRIBUTES_H
+               AC_PACKAGE_WANT_NDBM
+               ;;
+       *)
+               AC_PACKAGE_NEED_XFS_LIBXFS_H
+               AC_PACKAGE_NEED_XFS_XQM_H
+               AC_PACKAGE_NEED_XFSCTL_MACRO
+               AC_PACKAGE_NEED_XFS_HANDLE_H
+
+               AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE
+               AC_PACKAGE_NEED_ATTR_XATTR_H
+               AC_PACKAGE_NEED_ATTRIBUTES_H
+               AC_PACKAGE_NEED_GETXATTR_LIBATTR
 
 
-AC_PACKAGE_NEED_ATTR_XATTR_H
-AC_PACKAGE_NEED_GETXATTR_LIBATTR
-AC_PACKAGE_NEED_SYS_ACL_H
-AC_PACKAGE_NEED_ACL_LIBACL_H
-AC_PACKAGE_NEED_ACLINIT_LIBACL
+               AC_PACKAGE_NEED_SYS_ACL_H
+               AC_PACKAGE_NEED_ACL_LIBACL_H
+               AC_PACKAGE_NEED_ACLINIT_LIBACL
 
 
-AC_PACKAGE_WANT_LIBGDBM
+               AC_PACKAGE_WANT_GDBM
+               ;;
+esac
 
 
+AC_CONFIG_HEADER(include/config.h)
 AC_OUTPUT(include/builddefs)
 AC_OUTPUT(include/builddefs)
index 10648e49bee80759f36f182e2bb4409f47007930..fc37f479137708a3778b11808160d86edf91b8e0 100644 (file)
@@ -35,7 +35,7 @@ include $(TOPDIR)/include/builddefs
 
 HFILES = dataascii.h databin.h pattern.h \
        random_range.h string_to_tokens.h tlibio.h write_log.h
 
 HFILES = dataascii.h databin.h pattern.h \
        random_range.h string_to_tokens.h tlibio.h write_log.h
-LSRCFILES = builddefs.in buildrules
+LSRCFILES = builddefs.in buildrules buildmacros config.h.in
 
 default install install-dev:
 
 
 default install install-dev:
 
index f808ffd1a1da7b36ce66ab77262b564fbf86305c..a257686c2d6a0c2de9ecc9b1cfc1cf39463ad40b 100644 (file)
@@ -75,7 +75,7 @@ RPMBUILD        = @rpmbuild@
 RPM_VERSION     = @rpm_version@
 
 ENABLE_SHARED = @enable_shared@
 RPM_VERSION     = @rpm_version@
 
 ENABLE_SHARED = @enable_shared@
-ENABLE_DBM = @enable_dbm@
+HAVE_DB = @have_db@
 
 ifeq ($(PKG_PLATFORM),linux)
 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 
 ifeq ($(PKG_PLATFORM),linux)
 PCFLAGS = -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
@@ -84,8 +84,8 @@ ifeq ($(PKG_PLATFORM),darwin)
 PCFLAGS = -traditional-cpp
 endif
 
 PCFLAGS = -traditional-cpp
 endif
 
-CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -Wall -I$(TOPDIR)/include \
-       -DVERSION=\"$(PKG_VERSION)\"
+CFLAGS += -O1 $(OPTIMIZER) $(DEBUG) -funsigned-char -fno-strict-aliasing -Wall \
+       -I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\" -D_REENTRANT
 
 # Global, Platform, Local CFLAGS
 CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
 
 # Global, Platform, Local CFLAGS
 CFLAGS += $(GCFLAGS) $(PCFLAGS) $(LCFLAGS)
index bce094c29e68066aea45cb0d644c9dcbbe6f7c16..41a5e2ea9cf1e97866711ca6d1e8542245a7015a 100644 (file)
@@ -72,7 +72,7 @@ LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 LTLINK = $(LIBTOOL) --mode=link $(CC)
 LTEXEC = $(LIBTOOL) --mode=execute
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
 LTLINK = $(LIBTOOL) --mode=link $(CC)
 LTEXEC = $(LIBTOOL) --mode=execute
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF) -D_REENTRANT -fno-strict-aliasing
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
 
 ifeq ($(ENABLE_SHARED),yes)
 LTLDFLAGS += -rpath $(PKG_LIB_DIR)
 
 ifeq ($(ENABLE_SHARED),yes)
 LTLDFLAGS += -rpath $(PKG_LIB_DIR)
index f09c2c86c7f17f72445009cdbd805a0e3bbb446b..98ab4b06a3ed8fc9bf4ff48d46963ffd13c8586c 100644 (file)
@@ -96,14 +96,12 @@ int bsize;  /* size of buffer */
 int offset;    /* offset into the file where buffer starts */
 char **errmsg;
 {
 int offset;    /* offset into the file where buffer starts */
 char **errmsg;
 {
-    int cnt;
-    unsigned char *chr;
-    int total;
-    long expbits;
-    long actbits;
+       int cnt;
+       unsigned char *chr;
+       long expbits;
+       long actbits;
 
        chr=buffer;
 
        chr=buffer;
-       total=bsize;
 
        if ( errmsg != NULL ) {
            *errmsg = Errmsg;
 
        if ( errmsg != NULL ) {
            *errmsg = Errmsg;
index 82fe08b4add01e5f2d7dacc1c8ac49012ef23365..57f2b7917a975eb4bbf0249d26572fc8b0bfc7ce 100644 (file)
@@ -97,7 +97,8 @@
 #else
 /* for linux or sgi */
 #include <sys/uio.h> /* readv(2)/writev(2) */
 #else
 /* for linux or sgi */
 #include <sys/uio.h> /* readv(2)/writev(2) */
-#include <string.h>  /* bzero */
+#include <string.h>
+#include <strings.h>
 #endif
 #ifdef sgi
 #include <aio.h>
 #endif
 #ifdef sgi
 #include <aio.h>
@@ -439,7 +440,7 @@ static void
 lio_async_callback_handler(sigval_t sigval)
 {
        if ( Debug_level )
 lio_async_callback_handler(sigval_t sigval)
 {
        if ( Debug_level )
-           printf("DEBUG %s/%d: received callback, nbytes=%ld, a callback called %d times\n",
+           printf("DEBUG %s/%d: received callback, nbytes=%d, a callback called %d times\n",
                __FILE__, __LINE__, sigval.sival_int, Received_callback+1);
 
        Received_callback++;
                __FILE__, __LINE__, sigval.sival_int, Received_callback+1);
 
        Received_callback++;
index 851ab65aaf6b174e85f0da58e1ea32bfabde653e..d6c81a77d58a86f9bc06ddc55da62657940cc2dc 100644 (file)
@@ -68,6 +68,7 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <string.h>
 #include <fcntl.h>
 #include <errno.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -251,7 +252,7 @@ int                         nrecs;
 int                    (*func)();
 long                   data;
 {
 int                    (*func)();
 long                   data;
 {
-       int                     fd, leftover, nbytes, offset, recnum, reclen, rval;
+       int                     fd, leftover, nbytes, offset, recnum, reclen;
        char                    buf[BSIZE*32], *bufend, *cp, *bufstart;
        char            albuf[WLOG_REC_MAX_SIZE];
        struct wlog_rec wrec;
        char                    buf[BSIZE*32], *bufend, *cp, *bufstart;
        char            albuf[WLOG_REC_MAX_SIZE];
        struct wlog_rec wrec;
@@ -353,7 +354,7 @@ long                        data;
                         * stop if instructed to.
                         */
 
                         * stop if instructed to.
                         */
 
-                       if ((rval = (*func)(&wrec, data)) == WLOG_STOP_SCAN) {
+                       if ((*func)(&wrec, data) == WLOG_STOP_SCAN) {
                                break;
                        }
 
                                break;
                        }
 
index 1a5c4aaecf18af4d8e724b0357aec80c16349a01..ce359b6a552000ddd797804a8b62d3b67f9aba78 100644 (file)
@@ -38,26 +38,26 @@ CFILES = $(TARGETS:=.c)
 HFILES = doio.h
 LDIRT = $(TARGETS)
 LCFLAGS = -DXFS
 HFILES = doio.h
 LDIRT = $(TARGETS)
 LCFLAGS = -DXFS
-
+IFLAG = -I$(TOPDIR)/src #Used for including $(TOPDIR)/src/global.h
 #LCFLAGS += -DAIO
 #LIBAIO =-laio
 
 default: $(TARGETS)
 
 #LCFLAGS += -DAIO
 #LIBAIO =-laio
 
 default: $(TARGETS)
 
-include $(BUILDRULES)
+include $(BUILDRULES) 
 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
 
 doio: doio.c $(LIBTEST)
 LINKTEST = $(LTLINK) $@.c -o $@ $(CFLAGS) $(LDFLAGS)
 
 doio: doio.c $(LIBTEST)
-       $(LINKTEST) $(LIBTEST)
+       $(LINKTEST) $(LIBTEST) $(IFLAG)
 
 fsstress: fsstress.c $(LIBATTR) $(LIBTEST)
 
 fsstress: fsstress.c $(LIBATTR) $(LIBTEST)
-       $(LINKTEST) $(LIBATTR) $(LIBTEST) $(LDLIBS)
+       $(LINKTEST) $(LIBATTR) $(LIBTEST) $(LDLIBS)  $(IFLAG)
 
 fsx: fsx.c
 
 fsx: fsx.c
-       $(LINKTEST) $(LIBAIO) $(LDLIBS)
+       $(LINKTEST) $(LIBAIO) $(LDLIBS)  $(IFLAG)
 
 growfiles: growfiles.c $(LIBTEST)
 
 growfiles: growfiles.c $(LIBTEST)
-       $(LINKTEST) $(LIBTEST) $(LDLIBS)
+       $(LINKTEST) $(LIBTEST) $(LDLIBS)  $(IFLAG)
 
 iogen: iogen.c $(LIBTEST)
 
 iogen: iogen.c $(LIBTEST)
-       $(LINKTEST) $(LIBTEST)
+       $(LINKTEST) $(LIBTEST)  $(IFLAG)
index 731798e427bc01656ef42aaecc7c5f753fa8c122..c1dda1880f8f7b8bb37a790b45ea5fa85063d0f9 100644 (file)
  *
  */
 
  *
  */
 
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <signal.h>
-#include <string.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/sysmacros.h>
-#ifdef CRAY
-#include <sys/iosw.h>
-#endif
+#include "global.h"
+
 #ifdef sgi
 #include <aio.h>       /* for aio_read,write */
 #include <inttypes.h>  /* for uint64_t type */
 #include <siginfo.h>   /* signal handlers & SA_SIGINFO */
 #endif
 #ifdef sgi
 #include <aio.h>       /* for aio_read,write */
 #include <inttypes.h>  /* for uint64_t type */
 #include <siginfo.h>   /* signal handlers & SA_SIGINFO */
 #endif
-#ifndef CRAY
+
 #include <sys/uio.h>   /* for struct iovec (readv)*/
 #include <sys/mman.h>  /* for mmap(2) */
 #include <sys/ipc.h>   /* for i/o buffer in shared memory */
 #include <sys/shm.h>   /* for i/o buffer in shared memory */
 #include <sys/uio.h>   /* for struct iovec (readv)*/
 #include <sys/mman.h>  /* for mmap(2) */
 #include <sys/ipc.h>   /* for i/o buffer in shared memory */
 #include <sys/shm.h>   /* for i/o buffer in shared memory */
-#endif
 #include <sys/wait.h>
 #include <sys/wait.h>
-#ifdef CRAY
-#include <sys/listio.h>
-#include <sys/panic.h>
-#endif
 #include <sys/time.h>  /* for delays */
 #include <sys/time.h>  /* for delays */
+#include <ctype.h>
 
 #ifndef NO_XFS
 
 #ifndef NO_XFS
-#include <xfs/libxfs.h>
 struct io_req;
 int do_xfsctl(struct io_req *);
 #endif
 struct io_req;
 int do_xfsctl(struct io_req *);
 #endif
@@ -283,6 +263,10 @@ int     aio_unregister( int );
 int     parse_cmdline( int, char **, char * );
 int     lock_file_region( char *, int, int, int, int );
 struct fd_cache *alloc_fdcache(char *, int);
 int     parse_cmdline( int, char **, char * );
 int     lock_file_region( char *, int, int, int, int );
 struct fd_cache *alloc_fdcache(char *, int);
+int     aio_register( int, int, int );
+#ifndef linux
+int aio_wait(int);
+#endif
 
 /*
  * Upanic conditions, and a map from symbolics to values
 
 /*
  * Upanic conditions, and a map from symbolics to values
@@ -379,13 +363,8 @@ int        argc;
 char   **argv;
 {
        int                     i, pid, stat, ex_stat;
 char   **argv;
 {
        int                     i, pid, stat, ex_stat;
-#ifdef CRAY
-       sigset_t                omask;
-#else
-       int                     omask;
-#endif
        struct sigaction        sa;
        struct sigaction        sa;
-
+       int omask;
        umask(0);               /* force new file modes to known values */
 #if _CRAYMPP
        Npes = sysconf(_SC_CRAY_NPES);  /* must do this before parse_cmdline */
        umask(0);               /* force new file modes to known values */
 #if _CRAYMPP
        Npes = sysconf(_SC_CRAY_NPES);  /* must do this before parse_cmdline */
@@ -627,11 +606,11 @@ doio()
        if ((cp = strchr(Host, '.')) != NULL)
                *cp = '\0';
 
        if ((cp = strchr(Host, '.')) != NULL)
                *cp = '\0';
 
-       Pattern_Length = sprintf(Pattern, "-:%d:%s:%s*", getpid(), Host, Prog);
+       Pattern_Length = sprintf(Pattern, "-:%d:%s:%s*", (int)getpid(), Host, Prog);
 
        if (!(Pattern_Length % 16)) {
                Pattern_Length = sprintf(Pattern, "-:%d:%s:%s**",
 
        if (!(Pattern_Length % 16)) {
                Pattern_Length = sprintf(Pattern, "-:%d:%s:%s**",
-                                        getpid(), Host, Prog);
+                                        (int)getpid(), Host, Prog);
        }
 
        /*
        }
 
        /*
@@ -1427,7 +1406,9 @@ do_write(req)
 struct io_req  *req;
 {
        static int              pid = -1;
 struct io_req  *req;
 {
        static int              pid = -1;
-       int                     fd, nbytes, oflags, signo;
+       int                     fd, nbytes, oflags;
+       /* REFERENCED */
+       int                     signo;
        int                     logged_write, rval, got_lock;
        long                    offset, woffset = 0;
        char                    *addr, pattern, *file, *msg;
        int                     logged_write, rval, got_lock;
        long                    offset, woffset = 0;
        char                    *addr, pattern, *file, *msg;
@@ -2953,8 +2934,11 @@ do_rw(req)
        struct status           *s;
        struct wlog_rec         wrec;
        struct syscall_info     *sy;
        struct status           *s;
        struct wlog_rec         wrec;
        struct syscall_info     *sy;
-#if defined(CRAY) || defined(sgi)
+#ifdef sgi
        struct aio_info         *aiop;
        struct aio_info         *aiop;
+#endif
+#ifdef CRAY
+       /* REFERENCED */
        struct iosw             *iosw;
 #endif
 #ifndef NO_XFS
        struct iosw             *iosw;
 #endif
 #ifndef NO_XFS
@@ -3543,12 +3527,12 @@ int     patshift;
 
                                for (i = 0; i < nb; i++) {
                                        expected[i] = pattern[(pattern_index + i) % pattern_length];
 
                                for (i = 0; i < nb; i++) {
                                        expected[i] = pattern[(pattern_index + i) % pattern_length];
-                                       if (! isprint(expected[i])) {
+                                       if (! isprint((int)expected[i])) {
                                                expected[i] = '.';
                                        }
 
                                        actual[i] = cp[i];
                                                expected[i] = '.';
                                        }
 
                                        actual[i] = cp[i];
-                                       if (! isprint(actual[i])) {
+                                       if (! isprint((int)actual[i])) {
                                                actual[i] = '.';
                                        }
                                }
                                                actual[i] = '.';
                                        }
                                }
index d3f15968fb289344202a5d63379cfdef89502ae3..b19e4e2017758633f7bdf6a1d038cbef1fb0aaf6 100644 (file)
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
+
+#ifdef HAVE_ATTR_XATTR_H
 #include <attr/xattr.h>
 #include <attr/xattr.h>
-#include <attr/attributes.h>
-#include <sys/statvfs.h>
-#include <sys/time.h>
-#include <sys/wait.h>
-#include <dirent.h>
+#endif
 
 
+#include <math.h>
 #define XFS_ERRTAG_MAX         17
 #define XFS_IDMODULO_MAX       32
 
 #define XFS_ERRTAG_MAX         17
 #define XFS_IDMODULO_MAX       32
 
@@ -214,7 +213,11 @@ int                verbose = 0;
 
 void   add_to_flist(int, int, int);
 void   append_pathname(pathname_t *, char *);
 
 void   add_to_flist(int, int, int);
 void   append_pathname(pathname_t *, char *);
+#ifdef HAVE_LIBATTR
 int    attr_list_path(pathname_t *, char *, const int, int);
 int    attr_list_path(pathname_t *, char *, const int, int);
+#else
+int    attr_list_path(pathname_t *, char *, const int, int, attrlist_cursor_t *);
+#endif
 int    attr_remove_path(pathname_t *, const char *, int);
 int    attr_set_path(pathname_t *, const char *, const char *, const int, int);
 void   check_cwd(void);
 int    attr_remove_path(pathname_t *, const char *, int);
 int    attr_set_path(pathname_t *, const char *, const char *, const int, int);
 void   check_cwd(void);
@@ -268,7 +271,7 @@ int main(int argc, char **argv)
        struct timeval  t;
        ptrdiff_t       srval;
        int             nousage = 0;
        struct timeval  t;
        ptrdiff_t       srval;
        int             nousage = 0;
-       xfs_error_injection_t   err_inj;
+       xfs_error_injection_t           err_inj;
 
        errrange = errtag = 0;
        umask(0);
 
        errrange = errtag = 0;
        umask(0);
@@ -357,7 +360,7 @@ int main(int argc, char **argv)
                perror(dirname);
                exit(1);
        }
                perror(dirname);
                exit(1);
        }
-       sprintf(buf, "fss%x", getpid());
+       sprintf(buf, "fss%x", (unsigned int)getpid());
        fd = creat(buf, 0666);
        if (lseek64(fd, (off64_t)(MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
                maxfsize = (off64_t)MAXFSIZE32;
        fd = creat(buf, 0666);
        if (lseek64(fd, (off64_t)(MAXFSIZE32 + 1ULL), SEEK_SET) < 0)
                maxfsize = (off64_t)MAXFSIZE32;
@@ -472,22 +475,40 @@ append_pathname(pathname_t *name, char *str)
 }
 
 int
 }
 
 int
-attr_list_path(pathname_t *name, char *buffer, const int buffersize, int flags)
+attr_list_path(pathname_t *name,
+              char *buffer,
+              const int buffersize,
+              int flags
+#ifndef HAVE_LIBATTR
+              , attrlist_cursor_t *cursor
+#endif
+              )
 {
        char            buf[MAXNAMELEN];
        pathname_t      newname;
        int             rval;
 
 {
        char            buf[MAXNAMELEN];
        pathname_t      newname;
        int             rval;
 
+#ifdef ATTR_DONTFOLLOW
        if (flags != ATTR_DONTFOLLOW) {
                errno = EINVAL;
                return -1;
        }
        if (flags != ATTR_DONTFOLLOW) {
                errno = EINVAL;
                return -1;
        }
+#endif
+
+#ifdef HAVE_LIBATTR
        rval = llistxattr(name->path, buffer, buffersize);
        rval = llistxattr(name->path, buffer, buffersize);
+#else
+       rval = attr_list(name->path, buffer, buffersize, flags, cursor);
+#endif
        if (rval >= 0 || errno != ENAMETOOLONG)
                return rval;
        separate_pathname(name, buf, &newname);
        if (chdir(buf) == 0) {
        if (rval >= 0 || errno != ENAMETOOLONG)
                return rval;
        separate_pathname(name, buf, &newname);
        if (chdir(buf) == 0) {
+#ifdef HAVE_LIBATTR
                rval = attr_list_path(&newname, buffer, buffersize, flags);
                rval = attr_list_path(&newname, buffer, buffersize, flags);
+#else
+               rval = attr_list_path(&newname, buffer, buffersize, flags, cursor);
+#endif
                chdir("..");
        }
        free_pathname(&newname);
                chdir("..");
        }
        free_pathname(&newname);
@@ -1322,7 +1343,7 @@ allocsp_f(int opno, long r)
        int             e;
        pathname_t      f;
        int             fd;
        int             e;
        pathname_t      f;
        int             fd;
-       struct flock64  fl;
+       struct xfs_flock64      fl;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
@@ -1370,8 +1391,13 @@ allocsp_f(int opno, long r)
 void
 attr_remove_f(int opno, long r)
 {
 void
 attr_remove_f(int opno, long r)
 {
-       char                    *aname, *l;
+       attrlist_ent_t          *aep;
+       attrlist_t              *alist;
+       char                    *aname;
        char                    buf[4096];
        char                    buf[4096];
+#ifndef HAVE_LIBATTR
+       attrlist_cursor_t       cursor;
+#endif
        int                     e;
        int                     ent;
        pathname_t              f;
        int                     e;
        int                     ent;
        pathname_t              f;
@@ -1383,13 +1409,22 @@ attr_remove_f(int opno, long r)
        if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
                append_pathname(&f, ".");
        total = 0;
        if (!get_fname(FT_ANYm, r, &f, NULL, NULL, &v))
                append_pathname(&f, ".");
        total = 0;
-       e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW);
-       check_cwd();
-       if (e > 0) {
-               for (l = buf; l - buf <= e; l += strlen(l)+1)
-                       if (strncmp(l, "user.",5) == 0)
-                               total++;
-       }
+#ifndef HAVE_LIBATTR
+       bzero(&cursor, sizeof(cursor));
+#endif
+       do {
+               bzero(buf, sizeof(buf));
+#ifdef HAVE_LIBATTR
+               e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW);
+#else
+               e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW, &cursor);
+#endif
+               check_cwd();
+               if (e)
+                       break;
+               alist = (attrlist_t *)buf;
+               total += alist->al_count;
+       } while (alist->al_more);
        if (total == 0) {
                if (v)
                        printf("%d/%d: attr_remove - no attrs for %s\n",
        if (total == 0) {
                if (v)
                        printf("%d/%d: attr_remove - no attrs for %s\n",
@@ -1398,20 +1433,30 @@ attr_remove_f(int opno, long r)
                return;
        }
        which = (int)(random() % total);
                return;
        }
        which = (int)(random() % total);
+#ifndef HAVE_LIBATTR
+       bzero(&cursor, sizeof(cursor));
+#endif
        ent = 0;
        aname = NULL;
        ent = 0;
        aname = NULL;
-       e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW);
-       check_cwd();
-       if (e <= 0)
-               return;
-       for (l = buf; l - buf <= e; l += strlen(l)+1) {
-               if (strncmp(l, "user.",5) == 0) {
-                       if (++ent == which) {
-                               aname = l;
-                               break;
-                       }
+       do {
+               bzero(buf, sizeof(buf));
+#ifdef HAVE_LIBATTR
+               e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW);
+#else
+               e = attr_list_path(&f, buf, sizeof(buf), ATTR_DONTFOLLOW, &cursor);
+#endif
+               check_cwd();
+               if (e)
+                       break;
+               alist = (attrlist_t *)buf;
+               if (which < ent + alist->al_count) {
+                       aep = (attrlist_ent_t *)
+                               &buf[alist->al_offset[which - ent]];
+                       aname = aep->a_name;
+                       break;
                }
                }
-       }
+               ent += alist->al_count;
+       } while (alist->al_more);
        if (aname == NULL) {
                if (v)
                        printf(
        if (aname == NULL) {
                if (v)
                        printf(
@@ -1486,7 +1531,7 @@ bulkstat_f(int opno, long r)
                total += count;
        free(t);
        if (verbose)
                total += count;
        free(t);
        if (verbose)
-               printf("%d/%d: bulkstat nent %d total %llu\n",
+               printf("%d/%d: bulkstat nent %d total %lld\n",
                        procid, opno, nent, (long long)total);
        close(fd);
 }
                        procid, opno, nent, (long long)total);
        close(fd);
 }
@@ -1567,7 +1612,7 @@ chown_f(int opno, long r)
        e = lchown_path(&f, u, g) < 0 ? errno : 0;
        check_cwd();
        if (v)
        e = lchown_path(&f, u, g) < 0 ? errno : 0;
        check_cwd();
        if (v)
-               printf("%d/%d: chown %s %d/%d %d\n", procid, opno, f.path, u, g, e);
+               printf("%d/%d: chown %s %d/%d %d\n", procid, opno, f.path, (int)u, (int)g, e);
        free_pathname(&f);
 }
 
        free_pathname(&f);
 }
 
@@ -1820,7 +1865,7 @@ freesp_f(int opno, long r)
        int             e;
        pathname_t      f;
        int             fd;
        int             e;
        pathname_t      f;
        int             fd;
-       struct flock64  fl;
+       struct xfs_flock64      fl;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
@@ -2190,7 +2235,7 @@ resvsp_f(int opno, long r)
        int             e;
        pathname_t      f;
        int             fd;
        int             e;
        pathname_t      f;
        int             fd;
-       struct flock64  fl;
+       struct xfs_flock64      fl;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
@@ -2406,7 +2451,7 @@ unresvsp_f(int opno, long r)
        int             e;
        pathname_t      f;
        int             fd;
        int             e;
        pathname_t      f;
        int             fd;
-       struct flock64  fl;
+       struct xfs_flock64      fl;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
        __int64_t       lr;
        off64_t         off;
        struct stat64   stb;
index 7d7457c3bebcc5dd9489fb35ca48eceab5efb436..7b08b5d49febf5d5682608426784ae39f916d480 100644 (file)
--- a/ltp/fsx.c
+++ b/ltp/fsx.c
  *     Small changes to work under Linux -- davej.
  */
 
  *     Small changes to work under Linux -- davej.
  */
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/param.h>
+#include "global.h"
+
 #include <limits.h>
 #include <time.h>
 #include <strings.h>
 #include <sys/file.h>
 #include <sys/mman.h>
 #include <limits.h>
 #include <time.h>
 #include <strings.h>
 #include <sys/file.h>
 #include <sys/mman.h>
-#include <limits.h>
+#ifdef HAVE_ERR_H
 #include <err.h>
 #include <err.h>
+#endif
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <signal.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <unistd.h>
 #include <stdarg.h>
 #include <errno.h>
 #ifdef AIO
 #include <libaio.h>
 #endif
 #include <stdarg.h>
 #include <errno.h>
 #ifdef AIO
 #include <libaio.h>
 #endif
-#ifdef XFS
-#include <xfs/libxfs.h>
-#endif
 
 #ifndef MAP_FILE
 # define MAP_FILE 0
 
 #ifndef MAP_FILE
 # define MAP_FILE 0
@@ -135,6 +131,24 @@ static void *round_up(void *ptr, unsigned long align, unsigned long offset)
        return (void *)ret;
 }
 
        return (void *)ret;
 }
 
+void
+vwarnc(int code, const char *fmt, va_list ap) {
+  fprintf(stderr, "fsx: ");
+  if (fmt != NULL) {
+       vfprintf(stderr, fmt, ap);
+       fprintf(stderr, ": ");
+  }
+  fprintf(stderr, "%s\n", strerror(code));
+}
+
+void
+warn(const char * fmt, ...)  {
+       va_list ap;
+       va_start(ap, fmt);
+       vwarnc(errno, fmt, ap);
+       va_end(ap);
+}
+
 void
 prt(char *fmt, ...)
 {
 void
 prt(char *fmt, ...)
 {
@@ -1125,13 +1139,13 @@ main(int argc, char **argv)
 #ifdef XFS
        if (prealloc) {
                xfs_flock64_t   resv = { 0 };
 #ifdef XFS
        if (prealloc) {
                xfs_flock64_t   resv = { 0 };
-
+#ifdef HAVE_XFS_PLATFORM_DEFS_H
                if (!platform_test_xfs_fd(fd)) {
                        prterr(fname);
                        fprintf(stderr, "main: cannot prealloc, non XFS\n");
                        exit(96);
                }
                if (!platform_test_xfs_fd(fd)) {
                        prterr(fname);
                        fprintf(stderr, "main: cannot prealloc, non XFS\n");
                        exit(96);
                }
-
+#endif
                resv.l_len = maxfilelen;
                if ((xfsctl(fname, fd, XFS_IOC_RESVSP, &resv)) < 0) {
                        prterr(fname);
                resv.l_len = maxfilelen;
                if ((xfsctl(fname, fd, XFS_IOC_RESVSP, &resv)) < 0) {
                        prterr(fname);
index 21de853c330f9348b40c9f3da4b723db50194f4b..ddad712d4001b250d23a3cdb8d2af7ea07df644a 100644 (file)
  * Author: Richard Logan
  *
  */
  * Author: Richard Logan
  *
  */
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <time.h>
+
+#include "global.h"
+
+#ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
 #include <sys/file.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/param.h>
-#include <sys/signal.h>
-#include <errno.h>
-#include <string.h>
+#endif
+
 #include "dataascii.h"
 #include "random_range.h"
 #include "databin.h"
 
 #include "dataascii.h"
 #include "random_range.h"
 #include "databin.h"
 
-#ifndef NO_XFS
-#include <xfs/libxfs.h>
-#endif
-
-#ifdef CRAY
-#include <sys/panic.h>
-#include <sys/category.h>
-#endif
 
 extern char *openflags2symbols();
 
 
 extern char *openflags2symbols();
 
@@ -908,14 +892,14 @@ extern int Forker_npids;  /* num of forked pid, defined in forker.c */
            no_file_check=1;
            if ( write_check_inter || file_check_inter )
                 printf("%s%s: %d Using random pattern - no data checking will be performed!\n",
            no_file_check=1;
            if ( write_check_inter || file_check_inter )
                 printf("%s%s: %d Using random pattern - no data checking will be performed!\n",
-                   Progname, TagName, getpid());
+                   Progname, TagName, (int)getpid());
        }
        else if ( max_lseek == LSK_EOFPLUSGROW || Mode & MODE_GROW_BY_LSEEK ) {
            no_file_check=1;
 
            if ( file_check_inter )
                printf("%s%s: %d Using random lseek beyond EOF or lseek grow,\n\
        }
        else if ( max_lseek == LSK_EOFPLUSGROW || Mode & MODE_GROW_BY_LSEEK ) {
            no_file_check=1;
 
            if ( file_check_inter )
                printf("%s%s: %d Using random lseek beyond EOF or lseek grow,\n\
-no whole file checking will be performed!\n", Progname, TagName, getpid());
+no whole file checking will be performed!\n", Progname, TagName, (int)getpid());
 
        }
 
 
        }
 
@@ -1811,10 +1795,11 @@ growfile(fd, file, grow_incr, buf)
 int fd;
 char *file;
 int grow_incr;
 int fd;
 char *file;
 int grow_incr;
-char *buf;
+unsigned char *buf;
 {
    int noffset;
    int ret;
 {
    int noffset;
    int ret;
+   /* REFERENCED */
    int cur_offset;
    char *errmsg;
    int fsize;          /* current size of file */
    int cur_offset;
    char *errmsg;
    int fsize;          /* current size of file */
@@ -2005,7 +1990,7 @@ char *buf;
                else if ( Pattern == PATTERN_PID )
                    datapidgen(Pid, buf, grow_incr, Woffset);
                else if ( Pattern == PATTERN_ASCII )
                else if ( Pattern == PATTERN_PID )
                    datapidgen(Pid, buf, grow_incr, Woffset);
                else if ( Pattern == PATTERN_ASCII )
-                   dataasciigen(NULL, buf, grow_incr, Woffset);
+                   dataasciigen(NULL, (char *)buf, grow_incr, Woffset);
                else if ( Pattern == PATTERN_RANDOM )
                    databingen('r', buf, grow_incr, Woffset);
                else if ( Pattern == PATTERN_ALT )
                else if ( Pattern == PATTERN_RANDOM )
                    databingen('r', buf, grow_incr, Woffset);
                else if ( Pattern == PATTERN_ALT )
@@ -2019,7 +2004,7 @@ char *buf;
                else if ( Pattern == PATTERN_ONES )
                    databingen('o', buf, grow_incr, Woffset);
                else
                else if ( Pattern == PATTERN_ONES )
                    databingen('o', buf, grow_incr, Woffset);
                else
-                   dataasciigen(NULL, buf, grow_incr, Woffset);
+                   dataasciigen(NULL, (char *)buf, grow_incr, Woffset);
 
                if ( Debug > 2 )
                    printf("%s: %d DEBUG3 %s/%d: attempting to write %d bytes\n",
 
                if ( Debug > 2 )
                    printf("%s: %d DEBUG3 %s/%d: attempting to write %d bytes\n",
@@ -2042,7 +2027,7 @@ char *buf;
 *****/
 
 #if NEWIO
 *****/
 
 #if NEWIO
-               ret=lio_write_buffer(fd, io_type, buf, grow_incr,
+               ret=lio_write_buffer(fd, io_type, (char *)buf, grow_incr,
                         SIGUSR1, &errmsg,0);
 #else
                ret=write_buffer(fd, io_type, buf, grow_incr, 0, &errmsg);
                         SIGUSR1, &errmsg,0);
 #else
                ret=write_buffer(fd, io_type, buf, grow_incr, 0, &errmsg);
@@ -2798,6 +2783,7 @@ int size;
 #endif
 
 #ifndef NO_XFS
 #endif
 
 #ifndef NO_XFS
+#ifdef XFS_IOC_RESVSP
     struct xfs_flock64 f;
 
        f.l_whence = 0;
     struct xfs_flock64 f;
 
        f.l_whence = 0;
@@ -2811,7 +2797,21 @@ int size;
                         __FILE__, __LINE__, errno, strerror(errno));
                return -1;
        }
                         __FILE__, __LINE__, errno, strerror(errno));
                return -1;
        }
+#else
+    struct flock64 f;
 
 
+       f.l_whence = 0;
+       f.l_start = 0;
+       f.l_len = size;
+
+       /* non-zeroing reservation */
+       if( fcntl( fd, F_RESVSP64, &f ) == -1 ){
+                fprintf(stderr, "%s%s %s/%d: Unable to pre-alloc space: fcntl(F_RESVSP) failed: %d  %s\n",
+                       Progname, TagName,
+                        __FILE__, __LINE__, errno, strerror(errno));
+               return -1;
+       }
+#endif
 #endif
 
        return 0;
 #endif
 
        return 0;
index 7a2009268ca04b6786e192a783c36dda8b8c855f..661cc7d94c9d7542c4c65814387ea8e9eba461c0 100644 (file)
  * iogen - a tool for generating file/sds io for a doio process
  */
 
  * iogen - a tool for generating file/sds io for a doio process
  */
 
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <signal.h>
-#include <time.h>
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/sysmacros.h>
-#ifdef CRAY
-#include <sys/file.h>
-#include <sys/iosw.h>
-#include <sys/listio.h>
+#include "global.h"
+
+#ifdef HAVE_SYS_SYSSGI_H
+#include <sys/syssgi.h>
 #endif
 #endif
-#ifdef sgi
-#include <sys/statvfs.h>
-#include <sys/fs/xfs_itable.h>
+
+#ifdef HAVE_SYS_UUID_H
+#include <sys/uuid.h>
 #endif
 
 #endif
 
-#ifndef NO_XFS
-#include <xfs/libxfs.h>
+#ifdef HAVE_SYS_FS_XFS_FSOPS_H
+#include <sys/fs/xfs_fsops.h>
 #endif
 
 #endif
 
-#ifdef CRAY
-#include "libkern.h"
+#ifdef HAVE_SYS_FS_XFS_ITABLE_H
+#include <sys/fs/xfs_itable.h>
 #endif
 
 #endif
 
+
 #include "doio.h"
 #include "str_to_bytes.h"
 #include "string_to_tokens.h"
 #include "doio.h"
 #include "str_to_bytes.h"
 #include "string_to_tokens.h"
@@ -276,8 +264,8 @@ struct strmap       Syscall_Map[] = {
        { "llaread",            LLAREAD,        SY_ASYNC                },
        { "llwrite",            LLWRITE,        0                       },
        { "llawrite",           LLAWRITE,       SY_ASYNC                },
        { "llaread",            LLAREAD,        SY_ASYNC                },
        { "llwrite",            LLWRITE,        0                       },
        { "llawrite",           LLAWRITE,       SY_ASYNC                },
-#endif
        { "ffsync",             DFFSYNC,        SY_WRITE                },
        { "ffsync",             DFFSYNC,        SY_WRITE                },
+#endif
 #endif /* SGI */
 #ifndef NO_XFS
        { "resvsp",             RESVSP,         SY_WRITE                },
 #endif /* SGI */
 #ifndef NO_XFS
        { "resvsp",             RESVSP,         SY_WRITE                },
@@ -986,7 +974,15 @@ struct file_info    *rec;
 #endif
 #ifndef NO_XFS
        if( (fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1 ) {
 #endif
 #ifndef NO_XFS
        if( (fd = open(rec->f_path, O_RDWR|O_DIRECT, 0)) != -1 ) {
+#ifdef XFS_IOC_DIOINFO
            if(xfsctl(rec->f_path, fd, XFS_IOC_DIOINFO, &finfo) != -1) {
            if(xfsctl(rec->f_path, fd, XFS_IOC_DIOINFO, &finfo) != -1) {
+#else
+#ifdef F_DIOINFO
+           if(fcntl(fd, F_DIOINFO, &finfo) != -1) {
+#else
+bozo!
+#endif
+#endif
                rec->f_riou = finfo.d_miniosz;
            } else {
                fprintf(stderr,
                rec->f_riou = finfo.d_miniosz;
            } else {
                fprintf(stderr,
@@ -1047,7 +1043,7 @@ int       nbytes;
     struct stat        sbuf;
 #ifndef NO_XFS
     int                nb;
     struct stat        sbuf;
 #ifndef NO_XFS
     int                nb;
-    struct xfs_flock64 f;
+    struct flock64 f;
     struct fsxattr xattr;
     struct dioattr finfo;
     char       *b, *buf;
     struct fsxattr xattr;
     struct dioattr finfo;
     char       *b, *buf;
@@ -1109,7 +1105,15 @@ int      nbytes;
            bzero(&xattr, sizeof(xattr));
            xattr.fsx_xflags = XFS_XFLAG_REALTIME;
            /*fprintf(stderr, "set: fsx_xflags = 0x%x\n", xattr.fsx_xflags);*/
            bzero(&xattr, sizeof(xattr));
            xattr.fsx_xflags = XFS_XFLAG_REALTIME;
            /*fprintf(stderr, "set: fsx_xflags = 0x%x\n", xattr.fsx_xflags);*/
+#ifdef XFS_IOC_FSSETXATTR
            if( xfsctl(path, fd, XFS_IOC_FSSETXATTR, &xattr) == -1 ) {
            if( xfsctl(path, fd, XFS_IOC_FSSETXATTR, &xattr) == -1 ) {
+#else
+#ifdef F_FSSETXATTR
+                   if (fcntl(fd, F_FSSETXATTR, &xattr) < 0) {
+#else
+bozo!
+#endif
+#endif
                fprintf(stderr, "iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
                        TagName, SYSERR, errno, path);
                close(fd);
                fprintf(stderr, "iogen%s: Error %s (%d) setting XFS XATTR->Realtime on file %s\n",
                        TagName, SYSERR, errno, path);
                close(fd);
@@ -1117,7 +1121,15 @@ int      nbytes;
            }
 
 #ifdef DEBUG
            }
 
 #ifdef DEBUG
+#ifdef XFS_IOC_FSGETXATTR
            if( xfsctl(path, fd, XFS_IOC_FSGETXATTR, &xattr) == -1 ) {
            if( xfsctl(path, fd, XFS_IOC_FSGETXATTR, &xattr) == -1 ) {
+#else
+#ifdef F_FSGETXATTR
+           if (fcntl(fd, F_FSGETXATTR, &xattr) < 0) {
+#else
+bozo!
+#endif
+#endif
                fprintf(stderr, "iogen%s: Error getting realtime flag %s (%d)\n",
                        TagName, SYSERR, errno);
                close(fd);
                fprintf(stderr, "iogen%s: Error getting realtime flag %s (%d)\n",
                        TagName, SYSERR, errno);
                close(fd);
@@ -1145,6 +1157,7 @@ int       nbytes;
                   fd, f.l_whence, (long long)f.l_start, (long long)f.l_len);*/
 
            /* non-zeroing reservation */
                   fd, f.l_whence, (long long)f.l_start, (long long)f.l_len);*/
 
            /* non-zeroing reservation */
+#ifdef XFS_IOC_RESVSP
            if( xfsctl( path, fd, XFS_IOC_RESVSP, &f ) == -1) {
                fprintf(stderr,
                        "iogen%s:  Could not xfsctl(XFS_IOC_RESVSP) %d bytes in file %s: %s (%d)\n",
            if( xfsctl( path, fd, XFS_IOC_RESVSP, &f ) == -1) {
                fprintf(stderr,
                        "iogen%s:  Could not xfsctl(XFS_IOC_RESVSP) %d bytes in file %s: %s (%d)\n",
@@ -1152,6 +1165,19 @@ int      nbytes;
                close(fd);
                return -1;
            }
                close(fd);
                return -1;
            }
+#else
+#ifdef F_RESVSP
+           if( fcntl( fd, F_RESVSP, &f ) == -1) {
+               fprintf(stderr,
+                       "iogen%s:  Could not fcntl(F_RESVSP) %d bytes in file %s: %s (%d)\n",
+                       TagName, nbytes, path, SYSERR, errno);
+               close(fd);
+               return -1;
+           }
+#else
+bozo!
+#endif
+#endif
        }
 
        if( Oallocate ) {
        }
 
        if( Oallocate ) {
@@ -1165,6 +1191,7 @@ int       nbytes;
                    (long long)f.l_len);*/
 
            /* zeroing reservation */
                    (long long)f.l_len);*/
 
            /* zeroing reservation */
+#ifdef XFS_IOC_ALLOCSP
            if( xfsctl( path, fd, XFS_IOC_ALLOCSP, &f ) == -1) {
                fprintf(stderr,
                        "iogen%s:  Could not xfsctl(XFS_IOC_ALLOCSP) %d bytes in file %s: %s (%d)\n",
            if( xfsctl( path, fd, XFS_IOC_ALLOCSP, &f ) == -1) {
                fprintf(stderr,
                        "iogen%s:  Could not xfsctl(XFS_IOC_ALLOCSP) %d bytes in file %s: %s (%d)\n",
@@ -1172,6 +1199,19 @@ int      nbytes;
                close(fd);
                return -1;
            }
                close(fd);
                return -1;
            }
+#else
+#ifdef F_ALLOCSP
+           if ( fcntl(fd, F_ALLOCSP, &f) < 0) {
+               fprintf(stderr,
+                       "iogen%s:  Could not fcntl(F_ALLOCSP) %d bytes in file %s: %s (%d)\n",
+                       TagName, nbytes, path, SYSERR, errno);
+               close(fd);
+               return -1;
+           }
+#else
+bozo!
+#endif
+#endif
        }
 #endif
 
        }
 #endif
 
@@ -1184,7 +1224,15 @@ int      nbytes;
        if(Owrite == 2) {
            close(fd);
            if( (fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1 ) {
        if(Owrite == 2) {
            close(fd);
            if( (fd = open(path, O_CREAT|O_RDWR|O_DIRECT, 0)) != -1 ) {
+#ifdef XFS_IOC_DIOINFO
                if(xfsctl(path, fd, XFS_IOC_DIOINFO, &finfo) == -1) {
                if(xfsctl(path, fd, XFS_IOC_DIOINFO, &finfo) == -1) {
+#else
+#ifdef F_DIOINFO
+               if (fcntl(fd, F_DIOINFO, &finfo) < 0) {
+#else
+bozo!
+#endif
+#endif
                    fprintf(stderr,
                            "iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
                            TagName, SYSERR, errno, path);
                    fprintf(stderr,
                            "iogen%s: Error %s (%d) getting direct I/O info for file %s\n",
                            TagName, SYSERR, errno, path);
index 7ca8c481f6e9910158976c6dea87ca9fdfcff1a6..c7c738d3626af5c71342eca39b8a9e9154493433 100755 (executable)
@@ -337,10 +337,11 @@ do
 
                case $(uname) in
                IRIX*)
 
                case $(uname) in
                IRIX*)
-                 sz=$( perl -le 'print int( '$blks' * '$size' / 100 )' )
+                       echo $blke
+                 #sz=$( perl -le 'print int( "$blke" * "$size" / 100 )' )
                  ;;
                *)
                  ;;
                *)
-                 sz=$(expr \( $blks '*' $size \) / 100)
+                 #sz=$(expr \( $blks '*' $size \) / 100)
                  ;;
                esac
 
                  ;;
                esac
 
index 69e45452428c15cdcdd6510f9c378801d886ec7e..513e20f23e656ccfd0b89dbefd0bfa45d8e3265e 100644 (file)
@@ -1,5 +1,12 @@
-AC_DEFUN([AC_PACKAGE_WANT_LIBGDBM],
-  [ AC_CHECK_HEADER([gdbm/ndbm.h], [have_db=true ], [ have_db=false ])
+AC_DEFUN([AC_PACKAGE_WANT_NDBM],
+  [ AC_CHECK_HEADERS(ndbm.h, [ have_db=true ], [ have_db=false ])
+    libgdbm=""
+    AC_SUBST(libgdbm)
+    AC_SUBST(have_db)
+  ])
+
+AC_DEFUN([AC_PACKAGE_WANT_GDBM],
+  [ AC_CHECK_HEADERS([gdbm/ndbm.h], [ have_db=true ], [ have_db=false ])
     if test $have_db = true -a -f /usr/lib/libgdbm.a; then
        libgdbm="/usr/lib/libgdbm.a"
     fi
     if test $have_db = true -a -f /usr/lib/libgdbm.a; then
        libgdbm="/usr/lib/libgdbm.a"
     fi
index e0116ce9a1e36af2fbd4cf345bbf50b8495ec8bb..5ddafedcf9c332ac3c95393db8f8e9d2136b3984 100644 (file)
@@ -17,59 +17,69 @@ AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
 #  MSGFMT MSGMERGE RPM
 #
 AC_DEFUN([AC_PACKAGE_UTILITIES],
 #  MSGFMT MSGMERGE RPM
 #
 AC_DEFUN([AC_PACKAGE_UTILITIES],
-  [ if test -z "$CC"; then
-        AC_PROG_CC
-    fi
+  [ AC_PROG_CC
     cc="$CC"
     AC_SUBST(cc)
     AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
 
     if test -z "$MAKE"; then
     cc="$CC"
     AC_SUBST(cc)
     AC_PACKAGE_NEED_UTILITY($1, "$cc", cc, [C compiler])
 
     if test -z "$MAKE"; then
-        AC_PATH_PROG(MAKE, make, /usr/bin/make)
+        AC_PATH_PROG(MAKE, gmake,, /usr/bin:/usr/freeware/bin)
+    fi
+    if test -z "$MAKE"; then
+        AC_PATH_PROG(MAKE, make,, /usr/bin)
     fi
     make=$MAKE
     AC_SUBST(make)
     AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
 
     if test -z "$LIBTOOL"; then
     fi
     make=$MAKE
     AC_SUBST(make)
     AC_PACKAGE_NEED_UTILITY($1, "$make", make, [GNU make])
 
     if test -z "$LIBTOOL"; then
-       AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin:/usr/local/bin)
+       AC_PATH_PROG(LIBTOOL, glibtool,, /usr/bin)
+    fi
+    if test -z "$LIBTOOL"; then
+       AC_PATH_PROG(LIBTOOL, libtool,, /usr/bin:/usr/local/bin:/usr/freeware/bin)
     fi
     libtool=$LIBTOOL
     AC_SUBST(libtool)
     AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
 
     if test -z "$TAR"; then
     fi
     libtool=$LIBTOOL
     AC_SUBST(libtool)
     AC_PACKAGE_NEED_UTILITY($1, "$libtool", libtool, [GNU libtool])
 
     if test -z "$TAR"; then
-        AC_PATH_PROG(TAR, tar)
+        AC_PATH_PROG(TAR, tar,, /usr/freeware/bin:/bin:/usr/local/bin:/usr/bin)
     fi
     tar=$TAR
     AC_SUBST(tar)
     if test -z "$ZIP"; then
     fi
     tar=$TAR
     AC_SUBST(tar)
     if test -z "$ZIP"; then
-        AC_PATH_PROG(ZIP, gzip, /bin/gzip)
+        AC_PATH_PROG(ZIP, gzip,, /bin:/usr/local/bin:/usr/freeware/bin)
     fi
     fi
+
     zip=$ZIP
     AC_SUBST(zip)
     zip=$ZIP
     AC_SUBST(zip)
+
     if test -z "$MAKEDEPEND"; then
         AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
     fi
     makedepend=$MAKEDEPEND
     AC_SUBST(makedepend)
     if test -z "$MAKEDEPEND"; then
         AC_PATH_PROG(MAKEDEPEND, makedepend, /bin/true)
     fi
     makedepend=$MAKEDEPEND
     AC_SUBST(makedepend)
+
     if test -z "$AWK"; then
     if test -z "$AWK"; then
-        AC_PATH_PROG(AWK, awk, /bin/awk)
+        AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
     fi
     awk=$AWK
     AC_SUBST(awk)
     fi
     awk=$AWK
     AC_SUBST(awk)
+
     if test -z "$SED"; then
     if test -z "$SED"; then
-        AC_PATH_PROG(SED, sed, /bin/sed)
+        AC_PATH_PROG(SED, sed,, /bin:/usr/bin)
     fi
     sed=$SED
     AC_SUBST(sed)
     fi
     sed=$SED
     AC_SUBST(sed)
+
     if test -z "$ECHO"; then
     if test -z "$ECHO"; then
-        AC_PATH_PROG(ECHO, echo, /bin/echo)
+        AC_PATH_PROG(ECHO, echo,, /bin:/usr/bin)
     fi
     echo=$ECHO
     AC_SUBST(echo)
     fi
     echo=$ECHO
     AC_SUBST(echo)
+
     if test -z "$SORT"; then
     if test -z "$SORT"; then
-        AC_PATH_PROG(SORT, sort, /bin/sort)
+        AC_PATH_PROG(SORT, sort,, /bin:/usr/bin)
     fi
     sort=$SORT
     AC_SUBST(sort)
     fi
     sort=$SORT
     AC_SUBST(sort)
@@ -79,13 +89,14 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
 
     if test "$enable_gettext" = yes; then
         if test -z "$MSGFMT"; then
 
     if test "$enable_gettext" = yes; then
         if test -z "$MSGFMT"; then
-                AC_CHECK_PROG(MSGFMT, msgfmt, /usr/bin/msgfmt)
+                AC_PATH_PROG(MSGFMT, msgfmt,, /usr/bin:/usr/freeware/bin)
         fi
         msgfmt=$MSGFMT
         AC_SUBST(msgfmt)
         AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
         fi
         msgfmt=$MSGFMT
         AC_SUBST(msgfmt)
         AC_PACKAGE_NEED_UTILITY($1, "$msgfmt", msgfmt, gettext)
+
         if test -z "$MSGMERGE"; then
         if test -z "$MSGMERGE"; then
-                AC_CHECK_PROG(MSGMERGE, msgmerge, /usr/bin/msgmerge)
+                AC_PATH_PROG(MSGMERGE, msgmerge,, /usr/bin:/usr/freeware/bin)
         fi
         msgmerge=$MSGMERGE
         AC_SUBST(msgmerge)
         fi
         msgmerge=$MSGMERGE
         AC_SUBST(msgmerge)
@@ -93,10 +104,11 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
     fi
 
     if test -z "$RPM"; then
     fi
 
     if test -z "$RPM"; then
-        AC_PATH_PROG(RPM, rpm, /bin/rpm)
+        AC_PATH_PROG(RPM, rpm,, /bin:/usr/freeware/bin)
     fi
     rpm=$RPM
     AC_SUBST(rpm)
     fi
     rpm=$RPM
     AC_SUBST(rpm)
+
     dnl .. and what version is rpm
     rpm_version=0
     test -x $RPM && rpm_version=`$RPM --version \
     dnl .. and what version is rpm
     rpm_version=0
     test -x $RPM && rpm_version=`$RPM --version \
index 1f5f7a6170aaa06803bf250e3d31b6b3c8e346f7..30358c2941d5dd628cb1de1973fad8e1fb34ab78 100644 (file)
@@ -170,8 +170,14 @@ main(int argc, char **argv)
        int c, i;
        acl_t acl1, acl2, acl3;
        acl_entry_t ace1;
        int c, i;
        acl_t acl1, acl2, acl3;
        acl_entry_t ace1;
+       char *p;
 
 
-        prog = basename(argv[0]);
+       prog = argv[0];
+       for (p = prog; *p; p++) {
+               if (*p == '/') {
+                       prog = p + 1;
+               }
+       }
 
        while ((c = getopt(argc, argv, "i")) != -1) {
                switch (c) {
 
        while ((c = getopt(argc, argv, "i")) != -1) {
                switch (c) {
index 17359fdf038467d76545b4e4eacf3a68beb2fecd..86e17628ca7075a3a22cc9ea5ced5b24a87cbe79 100644 (file)
  * filesystem allocation, and must equal 512.  Length units given to bio
  * routines are in BB's.
  */
  * filesystem allocation, and must equal 512.  Length units given to bio
  * routines are in BB's.
  */
+
+/* Assume that if we have BTOBB, then we have the rest */
+#ifndef BTOBB
 #define BBSHIFT         9
 #define BBSIZE          (1<<BBSHIFT)
 #define BBMASK          (BBSIZE-1)
 #define BTOBB(bytes)    (((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)
 #define BTOBBT(bytes)   ((__u64)(bytes) >> BBSHIFT)
 #define BBTOB(bbs)      ((bbs) << BBSHIFT)
 #define BBSHIFT         9
 #define BBSIZE          (1<<BBSHIFT)
 #define BBMASK          (BBSIZE-1)
 #define BTOBB(bytes)    (((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)
 #define BTOBBT(bytes)   ((__u64)(bytes) >> BBSHIFT)
 #define BBTOB(bbs)      ((bbs) << BBSHIFT)
-#define OFFTOBB(bytes)  (((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)
 #define OFFTOBBT(bytes) ((__u64)(bytes) >> BBSHIFT)
 #define OFFTOBBT(bytes) ((__u64)(bytes) >> BBSHIFT)
-#define BBTOOFF(bbs)    ((__u64)(bbs) << BBSHIFT)
 
 #define SEEKLIMIT32     0x7fffffff
 #define BBSEEKLIMIT32   BTOBBT(SEEKLIMIT32)
 #define SEEKLIMIT       0x7fffffffffffffffLL
 #define BBSEEKLIMIT     OFFTOBBT(SEEKLIMIT)
 
 #define SEEKLIMIT32     0x7fffffff
 #define BBSEEKLIMIT32   BTOBBT(SEEKLIMIT32)
 #define SEEKLIMIT       0x7fffffffffffffffLL
 #define BBSEEKLIMIT     OFFTOBBT(SEEKLIMIT)
+#endif
+
+#ifndef OFFTOBB
+#define OFFTOBB(bytes)  (((__u64)(bytes) + BBSIZE - 1) >> BBSHIFT)
+#define BBTOOFF(bbs)    ((__u64)(bbs) << BBSHIFT)
+#endif
 
 #define        FSBTOBB(f)      (OFFTOBBT(FSBTOOFF(f)))
 #define        BBTOFSB(b)      (OFFTOFSB(BBTOOFF(b)))
 
 #define        FSBTOBB(f)      (OFFTOBBT(FSBTOOFF(f)))
 #define        BBTOFSB(b)      (OFFTOFSB(BBTOOFF(b)))
@@ -85,40 +92,53 @@ char                *filename;
 /* params are in bytes */
 void map(off64_t off, off64_t len)
 {
 /* params are in bytes */
 void map(off64_t off, off64_t len)
 {
-    struct getbmap     bm[2]={{0}};
+    struct getbmap     bm[2];
     
     
+    bzero(bm, sizeof(bm));
+
     bm[0].bmv_count = 2;
     bm[0].bmv_offset = OFFTOBB(off);
     if (len==(off64_t)-1) { /* unsigned... */
         bm[0].bmv_length = -1;
         printf("    MAP off=%lld, len=%lld [%lld-]\n", 
     bm[0].bmv_count = 2;
     bm[0].bmv_offset = OFFTOBB(off);
     if (len==(off64_t)-1) { /* unsigned... */
         bm[0].bmv_length = -1;
         printf("    MAP off=%lld, len=%lld [%lld-]\n", 
-                (__s64)off, (__s64)len,
-                (__s64)BBTOFSB(bm[0].bmv_offset));
+                (long long)off, (long long)len,
+                (long long)BBTOFSB(bm[0].bmv_offset));
     } else {
         bm[0].bmv_length = OFFTOBB(len);
         printf("    MAP off=%lld, len=%lld [%lld,%lld]\n", 
     } else {
         bm[0].bmv_length = OFFTOBB(len);
         printf("    MAP off=%lld, len=%lld [%lld,%lld]\n", 
-                (__s64)off, (__s64)len,
-                (__s64)BBTOFSB(bm[0].bmv_offset),
-                (__s64)BBTOFSB(bm[0].bmv_length));
+                (long long)off, (long long)len,
+                (long long)BBTOFSB(bm[0].bmv_offset),
+                (long long)BBTOFSB(bm[0].bmv_length));
     }
     
     printf("        [ofs,count]: start..end\n");
     for (;;) {
     }
     
     printf("        [ofs,count]: start..end\n");
     for (;;) {
+#ifdef XFS_IOC_GETBMAP
            if (xfsctl(filename, fd, XFS_IOC_GETBMAP, bm) < 0) {
            if (xfsctl(filename, fd, XFS_IOC_GETBMAP, bm) < 0) {
+#else
+#ifdef F_GETBMAP
+           if (fcntl(fd, F_GETBMAP, bm) < 0) {
+#else
+bozo!
+#endif
+#endif
                    perror("getbmap");
                    break;
            }
                    perror("getbmap");
                    break;
            }
+
            if (bm[0].bmv_entries == 0)
                    break;
            if (bm[0].bmv_entries == 0)
                    break;
+
            printf("        [%lld,%lld]: ",
            printf("        [%lld,%lld]: ",
-                   (__s64)BBTOFSB(bm[1].bmv_offset),
-                   (__s64)BBTOFSB(bm[1].bmv_length));
+                   (long long)BBTOFSB(bm[1].bmv_offset),
+                   (long long)BBTOFSB(bm[1].bmv_length));
+
            if (bm[1].bmv_block == -1)
                    printf("hole");
            else
                    printf("%lld..%lld",
            if (bm[1].bmv_block == -1)
                    printf("hole");
            else
                    printf("%lld..%lld",
-                           (__s64)BBTOFSB(bm[1].bmv_block),
-                           (__s64)BBTOFSB(bm[1].bmv_block +
+                           (long long)BBTOFSB(bm[1].bmv_block),
+                           (long long)BBTOFSB(bm[1].bmv_block +
                                    bm[1].bmv_length - 1));
            printf("\n");
     }
                                    bm[1].bmv_length - 1));
            printf("\n");
     }
@@ -136,11 +156,30 @@ main(int argc, char **argv)
        char            line[1024];
        off64_t         off;
        int             oflags;
        char            line[1024];
        off64_t         off;
        int             oflags;
-       static char     *opnames[] =
-               { "freesp", "allocsp", "unresvsp", "resvsp" };
+       static char     *opnames[] = { "freesp",
+                                      "allocsp",
+                                      "unresvsp",
+                                      "resvsp" };
        int             opno;
        int             opno;
-       static int      optab[] =
-               { XFS_IOC_FREESP64, XFS_IOC_ALLOCSP64, XFS_IOC_UNRESVSP64, XFS_IOC_RESVSP64 };
+
+       /* Assume that if we have FREESP64 then we have the rest */
+#ifdef XFS_IOC_FREESP64
+#define USE_XFSCTL
+       static int      optab[] = { XFS_IOC_FREESP64,
+                                   XFS_IOC_ALLOCSP64,
+                                   XFS_IOC_UNRESVSP64,
+                                   XFS_IOC_RESVSP64 };
+#else
+#ifdef F_FREESP64
+#define USE_FCNTL
+       static int      optab[] = { F_FREESP64,
+                                   F_ALLOCSP64,
+                                   F_UNRESVSP64,
+                                   F_RESVSP64 };
+#else
+bozo!
+#endif
+#endif
        int             rflag = 0;
        struct statvfs64        svfs;
        int             tflag = 0;
        int             rflag = 0;
        struct statvfs64        svfs;
        int             tflag = 0;
@@ -219,17 +258,43 @@ main(int argc, char **argv)
        if (rflag) {
                struct fsxattr a;
 
        if (rflag) {
                struct fsxattr a;
 
+#ifdef XFS_IOC_FSGETXATTR
                if (xfsctl(filename, fd, XFS_IOC_FSGETXATTR, &a) < 0) {
                        perror("XFS_IOC_FSGETXATTR");
                        status = 1;
                        goto done;
                }
                if (xfsctl(filename, fd, XFS_IOC_FSGETXATTR, &a) < 0) {
                        perror("XFS_IOC_FSGETXATTR");
                        status = 1;
                        goto done;
                }
+#else
+#ifdef F_FSGETXATTR
+               if (fcntl(fd, F_FSGETXATTR, &a) < 0) {
+                       perror("F_FSGETXATTR");
+                       status = 1;
+                       goto done;
+               }
+#else
+bozo!
+#endif
+#endif
+
                a.fsx_xflags |= XFS_XFLAG_REALTIME;
                a.fsx_xflags |= XFS_XFLAG_REALTIME;
+
+#ifdef XFS_IOC_FSSETXATTR
                if (xfsctl(filename, fd, XFS_IOC_FSSETXATTR, &a) < 0) {
                        perror("XFS_IOC_FSSETXATTR");
                        status = 1;
                        goto done;
                }
                if (xfsctl(filename, fd, XFS_IOC_FSSETXATTR, &a) < 0) {
                        perror("XFS_IOC_FSSETXATTR");
                        status = 1;
                        goto done;
                }
+#else
+#ifdef F_FSSETXATTR
+               if (fcntl(fd, F_FSSETXATTR, &a) < 0) {
+                       perror("F_FSSETXATTR");
+                       status = 1;
+                       goto done;
+               }
+#else
+bozo!
+#endif
+#endif
        }
        while (!done) {
                 char *p;
        }
        while (!done) {
                 char *p;
@@ -269,10 +334,18 @@ main(int argc, char **argv)
                                len = v;
                         
                         printf("    CMD %s, off=%lld, len=%lld\n", 
                                len = v;
                         
                         printf("    CMD %s, off=%lld, len=%lld\n", 
-                                opnames[opno], (__s64)off, (__s64)len);
+                                opnames[opno], (long long)off, (long long)len);
                         
                        f.l_len = len;
                         
                        f.l_len = len;
+#ifdef USE_XFSCTL
                        c = xfsctl(filename, fd, optab[opno], &f);
                        c = xfsctl(filename, fd, optab[opno], &f);
+#else
+#ifdef USE_FCNTL
+                       c = fcntl(fd, optab[opno], &f);
+#else
+bozo!
+#endif
+#endif
                        if (c < 0) {
                                perror(opnames[opno]);
                                break;
                        if (c < 0) {
                                perror(opnames[opno]);
                                break;
@@ -307,7 +380,7 @@ main(int argc, char **argv)
                                off = FSBTOOFF(v);
                        else
                                off = v;
                                off = FSBTOOFF(v);
                        else
                                off = v;
-                        printf("    TRUNCATE off=%lld\n", (__s64)off);
+                        printf("    TRUNCATE off=%lld\n", (long long)off);
                        if (ftruncate64(fd, off) < 0) {
                                perror("ftruncate");
                                break;
                        if (ftruncate64(fd, off) < 0) {
                                perror("ftruncate");
                                break;
index f8939c76756539f728b6f7d264b257595dffb13f..6f8c669b2bfa5e58a6c9b53eca548ac2646f9bb3 100644 (file)
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
 #include <xfs/jdm.h>
 
 void
 #include <xfs/jdm.h>
 
 void
@@ -49,10 +49,10 @@ void
 printbstat(xfs_bstat_t *sp)
 {
        printf("ino %lld mode %#o nlink %d uid %d gid %d rdev %#x\n",
 printbstat(xfs_bstat_t *sp)
 {
        printf("ino %lld mode %#o nlink %d uid %d gid %d rdev %#x\n",
-               sp->bs_ino, sp->bs_mode, sp->bs_nlink,
+               (long long)sp->bs_ino, sp->bs_mode, sp->bs_nlink,
                sp->bs_uid, sp->bs_gid, sp->bs_rdev);
        printf("\tblksize %d size %lld blocks %lld xflags %#x extsize %d\n",
                sp->bs_uid, sp->bs_gid, sp->bs_rdev);
        printf("\tblksize %d size %lld blocks %lld xflags %#x extsize %d\n",
-               sp->bs_blksize, sp->bs_size, sp->bs_blocks,
+               sp->bs_blksize, (long long)sp->bs_size, (long long)sp->bs_blocks,
                sp->bs_xflags, sp->bs_extsize);
        dotime(&sp->bs_atime, "atime");
        dotime(&sp->bs_mtime, "mtime");
                sp->bs_xflags, sp->bs_extsize);
        dotime(&sp->bs_atime, "atime");
        dotime(&sp->bs_mtime, "mtime");
@@ -67,10 +67,10 @@ void
 printstat(struct stat64 *sp)
 {
        printf("ino %lld mode %#o nlink %d uid %d gid %d rdev %#x\n",
 printstat(struct stat64 *sp)
 {
        printf("ino %lld mode %#o nlink %d uid %d gid %d rdev %#x\n",
-               (xfs_ino_t)sp->st_ino, sp->st_mode, sp->st_nlink,
-               sp->st_uid, sp->st_gid, (unsigned int)sp->st_rdev);
+               (long long)sp->st_ino, (unsigned int)sp->st_mode, (int)sp->st_nlink,
+               (int)sp->st_uid, (int)sp->st_gid, (int)sp->st_rdev);
        printf("\tblksize %llu size %lld blocks %lld\n",
        printf("\tblksize %llu size %lld blocks %lld\n",
-               (__uint64_t)sp->st_blksize, sp->st_size, sp->st_blocks);
+               (unsigned long long)sp->st_blksize, (long long)sp->st_size, (long long)sp->st_blocks);
        dotime(&sp->st_atime, "atime");
        dotime(&sp->st_mtime, "mtime");
        dotime(&sp->st_ctime, "ctime");
        dotime(&sp->st_atime, "atime");
        dotime(&sp->st_mtime, "mtime");
        dotime(&sp->st_ctime, "ctime");
@@ -162,7 +162,7 @@ main(int argc, char **argv)
 
        if (verbose)
                printf(
 
        if (verbose)
                printf(
-                 "XFS_IOC_FSBULKSTAT test: last=%lld nent=%d\n", last, nent);
+                 "XFS_IOC_FSBULKSTAT test: last=%lld nent=%d\n", (long long)last, nent);
 
        bulkreq.lastip  = &last;
        bulkreq.icount  = nent;
 
        bulkreq.lastip  = &last;
        bulkreq.icount  = nent;
@@ -175,7 +175,7 @@ main(int argc, char **argv)
                if (verbose)
                        printf(
            "XFS_IOC_FSBULKSTAT test: last=%lld ret=%d count=%d total=%d\n", 
                if (verbose)
                        printf(
            "XFS_IOC_FSBULKSTAT test: last=%lld ret=%d count=%d total=%d\n", 
-                                               last, ret, count, total);
+                                               (long long)last, ret, count, total);
                if (count == 0)
                        exit(0);
 
                if (count == 0)
                        exit(0);
 
@@ -202,14 +202,14 @@ main(int argc, char **argv)
                                        if (verbose && nread > 0)
                                                printf(
                                                 "readlink: ino %lld: <%*s>\n",
                                        if (verbose && nread > 0)
                                                printf(
                                                 "readlink: ino %lld: <%*s>\n",
-                                                           t[i].bs_ino,
+                                                           (long long)t[i].bs_ino,
                                                            nread,
                                                            cc_readlinkbufp);
                                        free(cc_readlinkbufp);
                                        if ( nread < 0 ) {
                                                printf(
                                              "could not read symlink ino %llu\n",
                                                            nread,
                                                            cc_readlinkbufp);
                                        free(cc_readlinkbufp);
                                        if ( nread < 0 ) {
                                                printf(
                                              "could not read symlink ino %llu\n",
-                                                     t[i].bs_ino );
+                                                     (unsigned long long)t[i].bs_ino );
                                                printbstat(&t[i]);
                                        }
                                        break;
                                                printbstat(&t[i]);
                                        }
                                        break;
@@ -226,13 +226,13 @@ main(int argc, char **argv)
                                        if (fd < 0) {
                                                printf(
                                        "unable to open handle ino %lld: %s\n",
                                        if (fd < 0) {
                                                printf(
                                        "unable to open handle ino %lld: %s\n",
-                                                 t[i].bs_ino, strerror(errno));
+                                                 (long long)t[i].bs_ino, strerror(errno));
                                                continue;
                                        }
                                        if (fstat64(fd, &sb) < 0) {
                                                printf(
                                        "unable to stat ino %lld: %s\n",
                                                continue;
                                        }
                                        if (fstat64(fd, &sb) < 0) {
                                                printf(
                                        "unable to stat ino %lld: %s\n",
-                                                 t[i].bs_ino, strerror(errno));
+                                                 (long long)t[i].bs_ino, strerror(errno));
                                        }
                                        close(fd);
 
                                        }
                                        close(fd);
 
@@ -272,7 +272,7 @@ main(int argc, char **argv)
        if (verbose)
                printf(
            "XFS_IOC_FSBULKSTAT test: last=%lld nent=%d ret=%d count=%d\n", 
        if (verbose)
                printf(
            "XFS_IOC_FSBULKSTAT test: last=%lld nent=%d ret=%d count=%d\n", 
-                                              last, nent, ret, count);
+                                              (long long)last, nent, ret, count);
 
        return 1;
 }
 
        return 1;
 }
index ecd671a3b759795068cb7599445b458963dd6b74..ebd0e8564b1a8143702f3eaea2a330748a446d94 100644 (file)
  */
  
 #include "global.h"
  */
  
 #include "global.h"
+
+#ifdef HAVE_GDBM_NDBM_H
 #include <gdbm/ndbm.h>
 #include <gdbm/ndbm.h>
+#else
+#ifdef HAVE_GDBM_H
+#include <gdbm.h>
+#else
+#ifdef HAVE_NDBM_H
+#include <ndbm.h>
+#else
+bozo!
+#endif
+#endif
+#endif
+
 
 /* #define WorkDir     "/xfs" */
 #define DBNAME "DBtest"
 
 /* #define WorkDir     "/xfs" */
 #define DBNAME "DBtest"
@@ -106,6 +120,7 @@ main(int argc, char *argv[])
        printf("\tperforming lookups for %d iterations...\n", loops);
        if (randseed)
                printf("\tusing %d as seed for srandom()...\n\n", randseed);
        printf("\tperforming lookups for %d iterations...\n", loops);
        if (randseed)
                printf("\tusing %d as seed for srandom()...\n\n", randseed);
+       fflush(stdout);
        InitDbmLookup(numrecs);
        printf("\t\nThere were %d duplicate checksums generated\n", Dups);
        for (l=0; l<loops; l++) {
        InitDbmLookup(numrecs);
        printf("\t\nThere were %d duplicate checksums generated\n", Dups);
        for (l=0; l<loops; l++) {
@@ -117,6 +132,7 @@ main(int argc, char *argv[])
        }
        printf("\nCleaning up database...\n");
        printf("\t\nThere were %d duplicate checksums generated\n", Dups);
        }
        printf("\nCleaning up database...\n");
        printf("\t\nThere were %d duplicate checksums generated\n", Dups);
+       fflush(stdout);
        CleanupDbmLookup();
        if (debugflg)
                for (l=0; l<Dups; l++) {
        CleanupDbmLookup();
        if (debugflg)
                for (l=0; l<Dups; l++) {
@@ -136,7 +152,11 @@ int InitDbmLookup(int howmany)
        int     i, rc;
        myDB    dbRec;
 
        int     i, rc;
        myDB    dbRec;
 
-       sprintf(filename, "%s-%d", DBNAME, getpid());
+       sprintf(filename, "%s-%d", DBNAME, (int)getpid());
+       if (debugflg) {
+               printf("dbm_open(%s, O_WRONLY|O_CREAT, 0644)\n", filename);
+               fflush(stdout);
+       }
        dbm = dbm_open(filename, O_WRONLY|O_CREAT, 0644);
        if(dbm == NULL) DoSysError("\ndbm_open", (int)dbm);
 
        dbm = dbm_open(filename, O_WRONLY|O_CREAT, 0644);
        if(dbm == NULL) DoSysError("\ndbm_open", (int)dbm);
 
@@ -152,8 +172,10 @@ int InitDbmLookup(int howmany)
 
                if ( creatDbRec(&dbRec) )
                        DoSysError("\ncreatDbRec", -1);
 
                if ( creatDbRec(&dbRec) )
                        DoSysError("\ncreatDbRec", -1);
-               if (debugflg)
+               if (debugflg) {
                        printf("created rec #%-7d\t%x\r", i+1, dbRec.checksum);
                        printf("created rec #%-7d\t%x\r", i+1, dbRec.checksum);
+                       fflush(stdout);
+               }
 
                if (InsertKey(KeyArray, keyIdx, dbRec.checksum))
                        keyIdx++;
 
                if (InsertKey(KeyArray, keyIdx, dbRec.checksum))
                        keyIdx++;
@@ -162,7 +184,12 @@ int InitDbmLookup(int howmany)
                key.dsize = sizeof(dbRec.checksum);
                content.dptr = (char *)&dbRec;
                content.dsize = sizeof(dbRec);
                key.dsize = sizeof(dbRec.checksum);
                content.dptr = (char *)&dbRec;
                content.dsize = sizeof(dbRec);
-write(2, NULL, 0);
+
+               write(2, NULL, 0);
+
+               if (debugflg) {
+                       printf("dbm_store(dbm, key, content, DBM_INSERT)\n");
+               }
                rc = dbm_store(dbm, key, content, DBM_INSERT);
                if (rc < 0)
                        DoSysError("\ndbm_store", rc);
                rc = dbm_store(dbm, key, content, DBM_INSERT);
                if (rc < 0)
                        DoSysError("\ndbm_store", rc);
@@ -172,7 +199,15 @@ write(2, NULL, 0);
                }
        }
        numDbmEntries = i;
                }
        }
        numDbmEntries = i;
+       if (debugflg) {
+               printf("dbm_close(dbm)\n");
+               fflush(stdout);
+       }
        dbm_close(dbm); /* close to eliminate chance of in-memory caching */
        dbm_close(dbm); /* close to eliminate chance of in-memory caching */
+       if (debugflg) {
+               printf("dbm_open(%s, O_RDNLY, 0)\n", filename);
+               fflush(stdout);
+       }
        dbm = dbm_open(filename, O_RDONLY, 0);
        if(dbm == NULL) DoSysError("\ndbm_open", (int)dbm);
        return 0;
        dbm = dbm_open(filename, O_RDONLY, 0);
        if(dbm == NULL) DoSysError("\ndbm_open", (int)dbm);
        return 0;
@@ -186,11 +221,16 @@ int DoDbmLookup(void)
        unsigned tmpck;
 
        printf("\n\tSequential lookups...\n");
        unsigned tmpck;
 
        printf("\n\tSequential lookups...\n");
+       fflush(stdout);
        for(i=0, j=0; i<numDbmEntries; i++) {
                key.dptr = (char *)(KeyArray+j);
                key.dsize = sizeof(KeyArray[0]);
 
 write(2, NULL, 0);
        for(i=0, j=0; i<numDbmEntries; i++) {
                key.dptr = (char *)(KeyArray+j);
                key.dsize = sizeof(KeyArray[0]);
 
 write(2, NULL, 0);
+               if (debugflg) {
+                       printf("dbm_fetch(dbm, key = %d)\n", j);
+                       fflush(stdout);
+               }
                content = dbm_fetch(dbm, key);
                dbp = (myDB *)content.dptr;
                if ( !content.dptr ) {
                content = dbm_fetch(dbm, key);
                dbp = (myDB *)content.dptr;
                if ( !content.dptr ) {
@@ -207,12 +247,15 @@ write(2, NULL, 0);
                        assert( dbp );
                }
 
                        assert( dbp );
                }
 
-               if (debugflg && dbp)
+               if (debugflg && dbp) {
                        printf("Seq rec #%-6d: checksum %4x (%4x)\r", i,
                                dbp->checksum, KeyArray[j]);
                        printf("Seq rec #%-6d: checksum %4x (%4x)\r", i,
                                dbp->checksum, KeyArray[j]);
+                       fflush(stdout);
+               }
 
                if (content.dsize == 0) {
                        printf("\nrec #%-8d: key = %4x (%d)\n", i, KeyArray[j], j);
 
                if (content.dsize == 0) {
                        printf("\nrec #%-8d: key = %4x (%d)\n", i, KeyArray[j], j);
+                       fflush(stdout);
                        DoSysError("\ndbm_fetch", content.dsize);
                }
                if (dbp->checksum != KeyArray[j])
                        DoSysError("\ndbm_fetch", content.dsize);
                }
                if (dbp->checksum != KeyArray[j])
@@ -223,10 +266,15 @@ write(2, NULL, 0);
                        j = 0;
        }
        printf("\n\n\tRandom lookups...\n");
                        j = 0;
        }
        printf("\n\n\tRandom lookups...\n");
+       fflush(stdout);
        for(i=0; i<numDbmEntries; i++) {
                n = random() % keyIdx;
                key.dptr = (char *)(KeyArray+n);
                key.dsize = sizeof(KeyArray[0]);
        for(i=0; i<numDbmEntries; i++) {
                n = random() % keyIdx;
                key.dptr = (char *)(KeyArray+n);
                key.dsize = sizeof(KeyArray[0]);
+               if (debugflg) {
+                       printf("dbm_fetch(dbm, key = %d)\n", n);
+                       fflush(stdout);
+               }
                content = dbm_fetch(dbm, key);
                dbp = (myDB *)content.dptr;
                if ( !content.dptr ) {
                content = dbm_fetch(dbm, key);
                dbp = (myDB *)content.dptr;
                if ( !content.dptr ) {
@@ -242,9 +290,11 @@ write(2, NULL, 0);
                        assert( dbp );
                }
 
                        assert( dbp );
                }
 
-               if (debugflg && dbp)
+               if (debugflg && dbp) {
                        printf("Rnd rec #%-6d: checksum %4x (%4x)\r", i,
                                dbp->checksum, KeyArray[n]);
                        printf("Rnd rec #%-6d: checksum %4x (%4x)\r", i,
                                dbp->checksum, KeyArray[n]);
+                       fflush(stdout);
+               }
 
                if (content.dsize == 0)
                        DoSysError("\ndbm_fetch", content.dsize);
 
                if (content.dsize == 0)
                        DoSysError("\ndbm_fetch", content.dsize);
@@ -261,11 +311,15 @@ void CleanupDbmLookup(void)
        char filename[100];
        int rc;
 
        char filename[100];
        int rc;
 
+       if (debugflg) {
+               printf("dbm_close(dbm)\n");
+               fflush(stdout);
+       }
        dbm_close(dbm);
        dbm_close(dbm);
-       sprintf(filename, "%s-%d.dir", DBNAME, getpid());
+       sprintf(filename, "%s-%d.dir", DBNAME, (int)getpid());
        rc = unlink(filename);
        if (rc) DoSysError("\nunlink", rc);
        rc = unlink(filename);
        if (rc) DoSysError("\nunlink", rc);
-       sprintf(filename, "%s-%d.pag", DBNAME, getpid());
+       sprintf(filename, "%s-%d.pag", DBNAME, (int)getpid());
        rc = unlink(filename);
        if (rc) DoSysError("\nunlink", rc);
 }
        rc = unlink(filename);
        if (rc) DoSysError("\nunlink", rc);
 }
index 920290a85fca32e661dff248c5881c27cc645539..8bd92b7f35b53999f77adad644f63eecaafac2e2 100644 (file)
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
 
 int
 main(int argc, char **argv)
 
 int
 main(int argc, char **argv)
@@ -97,7 +97,7 @@ main(int argc, char **argv)
        if ((lseek64(fd, offset, SEEK_SET)) < 0) {
                fprintf(stderr, "%s: error seeking to offset %llu "
                                        "on \"%s\": %s\n",
        if ((lseek64(fd, offset, SEEK_SET)) < 0) {
                fprintf(stderr, "%s: error seeking to offset %llu "
                                        "on \"%s\": %s\n",
-                       progname, offset, path, strerror(errno));
+                       progname, (unsigned long long)offset, path, strerror(errno));
                exit(1);
        }
 
                exit(1);
        }
 
index 7a88cde304216052ce01c93982977c988f96ffbb..35ebb6077f3f920e092a9854366e8ade4d55b83a 100644 (file)
@@ -45,7 +45,7 @@ int checkflag=0;
 
 #define MKNOD_DEV 0
 
 
 #define MKNOD_DEV 0
 
-static int dirstress(char *dirname, int        dirnum, int nfiles, int keep);
+static int dirstress(char *dirname, int        dirnum, int nfiles, int keep, int nprocs_per_dir);
 static int create_entries(int nfiles);
 static int scramble_entries(int        nfiles);
 static int remove_entries(int nfiles);
 static int create_entries(int nfiles);
 static int scramble_entries(int        nfiles);
 static int remove_entries(int nfiles);
@@ -130,8 +130,8 @@ main(
                         pid=getpid();
                         
                         if (verbose) fprintf(stderr,"** [%d] forked\n", pid);
                         pid=getpid();
                         
                         if (verbose) fprintf(stderr,"** [%d] forked\n", pid);
-                       r=dirstress(dirname, i / nprocs_per_dir, nfiles, keep);
-                        if (verbose) fprintf(stderr,"** [%d] exit\n", pid);
+                       r=dirstress(dirname, i / nprocs_per_dir, nfiles, keep, nprocs_per_dir);
+                        if (verbose) fprintf(stderr,"** [%d] exit %d\n", pid, r);
                        exit(r);
                }
        }
                        exit(r);
                }
        }
@@ -143,7 +143,7 @@ main(
             istatus+=status/256;
         
        printf("INFO: Dirstress complete\n");
             istatus+=status/256;
         
        printf("INFO: Dirstress complete\n");
-        if (verbose) fprintf(stderr,"** [%d] exit %d\n", pid, istatus);
+        if (verbose) fprintf(stderr,"** [%d] parent exit %d\n", pid, istatus);
        return istatus;
 }
 
        return istatus;
 }
 
@@ -154,7 +154,8 @@ dirstress(
        char    *dirname,
        int     dirnum,
        int     nfiles,
        char    *dirname,
        int     dirnum,
        int     nfiles,
-       int     keep)
+       int     keep,
+       int     nprocs_per_dir)
 {
        int             error;
        char            buf[1024];
 {
        int             error;
        char            buf[1024];
@@ -216,6 +217,11 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
        error = chdir("..");
        if (error) {
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
        error = chdir("..");
        if (error) {
+               /* If this is multithreaded, then expecting a ENOENT here is fine */
+               if (nprocs_per_dir > 1 && errno == ENOENT) {
+                       return 0;
+               }
+
                perror("Cannot chdir out of pid directory");
                return 1;
        }
                perror("Cannot chdir out of pid directory");
                return 1;
        }
@@ -232,6 +238,11 @@ dirstress(
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
        error = chdir("..");
        if (error) {
         if (verbose) fprintf(stderr,"** [%d] chdir ..\n", pid);
        error = chdir("..");
        if (error) {
+               /* If this is multithreaded, then expecting a ENOENT here is fine */
+               if (nprocs_per_dir > 1 && errno == ENOENT) {
+                       return 0;
+               }
+
                perror("Cannot chdir out of working directory");
                return 1;
        }
                perror("Cannot chdir out of working directory");
                return 1;
        }
index bfeb0a8b00cb011f8cb0c1f068321f9d56259918..8be21768eae9fcc18b1619cdebf7b28d47b7f436 100644 (file)
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
 
 void expect_error(int r, int err)
 {
 
 void expect_error(int r, int err)
 {
@@ -57,15 +57,33 @@ main(int argc, char **argv)
     }
 
     fsfd = open(argv[1], O_RDONLY);
     }
 
     fsfd = open(argv[1], O_RDONLY);
+
     if (fsfd < 0) {
        perror("open");
        exit(1);
     }
     
     printf("--- xfsctl with bad output address\n");
     if (fsfd < 0) {
        perror("open");
        exit(1);
     }
     
     printf("--- xfsctl with bad output address\n");
+#ifdef XFS_IOC_FSCOUNTS
     expect_error(xfsctl(argv[1], fsfd, XFS_IOC_FSCOUNTS, NULL), EFAULT);
     expect_error(xfsctl(argv[1], fsfd, XFS_IOC_FSCOUNTS, NULL), EFAULT);
+#else
+#ifdef XFS_FS_COUNTS
+    expect_error(syssgi(SGI_XFS_FSOPERATIONS, fsfd, XFS_FS_COUNTS, NULL, NULL), EFAULT);
+#else
+bozo!
+#endif
+#endif
+
     printf("--- xfsctl with bad input address\n");
     printf("--- xfsctl with bad input address\n");
+#ifdef XFS_IOC_SET_RESBLKS
     expect_error(xfsctl(argv[1], fsfd, XFS_IOC_SET_RESBLKS, NULL), EFAULT);
     expect_error(xfsctl(argv[1], fsfd, XFS_IOC_SET_RESBLKS, NULL), EFAULT);
+#else
+#ifdef XFS_SET_RESBLKS
+    expect_error(syssgi(SGI_XFS_FSOPERATIONS, fsfd, XFS_SET_RESBLKS, NULL, NULL), EFAULT);
+#else
+bozo!
+#endif
+#endif
     
     close(fsfd);
     
     
     close(fsfd);
     
index e89f34139562fd50f03556bc6d946a4e1152e7ec..60a0c11ac91efddbde5edb8747744b475b8b53c0 100644 (file)
  *   -w  report bits per long
  */
 
  *   -w  report bits per long
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
+
 #include <sys/quota.h>
 #include <sys/resource.h>
 #include <signal.h>
 #include <sys/quota.h>
 #include <sys/resource.h>
 #include <signal.h>
+
+#ifdef HAVE_XFS_XQM_H
 #include <xfs/xqm.h>
 #include <xfs/xqm.h>
+#endif
+
+#ifndef USRQUOTA
+#define USRQUOTA  0
+#endif
+
+#ifndef GRPQUOTA
+#define GRPQUOTA  1
+#endif
 
 int verbose = 0;
 
 
 int verbose = 0;
 
@@ -75,11 +87,11 @@ int check_big_ID(char *filename)
        }
 
        /* 98789 is greater than 2^16 (65536) */
        }
 
        /* 98789 is greater than 2^16 (65536) */
-       if ((__u32)sbuf.st_uid == 98789 || (__u32)sbuf.st_gid == 98789)
+       if ((__uint32_t)sbuf.st_uid == 98789 || (__uint32_t)sbuf.st_gid == 98789)
                return(0);
        if (verbose)
                fprintf(stderr, "lstat64 on %s gave uid=%d, gid=%d\n",
                return(0);
        if (verbose)
                fprintf(stderr, "lstat64 on %s gave uid=%d, gid=%d\n",
-                       filename, sbuf.st_uid, sbuf.st_gid);
+                       filename, (int)sbuf.st_uid, (int)sbuf.st_gid);
        return(1);
 }
 
        return(1);
 }
 
@@ -104,7 +116,7 @@ int
 hastruncate64(char *filename)
 {
        struct rlimit64 rlimit64;
 hastruncate64(char *filename)
 {
        struct rlimit64 rlimit64;
-       off64_t bigoff = 4294967307;    /* > 2^32 */
+       off64_t bigoff = 4294967307;    /* > 2^32 */
        struct stat64 bigst;
        int fd;
 
        struct stat64 bigst;
        int fd;
 
@@ -131,7 +143,7 @@ hastruncate64(char *filename)
 
        if (verbose)
                fprintf(stderr, "fstat64 on %s gave sz=%lld (truncsz=%lld)\n",
 
        if (verbose)
                fprintf(stderr, "fstat64 on %s gave sz=%lld (truncsz=%lld)\n",
-                       filename, bigst.st_size, bigoff);
+                       filename, (long long)bigst.st_size, (long long)bigoff);
 
        if (bigst.st_size != bigoff)
                return(1);
 
        if (bigst.st_size != bigoff)
                return(1);
@@ -148,7 +160,13 @@ hasxfsquota(int type, int q, char *device)
                return (access("/proc/fs/xfs/xqm", F_OK) < 0);
 
        memset(&qstat, 0, sizeof(fs_quota_stat_t));
                return (access("/proc/fs/xfs/xqm", F_OK) < 0);
 
        memset(&qstat, 0, sizeof(fs_quota_stat_t));
+
+#ifdef QCMD
        qcmd = QCMD(Q_XGETQSTAT, type);
        qcmd = QCMD(Q_XGETQSTAT, type);
+#else
+       qcmd = Q_GETQSTAT;
+#endif
+
        if (quotactl(qcmd, device, 0, (caddr_t)&qstat) < 0) {
                if (verbose)
                        perror("quotactl");
        if (quotactl(qcmd, device, 0, (caddr_t)&qstat) < 0) {
                if (verbose)
                        perror("quotactl");
@@ -250,7 +268,18 @@ main(int argc, char **argv)
                exit(0);
        }
        if (wflag) {
                exit(0);
        }
        if (wflag) {
+#ifdef BITS_PER_LONG
                printf("%d\n", BITS_PER_LONG);
                printf("%d\n", BITS_PER_LONG);
+#else
+#ifdef NBBY
+               /* This can change under IRIX depending on whether we compile
+                * with -n32/-32 or -64
+                */
+               printf("%d\n", (int)(NBBY * sizeof(long)));
+#else
+bozo!
+#endif
+#endif
                exit(0);
        }
 
                exit(0);
        }
 
index 78260d44f5405a7d4c29a6a737ef6200af76f1c1..5dd1c4bbc5b88748e3daa8c6af9bc689cd96e7e6 100644 (file)
@@ -44,7 +44,9 @@
  *   determined.
  */
 
  *   determined.
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
+
+#define constpp char * const *
 
 #define N(x) (sizeof(x)/sizeof(x[0]))
 
 
 #define N(x) (sizeof(x)/sizeof(x[0]))
 
@@ -121,7 +123,13 @@ main(int argc, char **argv)
 
 
     /* defaults */
 
 
     /* defaults */
+
     progname = basename(argv[0]);
     progname = basename(argv[0]);
+    for (p = progname; *p; p++) {
+           if (*p == '/') {
+                   progname = p + 1;
+           }
+    }
     nbytes = 1024 * 1024;
     dlen = 73; /* includes the trailing newline */
 
     nbytes = 1024 * 1024;
     dlen = 73; /* includes the trailing newline */
 
@@ -330,7 +338,7 @@ main(int argc, char **argv)
                dfile, strerror(errno));
        status = 1;
     }
                dfile, strerror(errno));
        status = 1;
     }
-    exit(status);
+    return status;
 }
 
 
 }
 
 
index 8dd52a318d68282df37e9d21cd892994ba97b93b..2e92fd8db9595a8e92ef5a784cd57d09879c0b7c 100644 (file)
@@ -4,10 +4,10 @@
    
    XFS space preallocation changes -- lord@sgi.com, April 2003
  */
    
    XFS space preallocation changes -- lord@sgi.com, April 2003
  */
-#include <dirent.h>
+
+#include "global.h"
+
 #include <sys/mman.h>
 #include <sys/mman.h>
-#include <sys/wait.h>
-#include <xfs/libxfs.h>
 
 /* variables settable on the command line */
 static int loop_count = 100;
 
 /* variables settable on the command line */
 static int loop_count = 100;
@@ -40,7 +40,7 @@ static void *x_malloc(int size)
 /* generate a buffer for a particular child, fnum etc. Just use a simple buffer
    to make debugging easy 
 */
 /* generate a buffer for a particular child, fnum etc. Just use a simple buffer
    to make debugging easy 
 */
-static void gen_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
+static void gen_buffer(char *buf, int loop, int child, int fnum, int ofs)
 {
        uchar v = (loop+child+fnum+(ofs/block_size)) % 256;
        memset(buf, v, block_size);
 {
        uchar v = (loop+child+fnum+(ofs/block_size)) % 256;
        memset(buf, v, block_size);
@@ -51,7 +51,7 @@ static void gen_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
 */
 static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
 {
 */
 static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
 {
-       uchar *buf2;
+       char *buf2;
 
        buf2 = x_malloc(block_size);
 
 
        buf2 = x_malloc(block_size);
 
@@ -87,7 +87,7 @@ static void check_buffer(uchar *buf, int loop, int child, int fnum, int ofs)
  */
 static void create_file(const char *dir, int loop, int child, int fnum)
 {
  */
 static void create_file(const char *dir, int loop, int child, int fnum)
 {
-       uchar *buf;
+       char *buf;
        int size, fd;
        char fname[1024];
 
        int size, fd;
        char fname[1024];
 
@@ -100,16 +100,27 @@ static void create_file(const char *dir, int loop, int child, int fnum)
        }
 
        if (do_prealloc) {
        }
 
        if (do_prealloc) {
-               xfs_flock64_t   resv;
+               struct flock64 resv;
 
                resv.l_whence = 0;
                resv.l_start = 0;
                resv.l_len = file_size;
 
 
                resv.l_whence = 0;
                resv.l_start = 0;
                resv.l_len = file_size;
 
-               if ((xfsctl(fname, fd, XFS_IOC_RESVSP, &resv)) < 0) {
+#ifdef XFS_IOC_RESVSP64
+               if ((xfsctl(fname, fd, XFS_IOC_RESVSP64, &resv)) < 0) {
+                       perror(fname);
+                       exit(1);
+               }
+#else
+#ifdef F_RESVSP64
+               if ((fcntl(fd, F_RESVSP64, &resv)) < 0) {
                        perror(fname);
                        exit(1);
                }
                        perror(fname);
                        exit(1);
                }
+#else
+bozo!
+#endif
+#endif
        }
                
        if (!use_mmap) {
        }
                
        if (!use_mmap) {
index 5120c12c04633b5da58c45b31a2ee5a9bcdccb87..6e8927d8270a55b0f2129f57cbf69bb76ff2eb43 100644 (file)
 #ifndef GLOBAL_H
 #define GLOBAL_H
 
 #ifndef GLOBAL_H
 #define GLOBAL_H
 
-/* xfs-specific includes */
+#include <config.h>
 
 
+#ifdef HAVE_XFS_LIBXFS_H
 #include <xfs/libxfs.h>
 #include <xfs/libxfs.h>
+#endif
+
+#ifdef HAVE_XFS_JDM_H
+#include <xfs/jdm.h>
+#endif
+
+#ifdef HAVE_ATTR_ATTRIBUTES_H
 #include <attr/attributes.h>
 #include <attr/attributes.h>
+#endif
 
 
-/* libc includes */
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
 
 
+#ifdef HAVE_SYS_STATVFS_H
 #include <sys/statvfs.h>
 #include <sys/statvfs.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #include <sys/time.h>
+#endif
+
+#ifdef HAVE_SYS_IOCTL_H
+#include <sys/ioctl.h>
+#endif
+
+#ifdef HAVE_SYS_WAIT_H
 #include <sys/wait.h>
 #include <sys/wait.h>
+#endif
+
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef HAVE_DIRENT_H
 #include <dirent.h>
 #include <dirent.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
 
 
+#ifdef HAVE_SYS_FCNTL_H
+#include <fcntl.h>
 #endif
 #endif
+
+#ifdef HAVE_TIME_H
+#include <sys/time.h>
+#endif
+
+#ifdef HAVE_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#ifdef HAVE_DIRENT_H
+#include <dirent.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#ifdef HAVE_SYS_ATTRIBUTES_H
+#include <sys/attributes.h>
+#endif
+
+#ifdef HAVE_LIBGEN_H
+#include <libgen.h>
+#endif
+
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#endif
+
+#ifdef STDC_HEADERS
+#include <signal.h>
+#endif
+
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+
+#ifdef HAVE_SYS_SYSSGI_H
+#include <sys/syssgi.h>
+#endif
+
+#ifdef HAVE_SYS_UUID_H
+#include <sys/uuid.h>
+#endif
+
+#ifdef HAVE_SYS_FS_XFS_FSOPS_H
+#include <sys/fs/xfs_fsops.h>
+#endif
+
+#ifdef HAVE_SYS_FS_XFS_ITABLE_H
+#include <sys/fs/xfs_itable.h>
+#endif
+
+#ifdef HAVE_BSTRING_H
+#include <bstring.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+#include <sys/param.h>
+#endif
+
+#endif
+
+#ifdef sgi
+#define xfs_flock64 flock64
+#define xfs_flock64_t struct flock64
+
+#define XFS_IOC_DIOINFO                F_DIOINFO                       
+#define XFS_IOC_FSGETXATTR             F_FSGETXATTR                   
+#define XFS_IOC_FSSETXATTR             F_FSSETXATTR                    
+#define XFS_IOC_ALLOCSP64              F_ALLOCSP64                    
+#define XFS_IOC_FREESP64               F_FREESP64                 
+#define XFS_IOC_GETBMAP                F_GETBMAP                 
+#define XFS_IOC_FSSETDM                F_FSSETDM                 
+#define XFS_IOC_RESVSP                 F_RESVSP                 
+#define XFS_IOC_UNRESVSP               F_UNRESVSP                 
+#define XFS_IOC_RESVSP64               F_RESVSP64                 
+#define XFS_IOC_UNRESVSP64             F_UNRESVSP64                 
+#define        XFS_IOC_GETBMAPA               F_GETBMAPA                 
+#define        XFS_IOC_FSGETXATTRA            F_FSGETXATTRA                         
+#define        XFS_IOC_GETBMAPX               F_GETBMAPX
+                   
+#define XFS_IOC_FSGEOMETRY_V1          XFS_FS_GEOMETRY_V1          
+#define XFS_IOC_FSBULKSTAT             SGI_FS_BULKSTAT     
+#define XFS_IOC_FSBULKSTAT_SINGLE      SGI_FS_BULKSTAT_SINGLE
+#define XFS_IOC_FSINUMBERS             /* TODO */
+#define XFS_IOC_PATH_TO_FSHANDLE       /* TODO */                       
+#define XFS_IOC_PATH_TO_HANDLE         /* TODO */                     
+#define XFS_IOC_FD_TO_HANDLE           /* TODO */
+#define XFS_IOC_OPEN_BY_HANDLE         /* TODO */
+#define XFS_IOC_READLINK_BY_HANDLE     /* TODO */
+#define XFS_IOC_SWAPEXT                /* TODO */
+#define XFS_IOC_FSGROWFSDATA           XFS_GROWFS_DATA      
+#define XFS_IOC_FSGROWFSLOG            XFS_GROWFS_LOG      
+#define XFS_IOC_FSGROWFSRT             XFS_GROWFS_RT      
+#define XFS_IOC_FSCOUNTS               XFS_FS_COUNTS      
+#define XFS_IOC_SET_RESBLKS            XFS_SET_RESBLKS      
+#define XFS_IOC_GET_RESBLKS            XFS_GET_RESBLKS      
+#define XFS_IOC_ERROR_INJECTION        SGI_XFS_INJECT_ERROR
+#define XFS_IOC_ERROR_CLEARALL         SGI_XFS_CLEARALL_ERROR
+#define XFS_IOC_FREEZE                 XFS_FS_FREEZE      
+#define XFS_IOC_THAW                   XFS_FS_THAW      
+#define XFS_IOC_FSSETDM_BY_HANDLE      /* TODO */    
+#define XFS_IOC_ATTRLIST_BY_HANDLE     /* TODO */      
+#define XFS_IOC_ATTRMULTI_BY_HANDLE    /* TODO */      
+#define XFS_IOC_FSGEOMETRY             XFS_FS_GEOMETRY      
+#define XFS_IOC_GOINGDOWN              XFS_FS_GOINGDOWN
+
+typedef struct xfs_error_injection {
+        __int32_t           fd;
+        __int32_t           errtag;
+} xfs_error_injection_t;
+
+
+typedef struct xfs_fsop_bulkreq {
+        ino64_t             *lastip;      
+        __int32_t           icount;   
+        xfs_bstat_t         *ubuffer;      
+        __int32_t           *ocount;       
+} xfs_fsop_bulkreq_t;
+
+static __inline__ int 
+xfsctl(char* path, int fd, int cmd, void* arg) {
+  if (cmd >= 0 && cmd < XFS_FSOPS_COUNT)
+    return syssgi(SGI_XFS_FSOPERATIONS, fd, cmd, (void*)0, arg);
+  else if (cmd == SGI_FS_BULKSTAT)
+    return syssgi(SGI_FS_BULKSTAT, fd, 
+                 ((xfs_fsop_bulkreq_t*)arg)->lastip,
+                 ((xfs_fsop_bulkreq_t*)arg)->icount,
+                 ((xfs_fsop_bulkreq_t*)arg)->ubuffer);
+  else if (cmd == SGI_FS_BULKSTAT_SINGLE)
+    return syssgi(SGI_FS_BULKSTAT_SINGLE, fd, 
+                 ((xfs_fsop_bulkreq_t*)arg)->lastip,
+                 ((xfs_fsop_bulkreq_t*)arg)->ubuffer);
+  else if (cmd == SGI_XFS_INJECT_ERROR)
+    return syssgi(SGI_XFS_INJECT_ERROR,
+                 ((xfs_error_injection_t*)arg)->errtag, fd);
+  else if (cmd == SGI_XFS_CLEARALL_ERROR)
+    return syssgi(SGI_XFS_CLEARALL_ERROR, fd);
+  else
+    return fcntl(fd, cmd, arg);
+}
+
+#endif /* sgi */                           
index 963efcf43717735dd815a8eccbb0e52f23657684..0f15b44903594693877f5ed5c3e6f32259c98360 100644 (file)
@@ -30,7 +30,7 @@
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
  */
 
-#include <xfs/libxfs.h>
+#include "global.h"
 
 /* These should be in libxfs.h */
 #ifndef XFS_IOC_GOINGDOWN
 
 /* These should be in libxfs.h */
 #ifndef XFS_IOC_GOINGDOWN
index 6a03bf303d4950e6d999be2ea8acd2cbe70cfdd6..891fc08c1c70c9eb44be249f1ab1b11c7b5d40f1 100644 (file)
@@ -139,9 +139,9 @@ main(int argc, char **argv)
                        mode[0] = '?';
                }
 
                        mode[0] = '?';
                }
 
-               printf("  Mode: (%04o/%s)", sbuf.st_mode & 07777, mode);
-               printf("         Uid: (%d)", sbuf.st_uid);
-               printf("  Gid: (%d)\n", sbuf.st_gid);
+               printf("  Mode: (%04o/%s)", (unsigned int)(sbuf.st_mode & 07777), mode);
+               printf("         Uid: (%d)", (int)sbuf.st_uid);
+               printf("  Gid: (%d)\n", (int)sbuf.st_gid);
                printf("Device: %2d,%-2d", major(sbuf.st_dev),
                                minor(sbuf.st_dev));
                printf("  Inode: %-9llu", (unsigned long long)sbuf.st_ino);
                printf("Device: %2d,%-2d", major(sbuf.st_dev),
                                minor(sbuf.st_dev));
                printf("  Inode: %-9llu", (unsigned long long)sbuf.st_ino);
index cf290cf7c60fb6404c1c839c5acdac4a013a7d09..5c76d0d538da7521c18267afd0dfc6d781ecd4e9 100644 (file)
@@ -63,8 +63,11 @@ void dumpblock(int *buffer, __uint64_t offset, int blocksize);
 void
 usage(char *progname)
 {
 void
 usage(char *progname)
 {
-       fprintf(stderr, "usage: %s [-l filesize] [-b blocksize] [-c count] [-o write offset] [-s seed] [-x extentsize] [-w] [-v] [-d] [-r] [-a] [-p] filename\n",
-                       progname);
+       fprintf(stderr,
+               "usage: %s [-l filesize] [-b blocksize] [-c count]"
+               " [-o write offset] [-s seed] [-x extentsize]"
+               " [-w] [-v] [-d] [-r] [-a] [-p] filename\n",
+               progname);
        exit(1);
 }
 
        exit(1);
 }
 
@@ -85,10 +88,10 @@ main(int argc, char *argv[])
        while ((ch = getopt(argc, argv, "b:l:s:c:o:x:vwdrapt")) != EOF) {
                switch(ch) {
                case 'b':       blocksize  = atoi(optarg);      break;
        while ((ch = getopt(argc, argv, "b:l:s:c:o:x:vwdrapt")) != EOF) {
                switch(ch) {
                case 'b':       blocksize  = atoi(optarg);      break;
-               case 'l':       filesize   = strtoll(optarg, NULL, 16); break;
+               case 'l':       filesize   = strtoull(optarg, NULL, 16); break;
                case 's':       seed       = atoi(optarg);      break;
                case 'c':       count      = atoi(optarg);      break;
                case 's':       seed       = atoi(optarg);      break;
                case 'c':       count      = atoi(optarg);      break;
-               case 'o':       fileoffset = strtoll(optarg, NULL, 16); break;
+               case 'o':       fileoffset = strtoull(optarg, NULL, 16); break;
                case 'x':       extsize    = atoi(optarg);      break;
                case 'v':       verbose++;                      break;
                case 'w':       wsync++;                        break;
                case 'x':       extsize    = atoi(optarg);      break;
                case 'v':       verbose++;                      break;
                case 'w':       wsync++;                        break;
@@ -106,13 +109,13 @@ main(int argc, char *argv[])
                usage(argv[0]);
        if ((filesize % blocksize) != 0) {
                filesize -= filesize % blocksize;
                usage(argv[0]);
        if ((filesize % blocksize) != 0) {
                filesize -= filesize % blocksize;
-               printf("filesize not a multiple of blocksize, reducing filesize to %lld\n",
-                                filesize);
+               printf("filesize not a multiple of blocksize, reducing filesize to %llu\n",
+                      (unsigned long long)filesize);
        }
        if ((fileoffset % blocksize) != 0) {
                fileoffset -= fileoffset % blocksize;
        }
        if ((fileoffset % blocksize) != 0) {
                fileoffset -= fileoffset % blocksize;
-               printf("fileoffset not a multiple of blocksize, reducing fileoffset to %lld\n",
-                      fileoffset);
+               printf("fileoffset not a multiple of blocksize, reducing fileoffset to %llu\n",
+                      (unsigned long long)fileoffset);
        }
        if (count > (filesize/blocksize)) {
                count = (filesize/blocksize);
        }
        if (count > (filesize/blocksize)) {
                count = (filesize/blocksize);
@@ -126,9 +129,10 @@ main(int argc, char *argv[])
        printf("randholes: Seed = %d (use \"-s %d\" to re-execute this test)\n", seed, seed);
        srandom(seed);
         
        printf("randholes: Seed = %d (use \"-s %d\" to re-execute this test)\n", seed, seed);
        srandom(seed);
         
-        printf("randholes: blocksize=%d, filesize=%Ld, seed=%d\n"
-               "randholes: count=%d, offset=%Ld, extsize=%d\n",
-                blocksize, filesize, seed, count, fileoffset, extsize);
+        printf("randholes: blocksize=%d, filesize=%llu, seed=%d\n"
+               "randholes: count=%d, offset=%llu, extsize=%d\n",
+                blocksize, (unsigned long long)filesize, seed,
+              count, (unsigned long long)fileoffset, extsize);
         printf("randholes: verbose=%d, wsync=%d, direct=%d, rt=%d, alloconly=%d, preserve=%d, test=%d\n",
                 verbose, wsync, direct, rt, alloconly, preserve, test);
         
         printf("randholes: verbose=%d, wsync=%d, direct=%d, rt=%d, alloconly=%d, preserve=%d, test=%d\n",
                 verbose, wsync, direct, rt, alloconly, preserve, test);
         
@@ -153,7 +157,9 @@ main(int argc, char *argv[])
                perror("open");
                return 1;
        }
                perror("open");
                return 1;
        }
+
        if (rt) {
        if (rt) {
+#ifdef XFS_IOC_FSGETXATTR
                if (xfsctl(filename, fd, XFS_IOC_FSGETXATTR, &rtattr) < 0) {
                        perror("xfsctl(XFS_IOC_FSGETXATTR)");
                        return 1;
                if (xfsctl(filename, fd, XFS_IOC_FSGETXATTR, &rtattr) < 0) {
                        perror("xfsctl(XFS_IOC_FSGETXATTR)");
                        return 1;
@@ -168,14 +174,49 @@ main(int argc, char *argv[])
                                return 1;
                        }
                }
                                return 1;
                        }
                }
+#else
+#ifdef F_FSGETXATTR
+                if (fcntl(fd, F_FSGETXATTR, &rtattr) < 0) {
+                        perror("fcntl(F_FSGETXATTR)");
+                        return 1;
+                }
+                if ((rtattr.fsx_xflags & XFS_XFLAG_REALTIME) == 0 ||
+                    (extsize && rtattr.fsx_extsize != extsize * blocksize)) {
+                        rtattr.fsx_xflags |= XFS_XFLAG_REALTIME;
+                        if (extsize)
+                                rtattr.fsx_extsize = extsize * blocksize;
+                        if (fcntl(fd, F_FSSETXATTR, &rtattr) < 0) {
+                                perror("fcntl(F_FSSETXATTR)");
+                                return 1;
+                        }
+                }
+#else
+bozo!
+#endif
+#endif
        }
        }
+
        if (direct) {
        if (direct) {
+#ifdef XFS_IOC_DIOINFO
                if (xfsctl(filename, fd, XFS_IOC_DIOINFO, &diob) < 0) {
                        perror("xfsctl(XFS_IOC_FIOINFO)");
                        return 1;
                }
                if (xfsctl(filename, fd, XFS_IOC_DIOINFO, &diob) < 0) {
                        perror("xfsctl(XFS_IOC_FIOINFO)");
                        return 1;
                }
+#else
+#ifdef F_DIOINFO
+                if (fcntl(fd, F_DIOINFO, &diob) < 0) {
+                        perror("fcntl(F_FIOINFO)");
+                        return 1;
+                }
+#else
+bozo!
+#endif
+#endif
                if (blocksize % diob.d_miniosz) {
                if (blocksize % diob.d_miniosz) {
-                       fprintf(stderr, "blocksize %d must be a multiple of %d for direct I/O\n", blocksize, diob.d_miniosz);
+                       fprintf(stderr,
+                               "blocksize %d must be a multiple of %d for direct I/O\n",
+                               blocksize,
+                               diob.d_miniosz);
                        return 1;
                }
        }
                        return 1;
                }
        }
@@ -229,10 +270,22 @@ writeblks(char *fname, int fd)
                        fl.l_start = offset;
                        fl.l_len = blocksize;
                        fl.l_whence = 0;
                        fl.l_start = offset;
                        fl.l_len = blocksize;
                        fl.l_whence = 0;
+
+#ifdef XFS_IOC_RESVSP64
                        if (xfsctl(fname, fd, XFS_IOC_RESVSP64, &fl) < 0) {
                                perror("xfsctl(XFS_IOC_RESVSP64)");
                                exit(1);
                        }
                        if (xfsctl(fname, fd, XFS_IOC_RESVSP64, &fl) < 0) {
                                perror("xfsctl(XFS_IOC_RESVSP64)");
                                exit(1);
                        }
+#else
+#ifdef F_RESVSP64
+                        if (fcntl(fd, F_RESVSP64, &fl) < 0) {
+                                perror("fcntl(F_RESVSP64)");
+                                exit(1);
+                        }
+#else
+bozo!
+#endif
+#endif
                        continue;
                }
                SETBIT(valid, block);
                        continue;
                }
                SETBIT(valid, block);
@@ -253,8 +306,9 @@ writeblks(char *fname, int fd)
                 if (test && verbose>1) printf("NOT ");
                if (verbose > 1) {
                        printf("writing data at offset=%llx, value 0x%llx and 0x%llx\n",
                 if (test && verbose>1) printf("NOT ");
                if (verbose > 1) {
                        printf("writing data at offset=%llx, value 0x%llx and 0x%llx\n",
-                              fileoffset + offset,
-                              *(__uint64_t *)buffer, *(__uint64_t *)(buffer+256));
+                              (unsigned long long)(fileoffset + offset),
+                              *(unsigned long long *)buffer,
+                              *(unsigned long long *)(buffer+256));
                }
        }
 
                }
        }
 
@@ -304,10 +358,10 @@ readblks(int fd)
                                if ((*(__uint64_t *)tmp != 0LL) ||
                                    (*(__uint64_t *)(tmp+256) != 0LL)) {
                                        printf("mismatched data at offset=%llx, expected 0x%llx, got 0x%llx and 0x%llx\n",
                                if ((*(__uint64_t *)tmp != 0LL) ||
                                    (*(__uint64_t *)(tmp+256) != 0LL)) {
                                        printf("mismatched data at offset=%llx, expected 0x%llx, got 0x%llx and 0x%llx\n",
-                                              fileoffset + block * blocksize,
+                                              (unsigned long long)fileoffset + block * blocksize,
                                               0LL,
                                               0LL,
-                                              *(__uint64_t *)tmp,
-                                              *(__uint64_t *)(tmp+256));
+                                              *(unsigned long long *)tmp,
+                                              *(unsigned long long *)(tmp+256));
                                         err++;
                                }
                        } else {
                                         err++;
                                }
                        } else {
@@ -315,11 +369,12 @@ readblks(int fd)
                                      fileoffset + block * blocksize) ||
                                     (*(__uint64_t *)(tmp+256) !=
                                      fileoffset + block * blocksize) ) {
                                      fileoffset + block * blocksize) ||
                                     (*(__uint64_t *)(tmp+256) !=
                                      fileoffset + block * blocksize) ) {
-                                       printf("mismatched data at offset=%llx, expected 0x%llx, got 0x%llx and 0x%llx\n",
-                                              fileoffset + block * blocksize,
-                                              fileoffset + block * blocksize,
-                                              *(__uint64_t *)tmp,
-                                              *(__uint64_t *)(tmp+256));
+                                       printf("mismatched data at offset=%llx, "
+                                              "expected 0x%llx, got 0x%llx and 0x%llx\n",
+                                              (unsigned long long)fileoffset + block * blocksize,
+                                              (unsigned long long)fileoffset + block * blocksize,
+                                              *(unsigned long long *)tmp,
+                                              *(unsigned long long *)(tmp+256));
                                         err++;
                                }
                        }
                                         err++;
                                }
                        }
@@ -365,7 +420,7 @@ dumpblock(int *buffer, __uint64_t offset, int blocksize)
 
        for (i = 0; i < (blocksize / 16); i++) {
                printf("%llx: 0x%08x 0x%08x 0x%08x 0x%08x\n",
 
        for (i = 0; i < (blocksize / 16); i++) {
                printf("%llx: 0x%08x 0x%08x 0x%08x 0x%08x\n",
-                      offset, *buffer, *(buffer + 1), *(buffer + 2),
+                      (unsigned long long)offset, *buffer, *(buffer + 1), *(buffer + 2),
                       *(buffer + 3));
                offset += 16;
                buffer += 4;
                       *(buffer + 3));
                offset += 16;
                buffer += 4;
index 8f0f909fbd06a0d0d652df22049f9ac4ba75926e..0e883a5ce3eb664746b9bcde3687fcc8dea2caf3 100644 (file)
@@ -67,8 +67,15 @@ main(int argc, char **argv)
         gid_t sgids[SUP_MAX];
         int sup_cnt = 0;
        int status;
         gid_t sgids[SUP_MAX];
         int sup_cnt = 0;
        int status;
+       char *p;
+
+       prog = basename(argv[0]);
+       for (p = prog; *p; p++) {
+               if (*p == '/') {
+                       prog = p + 1;
+               }
+       }
 
 
-        prog = basename(argv[0]);
 
        while ((c = getopt(argc, argv, "u:g:s:")) != -1) {
                switch (c) {
 
        while ((c = getopt(argc, argv, "u:g:s:")) != -1) {
                switch (c) {
@@ -108,7 +115,7 @@ main(int argc, char **argv)
         if (gid != -1) {
            if (setegid(gid) == -1) {
                fprintf(stderr, "%s: setegid(%d) failed: %s\n",
         if (gid != -1) {
            if (setegid(gid) == -1) {
                fprintf(stderr, "%s: setegid(%d) failed: %s\n",
-                       prog, gid, strerror(errno));
+                       prog, (int)gid, strerror(errno));
                exit(1);
            }   
         }
                exit(1);
            }   
         }
@@ -124,7 +131,7 @@ main(int argc, char **argv)
         if (uid != -1) {
            if (seteuid(uid) == -1) {
                fprintf(stderr, "%s: seteuid(%d) failed: %s\n",
         if (uid != -1) {
            if (seteuid(uid) == -1) {
                fprintf(stderr, "%s: seteuid(%d) failed: %s\n",
-                       prog, uid, strerror(errno));
+                       prog, (int)uid, strerror(errno));
                exit(1);
            }   
         }
                exit(1);
            }   
         }
index 8dc0860651f1f455bf78f093bef69df7d523010d..cc1f3993d1435e065627927da8d3a4da24e2caa4 100644 (file)
@@ -126,7 +126,7 @@ writeblk(int fd)
        }
        if (verbose > 1)
                printf("writing   data at offset=%llx\n",
        }
        if (verbose > 1)
                printf("writing   data at offset=%llx\n",
-                      (fileoffset + offset));
+                      (unsigned long long)(fileoffset + offset));
 }
 
 void
 }
 
 void
@@ -141,5 +141,5 @@ truncfile(int fd)
        }
        if (verbose > 1)
                printf("truncated file to offset %llx\n",
        }
        if (verbose > 1)
                printf("truncated file to offset %llx\n",
-                      (fileoffset + offset));
+                      (unsigned long long)(fileoffset + offset));
 }
 }
index 541e2f4c8ce24ff27353ed37003ee669daa57d22..3c218a61d61740c6c58a283d2dafc16c44ab363a 100644 (file)
@@ -57,7 +57,8 @@ void fscounts(char *fname, int fsfd)
     }
 
     printf("XFS_IOC_FSCOUNTS-\n    freedata: %lld freertx: %lld freeino: %lld allocino: %lld\n",
     }
 
     printf("XFS_IOC_FSCOUNTS-\n    freedata: %lld freertx: %lld freeino: %lld allocino: %lld\n",
-            counts.freedata, counts.freertx, counts.freeino, counts.allocino);
+            (long long)counts.freedata, (long long)counts.freertx,
+          (long long)counts.freeino, (long long)counts.allocino);
 }
     
 __u64 getresblks(char *fname, int fsfd)
 }
     
 __u64 getresblks(char *fname, int fsfd)
@@ -72,7 +73,7 @@ __u64 getresblks(char *fname, int fsfd)
     }
     
     printf("XFS_IOC_GET_RESBLKS-\n    resblks: %lld blksavail: %lld\n",
     }
     
     printf("XFS_IOC_GET_RESBLKS-\n    resblks: %lld blksavail: %lld\n",
-            res.resblks, res.resblks_avail);
+            (long long)res.resblks, (long long)res.resblks_avail);
     
     return res.resblks;
 }
     
     return res.resblks;
 }
@@ -90,7 +91,7 @@ __u64 setresblks(char *fname, int fsfd, __u64 blks)
     }
     
     printf("XFS_IOC_SET_RESBLKS-\n    resblks: %lld blksavail: %lld\n",
     }
     
     printf("XFS_IOC_SET_RESBLKS-\n    resblks: %lld blksavail: %lld\n",
-            res.resblks, res.resblks_avail);
+            (long long)res.resblks, (long long)res.resblks_avail);
     
     return res.resblks;
 }
     
     return res.resblks;
 }
@@ -117,7 +118,7 @@ void stat_print(int fd)
         exit(1);
     }
     printf("dev: %llu ino: %llu mode: %o\n",
         exit(1);
     }
     printf("dev: %llu ino: %llu mode: %o\n",
-            (__u64)buf.st_dev, (__u64)buf.st_ino, buf.st_mode);
+            (unsigned long long)buf.st_dev, (unsigned long long)buf.st_ino, buf.st_mode);
 }
     
 
 }