generic: test deadlock on O_DIRECT|O_DSYNC
[xfstests-dev.git] / tests / generic / 522
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2018 Oracle.  All Rights Reserved.
4 #
5 # FS QA Test No. 522
6 #
7 # Long-soak buffered fsx test
8 #
9 seq=`basename $0`
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
12
13 here=`pwd`
14 tmp=/tmp/$$
15 status=1        # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
17
18 _cleanup()
19 {
20         cd /
21         rm -f $tmp.*
22 }
23
24 # get standard environment, filters and checks
25 . ./common/rc
26 . ./common/filter
27
28 # remove previous $seqres.full before test
29 rm -f $seqres.full
30
31 # real QA test starts here
32
33 # Modify as appropriate.
34 _supported_fs generic
35 _supported_os Linux
36 _require_test
37
38 # Run fsx for a million ops or more
39 nr_ops=$((1000000 * TIME_FACTOR))
40 op_sz=$((128000 * LOAD_FACTOR))
41 file_sz=$((600000 * LOAD_FACTOR))
42 fsx_file=$TEST_DIR/fsx.$seq
43
44 fsx_args=(-q)
45 fsx_args+=(-N $nr_ops)
46 fsx_args+=(-p $((nr_ops / 100)))
47 fsx_args+=(-o $op_sz)
48 fsx_args+=(-l $file_sz)
49
50 run_fsx "${fsx_args[@]}" | sed -e '/^fsx.*/d'
51
52 # success, all done
53 echo Silence is golden
54 status=0
55 exit