generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 585
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2019 Tencent.  All Rights Reserved.
4 #
5 # FS QA Test No. 585
6 #
7 # Regression test for:
8 #    bc56ad8c74b8: ("xfs: Fix deadlock between AGI and AGF with RENAME_WHITEOUT")
9 #
10 . ./common/preamble
11 _begin_fstest auto rename
12
13 # Import common functions.
14 . ./common/filter
15 . ./common/renameat2
16
17 # real QA test starts here
18 _supported_fs generic
19 _require_scratch
20 _require_renameat2 whiteout
21
22 _scratch_mkfs > $seqres.full 2>&1 || _fail "mkfs failed"
23 _scratch_mount >> $seqres.full 2>&1
24
25 # start a create and rename(rename_whiteout) workload. These processes
26 # occur simultaneously may cause the deadlock between AGI and AGF with
27 # RENAME_WHITEOUT.
28 $FSSTRESS_PROG -z -n 150 -p 100 \
29                 -f mknod=5 \
30                 -f rwhiteout=5 \
31                 -d $SCRATCH_MNT/fsstress >> $seqres.full 2>&1
32
33 echo Silence is golden
34
35 # Failure comes in the form of a deadlock.
36
37 # success, all done
38 status=0
39 exit