Minor xfstests tweaks - report kernel version in check as in bench.
authorfsgqa <fsgqa>
Mon, 2 Feb 2004 01:13:25 +0000 (01:13 +0000)
committerfsgqa <fsgqa>
Mon, 2 Feb 2004 01:13:25 +0000 (01:13 +0000)
bench
check
common.rc
tools/auto-qa

diff --git a/bench b/bench
index 30e2ab1..ae6e21d 100755 (executable)
--- a/bench
+++ b/bench
@@ -162,28 +162,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 _require_scratch
 rm -f bench.* results.*
 
-_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
-}
-
-_full_platform_details()
-{
-    os=`uname -s`
-    host=`hostname -s`
-    kernel=`uname -r`
-    platform=`uname -m`
-    echo "$os/$platform $host $kernel"
-}
-
 FULL_FSTYP_DETAILS=`_full_fstyp_details`
 FULL_HOST_DETAILS=`_full_platform_details`
 FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
diff --git a/check b/check
index 3b66e29..c854eb6 100755 (executable)
--- a/check
+++ b/check
@@ -152,8 +152,19 @@ timestamp=${TIMESTAMP:=false}
 
 [ -f check.time ] || touch check.time
 
+FULL_FSTYP_DETAILS=`_full_fstyp_details`
+FULL_HOST_DETAILS=`_full_platform_details`
 FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
-echo "MKFS_OPTIONS  -- $FULL_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
+
 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.
@@ -165,8 +176,6 @@ then
     exit 1
 fi
 
-FULL_MOUNT_OPTIONS=`_scratch_mount_options`
-echo "MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS"
 # call the overridden mount - make sure the FS mounts with
 # the same options that we'll mount with later.
 if ! _scratch_mount >$tmp.err 2>&1
index f6413ea..69e2b2e 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -654,6 +654,28 @@ _check_scratch_fs()
     _check_filesystem $SCRATCH_DEV $SCRATCH_LOG
 }
 
+_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
+}
+
+_full_platform_details()
+{
+    os=`uname -s`
+    host=`hostname -s`
+    kernel=`uname -r`
+    platform=`uname -m`
+    echo "$os/$platform $host $kernel"
+}
+
 ################################################################################
 
 [ -d /usr/bsd ] && PATH=$PATH:/usr/bsd
index 3c9b062..f13dd8e 100755 (executable)
@@ -66,8 +66,7 @@ _fail()
 
 _get_kernel_version()
 {
-    [ -x "$KWORKAREA" ] \
-       || _fail "can't access kernel workarea $KWORKAREA"
+    [ -x "$KWORKAREA" ] || return
     [ -r "$KWORKAREA/Makefile" ] \
        || _fail "can't read kernel makefile $KWORKAREA/Makefile"
 
@@ -303,7 +302,6 @@ fi
 
 [ "$UID" -eq 0 ]       && _fail "    !!! QA most be run as a normal user"
 [ -d "$ROOT" ]         || _fail "    !!! QA root \"$ROOT\" not found"
-[ -d "$KWORKAREA" ]    || _fail "    !!! QA kernel \"$KWORKAREA\" not found"
 [ -d "$WORKAREA" ]     || _fail "    !!! QA workarea \"$WORKAREA\" not found"
 [ -r "$CONFIG" ]       || _fail "    !!! Can't read config file $CONFIG"
 . "$COMMON_CONFIG"     || _fail "    !!! Couldn't source $COMMON_CONFIG"
@@ -484,12 +482,6 @@ do
        *check)
            uname=`uname -a`
            _log "          *** uname $uname"
-           _log "          *** kernel"
-           [ -n "/boot/*$EXTRA*" ] && \
-               ls -l /boot/*$EXTRA*  2>&1
-           _log "          *** kernel modules"
-           [ -d /lib/modules/$SVERSION-$EXTRA/kernel/fs/xfs ] && \
-               ls -l /lib/modules/$SVERSION-$EXTRA/kernel/fs/xfs/*
 
            if [ "$MODULAR" -eq 0 ]; then
                new_state="reset"