generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 239
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 239
6 #
7 # Read from a sparse file immedialy after filling a hole to test for races
8 # in unwritten extent conversion.
9 #
10 . ./common/preamble
11 _begin_fstest auto aio rw
12
13 # Override the default cleanup function.
14 _cleanup()
15 {
16     cd /
17     rm -f $TEST_DIR/tst-aio-dio-sparse-unwritten
18 }
19
20 # Import common functions.
21 . ./common/filter
22
23 _supported_fs generic
24
25 _require_test
26 _require_sparse_files
27 _require_aiodio aio-dio-hole-filling-race
28
29 echo "Silence is golden"
30
31 for i in `seq 1 500`; do
32   $AIO_TEST $TEST_DIR/tst-aio-dio-hole-filling-race || break
33 done
34
35 status=$?
36 exit