mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
a860a167d8
fstests only supports Linux, so get rid of this unnecessary predicate. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
64 lines
1.3 KiB
Bash
Executable File
64 lines
1.3 KiB
Bash
Executable File
#! /bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
#
|
|
# perf/001 Test
|
|
#
|
|
# Buffered random write performance test.
|
|
#
|
|
seq=`basename $0`
|
|
seqres=$RESULT_DIR/$seq
|
|
echo "QA output created by $seq"
|
|
|
|
here=`pwd`
|
|
tmp=/tmp/$$
|
|
fio_config=$tmp.fio
|
|
fio_results=$tmp.json
|
|
status=1 # failure is the default!
|
|
trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
|
|
|
|
# get standard environment, filters and checks
|
|
. ./common/rc
|
|
. ./common/filter
|
|
. ./common/perf
|
|
|
|
# real QA test starts here
|
|
_supported_fs generic
|
|
_require_scratch
|
|
_require_block_device $SCRATCH_DEV
|
|
_require_fio_results
|
|
|
|
rm -f $seqres.full
|
|
|
|
_size=$((16 * $LOAD_FACTOR))
|
|
cat >$fio_config <<EOF
|
|
[t1]
|
|
directory=${SCRATCH_MNT}
|
|
allrandrepeat=1
|
|
readwrite=randwrite
|
|
size=${_size}G
|
|
ioengine=psync
|
|
end_fsync=1
|
|
fallocate=none
|
|
EOF
|
|
|
|
_require_fio $fio_config
|
|
|
|
_fio_results_init
|
|
|
|
# We are going to write at least 16gib, make sure our scratch fs is large enough
|
|
# to fit and not deal with any enospc overhead.
|
|
_size=$(($_size * 4 * 1024 * 1024))
|
|
_scratch_mkfs >> $seqres.full 2>&1
|
|
_scratch_mount
|
|
_require_fs_space $SCRATCH_MNT $_size
|
|
|
|
cat $fio_config >> $seqres.full
|
|
$FIO_PROG --output-format=json --output=$fio_results $fio_config
|
|
|
|
_scratch_unmount
|
|
cat $fio_results >> $seqres.full
|
|
_fio_results_compare $seq $fio_results
|
|
echo "Silence is golden"
|
|
status=0; exit
|