#!/bin/sh
#
-# Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
+# Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as
# configuration (you could tune this)
-BOOT="/boot"
-SOAK_PASSES="-1"
-SOAK_STRESS="10000"
-SOAK_PROC="3"
-export EXTRA=${EXTRA:=-xfs-qa}
-export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
-export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
-export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
-
_log()
{
echo "$*" >&2
echo "$*" >> $LOG
+ sync
}
_fail()
case $state
in
cron*)
- mail -s "XFS QA status report" $ADMINEMAIL \
+ mail -s "XFS QA status report" $EMAIL \
< $LOG 2>&1
;;
esac
SH="/bin/sh"
LOG="$ROOT/qa.log"
-# need to add auto-qa hosts here
-
-case $HOST
-in
- bruce)
- EMAIL="nathans@larry"
- ADMINEMAIL="nathans@larry"
- MODULAR=0
- ;;
- sagan)
- EMAIL="tes@larry"
- ADMINEMAIL="tes@larry"
- MODULAR=1
- ;;
- troppo)
- EMAIL="kaos@larry"
- ADMINEMAIL="kaos@larry"
- MODULAR=0
- ;;
- frodo)
- EMAIL="nathans@larry"
- ADMINEMAIL="nathans@larry"
- MODULAR=0
- ;;
- *)
- _fail "auto-qa: no configuration information for host '$HOST'"
- ;;
-esac
-
# do some cleanup on exit
_cleanup()
*restart)
_log " *** select qa kernel"
- _sudo /sbin/lilo -R linux-xfs-qa 2>&1 \
+ _sudo /sbin/lilo -R linux-xfs-qa $KERNEL_OPTIONS 2>&1 \
|| _fail " !!! lilo failed"
_log " *** prepare to restart"
new_state="run"
;;
-
soak-run)
cd $QADIR
_log " *** run soak test"
- _sudo ./soak $SOAK_PASSES $SOAK_STRESS $SOAK_PROC\
+ _sudo ./soak $SOAK_PASSES $SOAK_STRESS $SOAK_PROC \
|| _fail " !!! failed to run soak test"
new_state="done"
;;
+ bench-run)
+ cd $QADIR
+
+ _log " *** run benchmarks"
+ _sudo ./bench $BENCH_PASSES `id -nu && id -ng` \
+ || _fail " !!! failed to run benchmarks"
+
+ _log ""
+ _log " *** send results mail"
+ mail -s "XFS QA benchmark results" $EMAIL < $QADIR/bench.out 2>&1
+
+ new_state="done"
+ ;;
+
*run)
cd $QADIR