fsx/fsstress: round blocksize properly
[xfstests-dev.git] / tests / generic / 617
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Red Hat Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 617
6 #
7 # IO_URING soak direct-IO fsx test, copy from generic/521 but reduce the number
8 # fsx ops to limit the testing time to be an auto group test.
9 #
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17 trap "_cleanup; exit \$status" 0 1 2 3 15
18
19 _cleanup()
20 {
21         cd /
22         rm -f $tmp.*
23 }
24
25 # get standard environment, filters and checks
26 . ./common/rc
27 . ./common/filter
28
29 # remove previous $seqres.full before test
30 rm -f $seqres.full
31
32 # real QA test starts here
33
34 # Modify as appropriate.
35 _supported_fs generic
36 _require_test
37 _require_odirect
38 _require_io_uring
39
40 # Run fsx for 20 thousand ops or more
41 nr_ops=$((20000 * TIME_FACTOR))
42 op_sz=$((128000 * LOAD_FACTOR))
43 file_sz=$((600000 * LOAD_FACTOR))
44 fsx_file=$TEST_DIR/fsx.$seq
45 min_dio_sz=$(_min_dio_alignment)
46
47 fsx_args=(-S 0)
48 fsx_args+=(-U)
49 fsx_args+=(-q)
50 fsx_args+=(-N $nr_ops)
51 fsx_args+=(-p $((nr_ops / 100)))
52 fsx_args+=(-o $op_sz)
53 fsx_args+=(-l $file_sz)
54 fsx_args+=(-r $min_dio_sz)
55 fsx_args+=(-t $min_dio_sz)
56 fsx_args+=(-w $min_dio_sz)
57 fsx_args+=(-Z)
58
59 run_fsx "${fsx_args[@]}" | sed -e '/^fsx.*/d'
60
61 # success, all done
62 echo "Silence is golden"
63 status=0
64 exit