xfs: fix old fuzz test invocations of xfs_repair
[xfstests-dev.git] / tests / generic / 586
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0-or-later
3 # Copyright (c) 2019, Oracle and/or its affiliates.  All Rights Reserved.
4 #
5 # FS QA Test No. 586
6 #
7 # Race an appending aio dio write to the second block of a file while
8 # simultaneously fallocating to the first block.  Make sure that we end up
9 # with a two-block file.
10
11 seq=`basename $0`
12 seqres=$RESULT_DIR/$seq
13 echo "QA output created by $seq"
14
15 here=`pwd`
16 tmp=/tmp/$$
17 status=1    # failure is the default!
18 trap "_cleanup; exit \$status" 0 1 2 3 15
19
20 _cleanup()
21 {
22         cd /
23         rm -f $tmp.* $testfile
24 }
25
26 # get standard environment, filters and checks
27 . ./common/rc
28
29 # real QA test starts here
30 _supported_fs generic
31 _require_aiodio "aio-dio-append-write-fallocate-race"
32 _require_test
33 _require_xfs_io_command "falloc"
34
35 rm -f $seqres.full
36
37 testfile=$TEST_DIR/test-$seq
38 $AIO_TEST $testfile 100 >> $seqres.full
39
40 echo Silence is golden.
41 # success, all done
42 status=0
43 exit