mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
Update auto-benchmark stuff to remove assumptions about xfs as the only fs
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
# creator
|
||||
owner=nathans@sgi.com
|
||||
|
||||
iam=bench
|
||||
tmp=/tmp/$$
|
||||
here=`pwd`; export here
|
||||
status=1 # failure is the default!
|
||||
@@ -97,7 +98,7 @@ _run_benchmark()
|
||||
while [ $pass -le $passes -o $passes -lt 0 ]
|
||||
do
|
||||
_log " *** clean scratch device [$bench starting, pass $pass]"
|
||||
_scratch_mkfs_xfs 2>&1 | _fix_malloc >>$FULL
|
||||
_scratch_mkfs 2>&1 | _fix_malloc >>$FULL
|
||||
_log " *** mounting scratch device"
|
||||
_scratch_mount || _fail " !!! failed to mount"
|
||||
|
||||
@@ -166,7 +167,9 @@ FULL_MKFS_OPTIONS=`_scratch_mkfs_options`
|
||||
FULL_MOUNT_OPTIONS=`_scratch_mount_options`
|
||||
|
||||
# $OUT is the report which will ultimately be sent, keep it tidy.
|
||||
cat >$OUT <<EOF
|
||||
rm -f $OUT
|
||||
[ -z "$FSTYP" ] || echo "FS_TYPE -- $FSTYP" >>$OUT
|
||||
cat >>$OUT <<EOF
|
||||
MKFS_OPTIONS -- $FULL_MKFS_OPTIONS
|
||||
MOUNT_OPTIONS -- $FULL_MOUNT_OPTIONS
|
||||
|
||||
@@ -174,7 +177,7 @@ EOF
|
||||
|
||||
for bench in $benches
|
||||
do
|
||||
echo "" >$FULL
|
||||
echo "" >>$FULL
|
||||
echo "" >$LOG
|
||||
_log "*** benchmark started [passes=$passes, benchmark=$bench]"
|
||||
_log "*** (`date`)"
|
||||
|
||||
+17
-7
@@ -52,8 +52,8 @@
|
||||
# RMT_IRIXTAPE_DEV - the IRIX remote tape device for the xfsdump tests
|
||||
# RMT_TAPE_USER - remote user for tape device
|
||||
#
|
||||
|
||||
#
|
||||
# - These can be added to known_hosts() below or a separate local
|
||||
# configuration file can be used (using the HOST_OPTIONS variable).
|
||||
# - This script is shared by the stress test system and the auto-qa
|
||||
# system (includes both regression test and benchmark components).
|
||||
# - TEST_DEV & TEST_DIR must be assigned.
|
||||
@@ -71,6 +71,7 @@ SOAK_PROC=3 # -p option to fsstress
|
||||
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}
|
||||
export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
|
||||
export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
|
||||
export CHECK_OPTIONS=${CHECK_OPTIONS:="-g auto"}
|
||||
@@ -80,8 +81,10 @@ export BENCH_PASSES=${BENCH_PASSES:=5}
|
||||
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
|
||||
export LOCAL_CONFIGURE_OPTIONS=${LOCAL_CONFIGURE_OPTIONS:=--enable-readline=yes}
|
||||
|
||||
case "$HOST"
|
||||
in
|
||||
known_hosts()
|
||||
{
|
||||
case "$HOST"
|
||||
in
|
||||
bruce)
|
||||
MODULAR=0
|
||||
EMAIL="nathans@larry"
|
||||
@@ -205,7 +208,7 @@ in
|
||||
SCRATCH_MNT=/mnt/scratch
|
||||
TAPE_DEV=/dev/st0
|
||||
RMT_TAPE_DEV=longhorn:/dev/tape
|
||||
# RMT_IRIXTAPE_DEV=longhorn:/dev/tape
|
||||
# RMT_IRIXTAPE_DEV=longhorn:/dev/tape
|
||||
RMT_TAPE_USER=guest
|
||||
;;
|
||||
lab343)
|
||||
@@ -219,10 +222,17 @@ in
|
||||
SCRATCH_MNT=/qa/scratch
|
||||
;;
|
||||
*)
|
||||
echo "common.config: Error: need to define parameters for host $HOST"
|
||||
echo "Error: need to define parameters for host $HOST"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
}
|
||||
|
||||
if [ -f "$HOST_OPTIONS" ]; then
|
||||
source "$HOST_OPTIONS"
|
||||
else
|
||||
known_hosts
|
||||
fi
|
||||
|
||||
if [ ! -b "$TEST_DEV" ]
|
||||
then
|
||||
|
||||
@@ -74,7 +74,8 @@ _test_mount()
|
||||
TEST_OPTIONS="$TEST_OPTIONS -ortdev=$TEST_RTDEV"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$TEST_LOGDEV" ] && \
|
||||
TEST_OPTIONS="$TEST_OPTIONS -ologdev=$TEST_LOGDEV"
|
||||
mount -t xfs $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
|
||||
[ -z "$FSTYP" ] && FSTYP=xfs
|
||||
mount -t $FSTYP $TEST_OPTIONS $MOUNT_OPTIONS $* $TEST_DEV $TEST_DIR
|
||||
}
|
||||
|
||||
_scratch_mount_options()
|
||||
@@ -94,7 +95,8 @@ _scratch_mount()
|
||||
SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ortdev=$SCRATCH_RTDEV"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_LOGDEV" ] && \
|
||||
SCRATCH_OPTIONS="$SCRATCH_OPTIONS -ologdev=$SCRATCH_LOGDEV"
|
||||
mount -t xfs $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
|
||||
[ -z "$FSTYP" ] && FSTYP=xfs
|
||||
mount -t $FSTYP $SCRATCH_OPTIONS $MOUNT_OPTIONS $* $SCRATCH_DEV $SCRATCH_MNT
|
||||
}
|
||||
|
||||
_scratch_mkfs_options()
|
||||
@@ -107,6 +109,15 @@ _scratch_mkfs_options()
|
||||
echo $SCRATCH_OPTIONS $MKFS_OPTIONS $* $SCRATCH_DEV
|
||||
}
|
||||
|
||||
_scratch_mkfs()
|
||||
{
|
||||
if [ -z "$FSTYP" -o "$FSTYP" = xfs ]; then
|
||||
_scratch_mkfs_xfs $*
|
||||
else
|
||||
/sbin/mkfs.$FSTYP $MKFS_OPTIONS $* $SCRATCH_DEV
|
||||
fi
|
||||
}
|
||||
|
||||
_scratch_mkfs_xfs()
|
||||
{
|
||||
SCRATCH_OPTIONS=""
|
||||
@@ -544,6 +555,9 @@ _check_filesystem()
|
||||
extra_log_options="-l$2"
|
||||
extra_mount_options="-ologdev=$2"
|
||||
fi
|
||||
|
||||
[ "$FSTYP" != xfs ] && return 0
|
||||
|
||||
type=`_fs_type $device`
|
||||
ok=1
|
||||
|
||||
@@ -645,7 +659,7 @@ _check_scratch_fs()
|
||||
[ -d /usr/bsd ] && PATH=$PATH:/usr/bsd
|
||||
[ -d /usr/freeware/bin ] && PATH=$PATH:/usr/freeware/bin
|
||||
|
||||
if [ "$iam" != new ]
|
||||
if [ "$iam" != new -a "$iam" != bench ]
|
||||
then
|
||||
|
||||
# make some further configuration checks here
|
||||
|
||||
@@ -8,10 +8,11 @@ fi
|
||||
|
||||
[ "$USE_EXTERNAL" != yes ] && USE_EXTERNAL="no"
|
||||
[ "$USE_LBD_PATCH" = yes ] || USE_LBD_PATCH="no"
|
||||
[ -x "$FSTYP" ] && FSTYP="xfs"
|
||||
|
||||
cat <<EOF
|
||||
TEST: DIR=$TEST_DIR DEV=$TEST_DEV rt=[$TEST_RTDEV] log=[$TEST_LOGDEV]
|
||||
TAPE: dev=[$TAPE_DEV] rmt=[$RMT_TAPE_DEV] rmtirix=[$RMT_TAPE_USER@$RMT_IRIXTAPE_DEV]
|
||||
SCRATCH: MNT=$SCRATCH_MNT DEV=$SCRATCH_DEV rt=[$SCRATCH_RTDEV] log=[$SCRATCH_LOGDEV]
|
||||
VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH
|
||||
VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user