mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
First cut at a framework for running benchmarks along with all of the
functional tests we have. Aim is to get wind of performance regressions as changes are checked in, rather than at some arbitrary point down the track. Still a bit of work to do wrt this framework though.
This commit is contained in:
+44
-22
@@ -53,35 +53,32 @@
|
||||
|
||||
#
|
||||
# - This script is shared by the stress test system and the auto-qa
|
||||
# system
|
||||
# system (includes both regression test and benchmark components).
|
||||
# - TEST_DEV & TEST_DIR must be assigned.
|
||||
# - this script shouldn't make any assertions about filesystem
|
||||
# validity or mountedness.
|
||||
#
|
||||
|
||||
_readlink()
|
||||
{
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Usage: _readlink filename" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
HOST=`hostname -s`
|
||||
MODULAR=0 # using XFS as a module or not
|
||||
BOOT="/boot" # install target for kernels
|
||||
export EXTRA=${EXTRA:=-xfs-qa}
|
||||
|
||||
perl -e "\$in=\"$1\";" -e '
|
||||
$lnk = readlink($in);
|
||||
if ($lnk =~ m!^/.*!) {
|
||||
print "$lnk\n";
|
||||
}
|
||||
else {
|
||||
chomp($dir = `dirname $in`);
|
||||
print "$dir/$lnk\n";
|
||||
}'
|
||||
}
|
||||
# general parameters (mainly for auto-qa)
|
||||
SOAK_PROC=3 # -p option to fsstress
|
||||
SOAK_STRESS=10000 # -n option to fsstress
|
||||
SOAK_PASSES=-1 # count of repetitions of fsstress (while soaking)
|
||||
BENCH_PASSES=5 # count of repetitions of benchmarks (want averages)
|
||||
EMAIL=root@localhost # where auto-qa will send its status messages
|
||||
export MKFS_OPTIONS=${MKFS_OPTIONS:=-bsize=4096}
|
||||
export MOUNT_OPTIONS=${MOUNT_OPTIONS:=-ologbufs=2}
|
||||
export MALLOCLIB=${MALLOCLIB:=/usr/lib/libefence.a}
|
||||
|
||||
|
||||
case `hostname -s`
|
||||
case "$HOST"
|
||||
in
|
||||
bruce)
|
||||
MODULAR=0
|
||||
EMAIL="nathans@larry"
|
||||
TEST_DEV=/dev/sda10
|
||||
TEST_DIR=/mnt/xfs1
|
||||
SCRATCH_DEV=/dev/sda9
|
||||
@@ -99,6 +96,8 @@ in
|
||||
SCRATCH_MNT=/mnt/xfs0
|
||||
;;
|
||||
sagan)
|
||||
MODULAR=1
|
||||
EMAIL="tes@larry"
|
||||
TEST_DEV=/dev/sda6
|
||||
TEST_DIR=/mnt/xfs0
|
||||
SCRATCH_DEV=/dev/sda7
|
||||
@@ -109,12 +108,16 @@ in
|
||||
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
|
||||
;;
|
||||
troppo)
|
||||
MODULAR=0
|
||||
EMAIL="kaos@larry"
|
||||
TEST_DEV=/dev/hdb13
|
||||
TEST_DIR=/mnt/test
|
||||
SCRATCH_DEV=/dev/hdb14
|
||||
@@ -186,7 +189,7 @@ in
|
||||
SCRATCH_MNT=/mnt/sda2
|
||||
SCRATCH_LOGDEV=/dev/sda3
|
||||
;;
|
||||
dmfnt2)
|
||||
dmfnt2)
|
||||
TEST_DEV=/dev/sda6
|
||||
TEST_DIR=/mnt/test
|
||||
SCRATCH_DEV=/dev/sdc6
|
||||
@@ -197,7 +200,7 @@ in
|
||||
RMT_TAPE_USER=guest
|
||||
;;
|
||||
*)
|
||||
echo "common.config: Error: need to define parameters for host `hostname -s`"
|
||||
echo "common.config: Error: need to define parameters for host $HOST"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -226,6 +229,25 @@ then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
_readlink()
|
||||
{
|
||||
if [ $# -ne 1 ]
|
||||
then
|
||||
echo "Usage: _readlink filename" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
perl -e "\$in=\"$1\";" -e '
|
||||
$lnk = readlink($in);
|
||||
if ($lnk =~ m!^/.*!) {
|
||||
print "$lnk\n";
|
||||
}
|
||||
else {
|
||||
chomp($dir = `dirname $in`);
|
||||
print "$dir/$lnk\n";
|
||||
}'
|
||||
}
|
||||
|
||||
# if devfs is running expand the full /dev/.. pathname - this is what will be
|
||||
# returned by utilities such as mount
|
||||
[ -L "$TEST_DEV" ] && TEST_DEV=`_readlink $TEST_DEV`
|
||||
|
||||
Reference in New Issue
Block a user