More merge conflicts
authorptools <ptools>
Tue, 15 Jun 2004 07:36:09 +0000 (07:36 +0000)
committerptools <ptools>
Tue, 15 Jun 2004 07:36:09 +0000 (07:36 +0000)
12 files changed:
019
021
040
041
085
aclocal.m4
check
common.dump
m4/Makefile
m4/package_xfslibs.m4
new
src/Makefile

diff --git a/019 b/019
index 923d22f..dc423f0 100755 (executable)
--- a/019
+++ b/019
@@ -1,5 +1,5 @@
 #! /bin/sh
-# XFS QA Test No. 019
+# FS QA Test No. 019
 #
 # mkfs protofile test
 #
@@ -77,6 +77,8 @@ _filter_stat()
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_scratch
 
@@ -84,7 +86,7 @@ protofile=$tmp.proto
 tempfile=$tmp.file
 
 echo fish >$tempfile
-$here/src/devzero -b 2048 -n 2 $tempfile.2 -c -v 44
+$here/src/devzero -b 2048 -n 2 $tempfile.2 -c -v 44 
 
 cat >$protofile <<EOF
 DUMMY1
@@ -137,7 +139,7 @@ _verify_fs()
        _full " mount"
        _scratch_mount >>$seqfull 2>&1 \
                || _fail "mount failed"
-    
+
        echo "*** verify FS"
        (cd $SCRATCH_MNT ; find . | sort \
                | xargs $here/src/lstat64 | _filter_stat)
diff --git a/021 b/021
index 9536570..66e5777 100755 (executable)
--- a/021
+++ b/021
@@ -1,5 +1,5 @@
 #! /bin/sh
-# XFS QA Test No. 021
+# FS QA Test No. 021
 #
 # xfs_db type attr test (pv 797508 linux-xfs & IRIX)
 #
@@ -87,6 +87,12 @@ _getfattr()
 }
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os Linux
+
+[ -x /usr/bin/attr ] || _notrun "attr is not installed"
+[ -x /usr/bin/getfattr ] || _notrun "getfattr is not installed"
+
 _require_scratch
 
 rm -f $seq.full
diff --git a/040 b/040
index 4bbd8d4..399bf9a 100755 (executable)
--- a/040
+++ b/040
@@ -1,5 +1,5 @@
 #! /bin/sh
-# XFS QA Test No. 040
+# FS QA Test No. 040
 #
 # srcdiff test
 #
diff --git a/041 b/041
index fa472be..6eff226 100755 (executable)
--- a/041
+++ b/041
@@ -1,5 +1,5 @@
 #! /bin/sh
-# XFS QA Test No. 041
+# FS QA Test No. 041
 #
 # growfs QA tests - repeatedly fill/grow the filesystem
 # check the filesystem contents after each operation
@@ -49,6 +49,7 @@ status=1      # failure is the default!
 
 _cleanup()
 {
+    cd /
     umount $SCRATCH_MNT
     rm -f $tmp.*
 }
@@ -59,10 +60,13 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 . ./common.filter
 
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _require_scratch
 _require_nobigloopfs
 
+
 _fill()
 {
     if [ $# -ne 1 ]; then echo "Usage: _fill \"path\"" 1>&2 ; exit 1; fi
diff --git a/085 b/085
index d80479b..04d27f0 100755 (executable)
--- a/085
+++ b/085
@@ -1,5 +1,5 @@
 #! /bin/sh
-# XFS QA Test No. 085
+# FS QA Test No. 085
 #
 # To test log replay by shutdown of file system
 # This is the first simple initial test to ensure that
@@ -53,7 +53,12 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 . ./common.rc
 . ./common.filter
 
+# put operating system in $os
+_get_os
+
 # real QA test starts here
+_supported_fs xfs
+_supported_os IRIX Linux
 
 _do_logprint()
 {
@@ -69,6 +74,19 @@ _do_logprint()
 rm -f $seq.full
 rm -f $tmp.log
 
+
+if [ $os == 'irix' ]; then
+    tail -f /var/adm/SYSLOG >$tmp.log &
+elif [ $os == 'linux' ]; then
+    tail -f /var/log/messages >$tmp.log &
+else
+    echo Error test $seq does not run on the operating system: `uname`
+    exit
+fi
+
+pid=$!
+cp $tmp.log $tmp.log.orig # note the original log
+
 _require_scratch
 
 echo "mkfs"
index 7eb5fbb..6e9e498 100644 (file)
@@ -76,59 +76,66 @@ AC_DEFUN([AC_PACKAGE_NEED_UTILITY],
 #  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
-        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
-       AC_PATH_PROG(LIBTOOL, libtool,,/usr/bin:/usr/local/bin)
+       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
-        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
-        AC_PATH_PROG(ZIP, gzip, /bin/gzip)
+        AC_PATH_PROG(ZIP, gzip,, /bin:/usr/local/bin:/usr/freeware/bin)
     fi
+
     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 "$AWK"; then
-        AC_PATH_PROG(AWK, awk, /bin/awk)
+        AC_PATH_PROG(AWK, awk,, /bin:/usr/bin)
     fi
     awk=$AWK
     AC_SUBST(awk)
+
     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)
+
     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)
+
     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)
@@ -138,13 +145,14 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
 
     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)
+
         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)
@@ -152,10 +160,11 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
     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)
+
     dnl .. and what version is rpm
     rpm_version=0
     test -x $RPM && rpm_version=`$RPM --version \
@@ -173,15 +182,31 @@ AC_DEFUN([AC_PACKAGE_UTILITIES],
     AC_SUBST(rpmbuild)
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_UUID_H],
-  [ AC_CHECK_HEADERS(uuid.h)
-    if test $ac_cv_header_uuid_h = no; then
-       AC_CHECK_HEADERS(uuid/uuid.h,, [
-       echo
-       echo 'FATAL ERROR: could not find a valid UUID header.'
-       echo 'Install the Universally Unique Identifiers development package.'
-       exit 1])
-    fi
+AC_DEFUN([AC_CHECK_GENERAL_HEADERS],
+  [ 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             \
+    ])
+    AC_CHECK_HEADERS([ sys/fs/xfs_fsops.h      \
+                       sys/fs/xfs_itable.h     \
+    ])
   ])
 
 AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE],
@@ -199,24 +224,25 @@ AC_DEFUN([AC_PACKAGE_NEED_UUIDCOMPARE],
     AC_SUBST(libuuid)
   ])
 
+
 AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
   [ AC_CHECK_HEADERS([xfs/libxfs.h])
     if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
         echo
-        echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
-        echo 'Install or upgrade the XFS development package.'
-        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+        echo 'FATAL ERROR: sys/acl.h does not exist.'
+        echo 'Install the access control lists (acl) development package.'
+        echo 'Alternatively, run "make install-lib" from the acl source.'
         exit 1
     fi
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
-  [ AC_CHECK_HEADERS([xfs/handle.h])
-    if test "$ac_cv_header_xfs_handle_h" != "yes"; then
+AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H],
+  [ AC_CHECK_HEADERS([acl/libacl.h])
+    if test "$ac_cv_header_acl_libacl_h" != "yes"; then
         echo
-        echo 'FATAL ERROR: cannot find a valid <xfs/handle.h> header file.'
-        echo 'Install or upgrade the XFS development package.'
-        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+        echo 'FATAL ERROR: acl/libacl.h does not exist.'
+        echo 'Install the access control lists (acl) development package.'
+        echo 'Alternatively, run "make install-lib" from the acl source.'
         exit 1
     fi
   ])
@@ -244,23 +270,11 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
         echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
         exit 1
     ])
-    libhdl="-lhandle"
-    test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
-        libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
-    test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la"
-    AC_SUBST(libhdl)
-  ])
-
-AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
-  [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h])
-    AC_TRY_LINK([#include <xfs/libxfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
-      [ echo ok ],
-      [ echo
-        echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
-        echo 'Upgrade your XFS programs (xfsprogs) development package.'
-        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
-        exit 1
-      ])
+    libacl="-lacl"
+    test -f `pwd`/../acl/libacl/libacl.la && \
+        libacl="`pwd`/../acl/libacl/libacl.la"
+    test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la"
+    AC_SUBST(libacl)
   ])
 
 AC_DEFUN([AC_PACKAGE_NEED_ATTR_XATTR_H],
@@ -285,11 +299,12 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTR_ERROR_H],
     fi
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_ATTR_ATTRIBUTES_H],
-  [ AC_CHECK_HEADERS([attr/attributes.h])
-    if test "$ac_cv_header_attr_attributes_h" != "yes"; then
+AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_H],
+  [ have_attributes_h=false
+    AC_CHECK_HEADERS([attr/attributes.h sys/attributes.h], [have_attributes_h=true], )
+    if test "$have_attributes_h" = "false"; then
         echo
-        echo 'FATAL ERROR: attr/attributes.h does not exist.'
+        echo 'FATAL ERROR: attributes.h does not exist.'
         echo 'Install the extended attributes (attr) development package.'
         echo 'Alternatively, run "make install-lib" from the attr source.'
         exit 1
@@ -340,50 +355,94 @@ AC_DEFUN([AC_PACKAGE_NEED_ATTRIBUTES_MACROS],
     [ echo ok ])
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_SYS_ACL_H],
-  [ AC_CHECK_HEADERS([sys/acl.h])
-    if test "$ac_cv_header_sys_acl_h" != "yes"; then
+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
+    AC_SUBST(libgdbm)
+    AC_SUBST(have_db)
+  ])
+
+AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
+  [ AC_CHECK_HEADERS([xfs/libxfs.h])
+    if test "$ac_cv_header_xfs_libxfs_h" != "yes"; then
         echo
-        echo 'FATAL ERROR: sys/acl.h does not exist.'
-        echo 'Install the access control lists (acl) development package.'
-        echo 'Alternatively, run "make install-lib" from the acl source.'
+        echo 'FATAL ERROR: cannot find a valid <xfs/libxfs.h> header file.'
+        echo 'Install or upgrade the XFS development package.'
+        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
         exit 1
     fi
   ])
 
-AC_DEFUN([AC_PACKAGE_NEED_ACL_LIBACL_H],
-  [ AC_CHECK_HEADERS([acl/libacl.h])
-    if test "$ac_cv_header_acl_libacl_h" != "yes"; then
+AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
+  [ AC_CHECK_HEADERS([xfs/xqm.h])
+    if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
         echo
-        echo 'FATAL ERROR: acl/libacl.h does not exist.'
-        echo 'Install the access control lists (acl) development package.'
-        echo 'Alternatively, run "make install-lib" from the acl source.'
+        echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
+        echo 'Install or upgrade the XFS development package.'
+        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
         exit 1
     fi
   ])
 
+AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
+  [ AC_CHECK_HEADERS([xfs/handle.h])
+    if test "$ac_cv_header_xfs_handle_h" != "yes"; then
+        echo
+        echo 'FATAL ERROR: cannot find a valid <xfs/handle.h> header file.'
+        echo 'Install or upgrade the XFS development package.'
+        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+        exit 1
+    fi
+  ])
 
-AC_DEFUN([AC_PACKAGE_NEED_ACLINIT_LIBACL],
-  [ AC_CHECK_LIB(acl, acl_init,, [
-       echo
-       echo 'FATAL ERROR: could not find a valid Access Control List library.'
-       echo 'Install either the libacl (rpm) or the libacl1 (deb) package.'
-       echo 'Alternatively, run "make install-lib" from the acl source.'
+AC_DEFUN([AC_PACKAGE_NEED_LIBXFSINIT_LIBXFS],
+  [ AC_CHECK_LIB(xfs, libxfs_init,, [
+        echo
+        echo 'FATAL ERROR: could not find a valid XFS base library.'
+        echo 'Install or upgrade the XFS library package.'
+        echo 'Alternatively, run "make install-lib" from the xfsprogs source.'
         exit 1
     ])
-    libacl="-lacl"
-    test -f `pwd`/../acl/libacl/libacl.la && \
-        libacl="`pwd`/../acl/libacl/libacl.la"
-    test -f /usr/lib/libacl.la && libacl="/usr/lib/libacl.la"
-    AC_SUBST(libacl)
+    libxfs="-lxfs"
+    test -f `pwd`/../xfsprogs/libxfs/libxfs.la && \
+        libxfs="`pwd`/../xfsprogs/libxfs/libxfs.la"
+    test -f /usr/lib/libxfs.la && libxfs="/usr/lib/libxfs.la"
+    AC_SUBST(libxfs)
   ])
 
-AC_DEFUN([AC_PACKAGE_WANT_LIBGDBM],
-  [ AC_CHECK_HEADER([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
-    AC_SUBST(libgdbm)
-    AC_SUBST(have_db)
+AC_DEFUN([AC_PACKAGE_NEED_ATTRLIST_LIBHANDLE],
+  [ AC_CHECK_LIB(handle, attr_list_by_handle,, [
+        echo
+        echo 'FATAL ERROR: could not find a current XFS handle library.'
+        echo 'Install or upgrade the XFS library package.'
+        echo 'Alternatively, run "make install-lib" from the xfsprogs source.'
+        exit 1
+    ])
+    libhdl="-lhandle"
+    test -f `pwd`/../xfsprogs/libhandle/libhandle.la && \
+        libhdl="`pwd`/../xfsprogs/libhandle/libhandle.la"
+    test -f /usr/lib/libhandle.la && libhdl="/usr/lib/libhandle.la"
+    AC_SUBST(libhdl)
+  ])
+
+AC_DEFUN([AC_PACKAGE_NEED_XFSCTL_MACRO],
+  [ AC_MSG_CHECKING([xfsctl from xfs/libxfs.h])
+    AC_TRY_LINK([#include <xfs/libxfs.h>], [ int x = xfsctl(0, 0, 0, 0); ],
+      [ echo ok ],
+      [ echo
+        echo 'FATAL ERROR: cannot find required macros in the XFS headers.'
+        echo 'Upgrade your XFS programs (xfsprogs) development package.'
+        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+        exit 1
+      ])
   ])
 
diff --git a/check b/check
index ea6081b..36c996c 100755 (executable)
--- a/check
+++ b/check
@@ -33,9 +33,6 @@
 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
 #
 
-export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
-export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
-
 tmp=/tmp/$$
 status=0
 needwrap=true
@@ -45,6 +42,8 @@ bad=""
 notrun=""
 interrupt=true
 
+export QA_CHECK_FS=${QA_CHECK_FS:=true}
+
 # generic initialization
 iam=check
 if ! . ./common.rc
@@ -53,7 +52,7 @@ then
     exit 1
 fi
 
-if [ $UID -ne 0 ]
+if [ `id -u` -ne 0 ]
 then
     echo "check: QA must be run as root"
     exit 1
@@ -64,6 +63,12 @@ _wallclock()
     date "+%H %M %S" | $AWK_PROG '{ print $1*3600 + $2*60 + $3 }'
 }
 
+_timestamp()
+{
+    now=`date "+%D-%T"`
+    echo -n " [$now]"
+}
+
 _wrapup()
 {
     # for hangcheck ...
@@ -152,9 +157,31 @@ timestamp=${TIMESTAMP:=false}
 
 [ -f check.time ] || touch check.time
 
+_get_os
+if [ $os == "linux" ]; then
+
 FULL_FSTYP_DETAILS=`_full_fstyp_details`
 FULL_HOST_DETAILS=`_full_platform_details`
+
 FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
+
+FULL_MOUNT_OPTIONS=`_scratch_mount_options`
+
+cat <<EOF
+FSTYP         -- $FULL_FSTYP_DETAILS
+PLATFORM      -- $FULL_HOST_DETAILS
+MKFS_OPTIONS  -- $FULL_MKFS_OPTIONS
+MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
+
+EOF
+fi
+
+#Linux specific flag '-f'
+if [ $os == "linux" ]; then
+   flag='-f'
+fi
+
+echo "MKFS_OPTIONS  -- $FULL_MKFS_OPTIONS"
 FULL_MOUNT_OPTIONS=`_scratch_mount_options`
 
 cat <<EOF
@@ -168,7 +195,8 @@ EOF
 umount $SCRATCH_DEV 2>/dev/null
 # call the overridden mkfs.xfs - make sure the FS is built
 # the same as we'll create it later.
-if ! _scratch_mkfs_xfs -f >$tmp.err 2>&1
+
+if ! _scratch_mkfs_xfs $flag >$tmp.err 2>&1
 then
     echo "our local _scratch_mkfs_xfs routine ..."
     cat $tmp.err
@@ -223,10 +251,12 @@ do
 
        start=`_wallclock`
        $timestamp && echo -n " ["`date "+%T"`"]"
+       sh $seq >$tmp.rawout 2>&1
+       $timestamp && echo -n " ["`date "+%T"`"]"
        [ ! -x $seq ] && chmod u+x $seq # ensure we can run it
        ./$seq >$tmp.rawout 2>&1
        sts=$?
-       $timestamp && echo -n " ["`date "+%T"`"]"
+       $timestamp && _timestamp
        stop=`_wallclock`
 
        _fix_malloc <$tmp.rawout >$tmp.out
@@ -288,7 +318,6 @@ do
     
     seq="after_$seq"
     _check_test_fs
-    
 done
 
 interrupt=false
index fa38afb..371e605 100644 (file)
@@ -38,8 +38,8 @@
 rm -f $here/$seq.full
 
 if [ -n "$DEBUGDUMP" ]; then
-  _dump_debug=-v5
-  _restore_debug=-v5
+  _dump_debug=-v4
+  _restore_debug=-v4
   _invutil_debug=-d
 fi
  
@@ -517,6 +517,7 @@ _do_create_dumpdir_fill()
        if [ -n "$perms" ]; then
            chmod $perms $file
        fi
+
        # extended attributes (EA)
        if [ -n "$ea_name" -a -n "$ea_value" ]; then
            if [ "X$namespace" = "Xroot" ]; then
@@ -769,33 +770,38 @@ _ls_filter()
 _dump_filter_main()
 {
   sed \
-      -e "s/`hostname`/HOSTNAME/"   \
-      -e "s#$SCRATCH_DEV#SCRATCH_DEV#"    \
-      -e "s#$SCRATCH_RAWDEV#SCRATCH_DEV#"    \
-      -e "s#$dumptape#TAPE_DEV#"    \
-      -e "s#$SCRATCH_MNT#SCRATCH_MNT#"    \
-      -e "s#$dump_file#DUMP_FILE#"  \
-      -e 's#/var/lib/xfsdump#/var/xfsdump#' \
-      -e 's/id:[       ]*[0-9a-f-]*/id: ID/'  \
-      -e 's/time:[     ].*/time: TIME/'       \
-      -e 's/date:[     ].*/date: DATE/'       \
-      -e 's/dump begun .*/dump begun DATE/'    \
-      -e 's/[0-9][0-9]* seconds/SECS seconds/' \
-      -e 's/restore.[0-9][0-9]*/restore.PID/' \
-      -e 's/ino [0-9][0-9]*/ino INO/' \
-      -e '/: dump size/s/[0-9][0-9]*/NUM/'     \
-      -e '/dump size:/s/[0-9][0-9]*/NUM/'      \
-      -e '/dump size per stream:/s/[0-9][0-9]*/NUM/' \
+      -e "s/`hostname`/HOSTNAME/"                      \
+      -e "s#$SCRATCH_DEV#SCRATCH_DEV#"                 \
+      -e "s#$SCRATCH_RAWDEV#SCRATCH_DEV#"              \
+      -e "s#$dumptape#TAPE_DEV#"                       \
+      -e "s#$SCRATCH_MNT#SCRATCH_MNT#"                 \
+      -e "s#$dump_file#DUMP_FILE#"                     \
+      -e 's#/var/lib/xfsdump#/var/xfsdump#'            \
+      -e 's/session id:[       ]*[0-9a-f-]*/session id: ID/'  \
+      -e '/filesystem id:[     ]*[0-9a-f-]*/d'         \
+      -e 's/time:[     ].*/time: TIME/'                \
+      -e 's/date:[     ].*/date: DATE/'                \
+      -e 's/dump begun .*/dump begun DATE/'            \
+      -e 's/[0-9][0-9]* seconds/SECS seconds/'         \
+      -e 's/restore.[0-9][0-9]*/restore.PID/'          \
+      -e 's/ino [0-9][0-9]*/ino INO/'                  \
+      -e '/: dump size/s/[0-9][0-9]*/NUM/'             \
+      -e '/dump size:/s/[0-9][0-9]*/NUM/'              \
+      -e '/dump size per stream:/s/[0-9][0-9]*/NUM/'   \
       -e 's/\(media file size[  ]*\)[0-9][0-9]*/\1NUM/' \
       -e 's/\(mfile size:[      ]*\)[0-9][0-9]*/\1NUM/' \
-      -e '/drive[       ]*[0-9][0-9]*:/d' \
-      -e '/\/dev\/tty/d' \
-      -e '/inventory session uuid/d' \
-      -e '/ - Running single-threaded/d' \
-      -e '/^.*I\/O metrics: .*$/d' \
-      -e 's/1048576/BLOCKSZ/' \
-      -e 's/2097152/BLOCKSZ/' \
-      -e 's/(pid[       ]*[1-9][0-9]*)/\(pid PID\)/' \
+      -e '/drive[       ]*[0-9][0-9]*:/d'              \
+      -e '/\/dev\/tty/d'                               \
+      -e '/inventory session uuid/d'                   \
+      -e '/ - Running single-threaded/d'               \
+      -e '/^.*I\/O metrics: .*$/d'                     \
+      -e 's/1048576/BLOCKSZ/'                          \
+      -e 's/2097152/BLOCKSZ/'                          \
+      -e 's/(pid[       ]*[1-9][0-9]*)/\(pid PID\)/'   \
+      -e '/version 3\.0/d'                             \
+      -e 's/\/hw\/module.*$/SCRATCH_DEV/'              \
+      -e 's/id:[[:space:]]*[0-9a-f]\{8\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{4\}-[0-9a-f]\{12\}/ID: ID/'                                             \
+      -e 's/\[y\/n\][- ]----------------------*/\[y\/n\]/'             \
   | perl -ne '
       if ($_ =~ /(?:Dump|Restore) Summary/) {
         $skip = 1;
@@ -1125,6 +1131,7 @@ _ls_compare_sub()
     | sed -e "s#$restore_sdir\/##" >$tmp.restore_dir
 
     diff -cs $tmp.dump_dir $tmp.restore_dir | sed -e "s#$tmp#TMP#g"
+   
 }
 
 #
index a16956e..08f83e1 100644 (file)
@@ -46,6 +46,7 @@ LSRCFILES = \
        package_utilies.m4 \
        package_uuiddev.m4 \
        package_xfslibs.m4 \
+       general_headers.m4 \
        visibility_hidden.m4
 
 default: 
index 27dc930..3fa4473 100644 (file)
@@ -9,6 +9,17 @@ AC_DEFUN([AC_PACKAGE_NEED_XFS_LIBXFS_H],
     fi
   ])
 
+AC_DEFUN([AC_PACKAGE_NEED_XFS_XQM_H],
+  [ AC_CHECK_HEADERS([xfs/xqm.h])
+    if test "$ac_cv_header_xfs_xqm_h" != "yes"; then
+        echo
+        echo 'FATAL ERROR: cannot find a valid <xfs/xqm.h> header file.'
+        echo 'Install or upgrade the XFS development package.'
+        echo 'Alternatively, run "make install-dev" from the xfsprogs source.'
+        exit 1
+    fi
+  ])
+
 AC_DEFUN([AC_PACKAGE_NEED_XFS_HANDLE_H],
   [ AC_CHECK_HEADERS([xfs/handle.h])
     if test "$ac_cv_header_xfs_handle_h" != "yes"; then
diff --git a/new b/new
index 46662db..44345bc 100755 (executable)
--- a/new
+++ b/new
@@ -94,7 +94,7 @@ echo -n "Creating skeletal script for you to edit ..."
 
 cat <<End-of-File >$id
 #! /bin/sh
-# XFS QA Test No. $id
+# FS QA Test No. $id
 #
 # what am I here for?
 #
@@ -139,7 +139,13 @@ echo "QA output created by \$seq"
 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.*
+}
 
 # get standard environment, filters and checks
 . ./common.rc
@@ -147,6 +153,10 @@ trap "rm -f \$tmp.*; exit \\\$status" 0 1 2 3 15
 
 # real QA test starts here
 
+# Modify as appropriate.
+_supported_fs xfs udf nfs
+_supported_os IRIX Linux
+
 # if error
 exit
 
index 08609e7..1860045 100644 (file)
 TOPDIR = ..
 include $(TOPDIR)/include/builddefs
 
+TARGETS = dirstress fill fill2 getpagesize holes lstat64 \
+       nametest permname randholes runas truncfile usemem \
+       mmapcat append_reader append_writer dirperf metaperf \
+       devzero feature alloc fault fstest t_access_root  
+
+LINUX_TARGETS = loggen xfsctl resvtest godown bstat t_mtab
+
+ifeq ($(PKG_PLATFORM),linux)
+TARGETS += $(LINUX_TARGETS)
+endif
+
+ifeq ($(HAVE_DB), true)
 TARGETS = alloc acl_get bstat devzero dirstress fault feature \
          fill fill2 getpagesize holes xfsctl loggen lstat64 \
          nametest permname randholes runas truncfile usemem \
          fstest mmapcat append_reader append_writer \
-         dirperf metaperf enospc_unlink resvtest scaleread \
-         godown t_access_root t_mtab
+         dirperf metaperf
 ifeq ($(ENABLE_DBM), yes)
 TARGETS += dbtest
 endif
+
 ifeq ($(PKG_PLATFORM),linux)
 TARGETS += t_immutable
 endif
@@ -78,11 +90,20 @@ loggen:     loggen.o
 fstest:        fstest.o
        $(LINKTEST)
 
-#scaleread: scaleread.o $(LDLIBS)
-#      $(LINKTEST)
-
 resvtest: resvtest.o
        $(LINKTEST)
 
+#scaleread: scaleread.o $(LDLIBS)
+#      $(LINKTEST)
+
 acl_get: acl_get.o $(LIBACL) $(LIBATTR)
        $(LINKTEST) $(LIBACL) $(LIBATTR) $(LDLIBS)
+
+
+ifeq ($(PKG_PLATFORM),irix)
+fill2: fill2.o 
+       $(LINKTEST)  -lgen
+
+runas: runas.o 
+       $(LINKTEST)  -lgen
+endif
\ No newline at end of file