From e7d2c01f952bf693bd0de06058640db980234c17 Mon Sep 17 00:00:00 2001 From: fsgqa Date: Mon, 25 Aug 2003 01:18:54 +0000 Subject: [PATCH] Update auto-benchmark stuff to remove assumptions about xfs as the only fs --- bench | 9 +- common.config | 300 ++++++++++++++++++++++++++------------------------ common.rc | 20 +++- setup | 3 +- 4 files changed, 180 insertions(+), 152 deletions(-) diff --git a/bench b/bench index 9eafbb8e..7276c64b 100755 --- a/bench +++ b/bench @@ -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 <>$OUT +cat >>$OUT <$FULL + echo "" >>$FULL echo "" >$LOG _log "*** benchmark started [passes=$passes, benchmark=$bench]" _log "*** (`date`)" diff --git a/common.config b/common.config index 02c0908a..078c981a 100644 --- a/common.config +++ b/common.config @@ -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,149 +81,158 @@ 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 - bruce) - MODULAR=0 - EMAIL="nathans@larry" - SCRATCH_MNT=/mnt/xfs0 - SCRATCH_DEV=/dev/sdb5 - SCRATCH_LOGDEV=/dev/sda11 - TEST_DIR=/mnt/xfs1 - TEST_DEV=/dev/sdc3 - TEST_LOGDEV=/dev/sda9 - TAPE_DEV=/dev/st0 - RMT_TAPE_DEV=bruce:/dev/st0 - RMT_IRIXTAPE_DEV=snort:/dev/tape - RMT_TAPE_USER=guest - ;; - sherman) - TEST_DEV=/dev/sda10 - TEST_DIR=/mnt/xfs1 - SCRATCH_DEV=/dev/sda9 - SCRATCH_MNT=/mnt/xfs0 - ;; - flutz) - MODULAR=0 - EMAIL="nathans@larry" - TEST_DEV=/dev/sda5 - TEST_LOGDEV=/dev/sda9 - TEST_DIR=/xfsqa1 - SCRATCH_DEV=/dev/sda6 - SCRATCH_LOGDEV=/dev/sda7 - SCRATCH_MNT=/xfsqa2 - TAPE_DEV=/dev/st0 - RMT_TAPE_DEV=bruce:/dev/st0 - RMT_IRIXTAPE_DEV=snort:/dev/tape - RMT_TAPE_USER=guest - ;; - frodo) - MODULAR=0 - EMAIL="nathans@larry" - TEST_DEV=/dev/hda6 - TEST_DIR=/mnt/test - SCRATCH_DEV=/dev/hda7 - SCRATCH_MNT=/mnt/scratch - SCRATCH_LOGDEV=/dev/hda9 - ;; - goldfish) - MODULAR=0 - TEST_DEV=/dev/hdc1 - TEST_DIR=/mnt/xfs0 - SCRATCH_DEV=/dev/hdc2 - SCRATCH_MNT=/mnt/xfs1 - SCRATCH_LOGDEV=/dev/hdc3 - ;; - lord) - TEST_DIR=/xfs - TEST_DEV=/dev/sda5 - SCRATCH_DEV=/dev/hda7 - SCRATCH_LOGDEV=/dev/sda6 - SCRATCH_MNT=/xfs1 - ;; - burst) - TEST_DIR=/xfs - TEST_DEV=/dev/hda3 - SCRATCH_DEV=/dev/hda7 - SCRATCH_MNT=/scratch - ;; - lumpy) - TEST_DEV=/dev/sdc5 - TEST_DIR=/mnt/scratch_0 - SCRATCH_DEV=/dev/sdc7 - SCRATCH_MNT=/mnt/scratch_2 - ;; - bongo) - TEST_DEV=/dev/hda8 - TEST_DIR=/xfs1 - SCRATCH_DEV=/dev/hda9 - SCRATCH_MNT=/xfs2 - SCRATCH_LOGDEV=/dev/hda10 - SCRATCH_RTDEV=/dev/hda11 - ;; - surly) - TEST_DEV=/dev/hda9 - TEST_DIR=/mnt/xfs1 - SCRATCH_DEV=/dev/hda8 - SCRATCH_MNT=/mnt/xfs0 - SCRATCH_LOGDEV=/dev/hda10 - TAPE_DEV=/dev/st0 - RMT_TAPE_DEV=fuzzy:/dev/st0 - RMT_IRIXTAPE_DEV=blub:/dev/tape - RMT_TAPE_USER=guest - ;; - permit) - TEST_DEV=/dev/sdc1 - TEST_DIR=/mnt/xfs0 - SCRATCH_DEV=/dev/sdd1 - SCRATCH_MNT=/mnt/xfs1 - ;; - indra) - TEST_DEV=/dev/sdb1 - TEST_DIR=/mnt/xfs0 - SCRATCH_DEV=/dev/sdb2 - SCRATCH_MNT=/mnt/xfs1 - ;; - usermode) - TEST_DEV=/dev/ubd/1 - TEST_DIR=/mnt/test - SCRATCH_DEV=/dev/ubd/2 - SCRATCH_MNT=/mnt/scratch - SCRATCH_RTDEV=/dev/ubd/3 - SCRATCH_LOGDEV=/dev/ubd/4 - ;; - lite) - TEST_DEV=/dev/sda1 - TEST_DIR=/mnt/sda1 - SCRATCH_DEV=/dev/sda2 - SCRATCH_MNT=/mnt/sda2 - SCRATCH_LOGDEV=/dev/sda3 - ;; - dmfnt2) - TEST_DEV=/dev/sda6 - TEST_DIR=/mnt/test - SCRATCH_DEV=/dev/sdc6 - SCRATCH_MNT=/mnt/scratch - TAPE_DEV=/dev/st0 - RMT_TAPE_DEV=longhorn:/dev/tape -# RMT_IRIXTAPE_DEV=longhorn:/dev/tape - RMT_TAPE_USER=guest - ;; - lab343) - MODULAR=0 - EMAIL="hch@sgi.com" - TEST_DEV=/dev/sdb1 - SCRATCH_DEV=/dev/sdb2 - SCRATCH_LOGDEV=/dev/sdb5 - SCRATCH_RTDEV=/dev/sdb6 - TEST_DIR=/qa/test - SCRATCH_MNT=/qa/scratch - ;; - *) - echo "common.config: Error: need to define parameters for host $HOST" - exit 1 - ;; -esac +known_hosts() +{ + case "$HOST" + in + bruce) + MODULAR=0 + EMAIL="nathans@larry" + SCRATCH_MNT=/mnt/xfs0 + SCRATCH_DEV=/dev/sdb5 + SCRATCH_LOGDEV=/dev/sda11 + TEST_DIR=/mnt/xfs1 + TEST_DEV=/dev/sdc3 + TEST_LOGDEV=/dev/sda9 + TAPE_DEV=/dev/st0 + RMT_TAPE_DEV=bruce:/dev/st0 + RMT_IRIXTAPE_DEV=snort:/dev/tape + RMT_TAPE_USER=guest + ;; + sherman) + TEST_DEV=/dev/sda10 + TEST_DIR=/mnt/xfs1 + SCRATCH_DEV=/dev/sda9 + SCRATCH_MNT=/mnt/xfs0 + ;; + flutz) + MODULAR=0 + EMAIL="nathans@larry" + TEST_DEV=/dev/sda5 + TEST_LOGDEV=/dev/sda9 + TEST_DIR=/xfsqa1 + SCRATCH_DEV=/dev/sda6 + SCRATCH_LOGDEV=/dev/sda7 + SCRATCH_MNT=/xfsqa2 + TAPE_DEV=/dev/st0 + RMT_TAPE_DEV=bruce:/dev/st0 + RMT_IRIXTAPE_DEV=snort:/dev/tape + RMT_TAPE_USER=guest + ;; + frodo) + MODULAR=0 + EMAIL="nathans@larry" + TEST_DEV=/dev/hda6 + TEST_DIR=/mnt/test + SCRATCH_DEV=/dev/hda7 + SCRATCH_MNT=/mnt/scratch + SCRATCH_LOGDEV=/dev/hda9 + ;; + goldfish) + MODULAR=0 + TEST_DEV=/dev/hdc1 + TEST_DIR=/mnt/xfs0 + SCRATCH_DEV=/dev/hdc2 + SCRATCH_MNT=/mnt/xfs1 + SCRATCH_LOGDEV=/dev/hdc3 + ;; + lord) + TEST_DIR=/xfs + TEST_DEV=/dev/sda5 + SCRATCH_DEV=/dev/hda7 + SCRATCH_LOGDEV=/dev/sda6 + SCRATCH_MNT=/xfs1 + ;; + burst) + TEST_DIR=/xfs + TEST_DEV=/dev/hda3 + SCRATCH_DEV=/dev/hda7 + SCRATCH_MNT=/scratch + ;; + lumpy) + TEST_DEV=/dev/sdc5 + TEST_DIR=/mnt/scratch_0 + SCRATCH_DEV=/dev/sdc7 + SCRATCH_MNT=/mnt/scratch_2 + ;; + bongo) + TEST_DEV=/dev/hda8 + TEST_DIR=/xfs1 + SCRATCH_DEV=/dev/hda9 + SCRATCH_MNT=/xfs2 + SCRATCH_LOGDEV=/dev/hda10 + SCRATCH_RTDEV=/dev/hda11 + ;; + surly) + TEST_DEV=/dev/hda9 + TEST_DIR=/mnt/xfs1 + SCRATCH_DEV=/dev/hda8 + SCRATCH_MNT=/mnt/xfs0 + SCRATCH_LOGDEV=/dev/hda10 + TAPE_DEV=/dev/st0 + RMT_TAPE_DEV=fuzzy:/dev/st0 + RMT_IRIXTAPE_DEV=blub:/dev/tape + RMT_TAPE_USER=guest + ;; + permit) + TEST_DEV=/dev/sdc1 + TEST_DIR=/mnt/xfs0 + SCRATCH_DEV=/dev/sdd1 + SCRATCH_MNT=/mnt/xfs1 + ;; + indra) + TEST_DEV=/dev/sdb1 + TEST_DIR=/mnt/xfs0 + SCRATCH_DEV=/dev/sdb2 + SCRATCH_MNT=/mnt/xfs1 + ;; + usermode) + TEST_DEV=/dev/ubd/1 + TEST_DIR=/mnt/test + SCRATCH_DEV=/dev/ubd/2 + SCRATCH_MNT=/mnt/scratch + SCRATCH_RTDEV=/dev/ubd/3 + SCRATCH_LOGDEV=/dev/ubd/4 + ;; + lite) + TEST_DEV=/dev/sda1 + TEST_DIR=/mnt/sda1 + SCRATCH_DEV=/dev/sda2 + SCRATCH_MNT=/mnt/sda2 + SCRATCH_LOGDEV=/dev/sda3 + ;; + dmfnt2) + TEST_DEV=/dev/sda6 + TEST_DIR=/mnt/test + SCRATCH_DEV=/dev/sdc6 + SCRATCH_MNT=/mnt/scratch + TAPE_DEV=/dev/st0 + RMT_TAPE_DEV=longhorn:/dev/tape + # RMT_IRIXTAPE_DEV=longhorn:/dev/tape + RMT_TAPE_USER=guest + ;; + lab343) + MODULAR=0 + EMAIL="hch@sgi.com" + TEST_DEV=/dev/sdb1 + SCRATCH_DEV=/dev/sdb2 + SCRATCH_LOGDEV=/dev/sdb5 + SCRATCH_RTDEV=/dev/sdb6 + TEST_DIR=/qa/test + SCRATCH_MNT=/qa/scratch + ;; + *) + echo "Error: need to define parameters for host $HOST" + exit 1 + ;; + esac +} + +if [ -f "$HOST_OPTIONS" ]; then + source "$HOST_OPTIONS" +else + known_hosts +fi if [ ! -b "$TEST_DEV" ] then diff --git a/common.rc b/common.rc index 1ad70660..3d4b81ed 100644 --- a/common.rc +++ b/common.rc @@ -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 diff --git a/setup b/setup index f3cfb463..3f75a383 100755 --- a/setup +++ b/setup @@ -8,10 +8,11 @@ fi [ "$USE_EXTERNAL" != yes ] && USE_EXTERNAL="no" [ "$USE_LBD_PATCH" = yes ] || USE_LBD_PATCH="no" +[ -x "$FSTYP" ] && FSTYP="xfs" cat <