mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Minor xfstests tweaks - report kernel version in check as in bench.
This commit is contained in:
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-9
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user