generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 114
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 114
6 #
7 # Test races while extending past EOF via sub-block AIO writes
8 #
9 . ./common/preamble
10 _begin_fstest rw aio auto quick
11
12 # Override the default cleanup function.
13 _cleanup()
14 {
15     cd /
16     rm -f $TEST_DIR/tst-aio-dio-eof-race
17 }
18
19 # Import common functions.
20 . ./common/filter
21
22 _supported_fs generic
23
24 _require_test
25 _require_sparse_files
26 _require_aiodio aio-dio-eof-race
27
28 # Test does 512 byte DIO, so make sure that'll work
29 logical_block_size=`_min_dio_alignment $TEST_DEV`
30
31 if [ "$logical_block_size" -gt "512" ]; then
32         _notrun "device block size: $logical_block_size greater than 512"
33 fi
34
35 # We don't mind 512-byte fs blocks; the IOs won't be sub-block,
36 # but the test should still pass, even if it doesn't stress the code
37 # we're targeting.
38
39 # Note, this test does several extending loops internally
40 $AIO_TEST $TEST_DIR/tst-aio-dio-eof-race
41
42 status=$?
43 exit