blob: a85a647216ab336c81762cb5dca5d55a5657c1d6 [file] [log] [blame]
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2018 Oracle. All Rights Reserved.
#
# FS QA Test 938
#
# Long-soak directio fsx test
#
seq=`basename $0`
seqres=$RESULT_DIR/$seq
echo "QA output created by $seq"
here=`pwd`
tmp=/tmp/$$
status=1 # failure is the default!
trap "_cleanup; exit \$status" 0 1 2 3 15
_cleanup()
{
cd /
rm -f $tmp.*
}
# get standard environment, filters and checks
. ./common/rc
. ./common/filter
# remove previous $seqres.full before test
rm -f $seqres.full
# real QA test starts here
# Modify as appropriate.
_supported_fs generic
_supported_os Linux
_require_test
# Run fsx for a million ops or more
nr_ops=$((1000000 * TIME_FACTOR))
op_sz=$((128000 * LOAD_FACTOR))
file_sz=$((600000 * LOAD_FACTOR))
fsx_file=$TEST_DIR/fsx.$seq
min_dio_sz=$(_min_dio_alignment)
fsx_args=(-q)
fsx_args+=(-N $nr_ops)
fsx_args+=(-p $((nr_ops / 100)))
fsx_args+=(-o $op_sz)
fsx_args+=(-l $file_sz)
fsx_args+=(-r $min_dio_sz)
fsx_args+=(-t $min_dio_sz)
fsx_args+=(-w $min_dio_sz)
fsx_args+=(-Z)
fsx_args+=($fsx_file)
echo "ltp ${fsx_args[@]} $FSX_ARGS" >> $seqres.full
if ! ltp/fsx "${fsx_args[@]}" $FSX_ARGS > $tmp.fsx 2>&1; then
cat $tmp.fsx | tee -a $seqres.full
fi
# success, all done
echo Silence is golden
status=0
exit