generic: test MADV_POPULATE_READ with IO errors
[xfstests-dev.git] / tests / generic / 141
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FSQA Test No. 141
6 #
7 # Test for xfs_io mmap read problem
8 #
9 . ./common/preamble
10 _begin_fstest rw auto quick
11
12 # Import common functions.
13 . ./common/filter
14
15 # real QA test starts here
16 _supported_fs generic
17
18 _require_scratch
19 _scratch_mkfs >/dev/null 2>&1
20 _scratch_mount
21
22 # create file, mmap a region and mmap read it
23 file=$SCRATCH_MNT/mmap
24
25 $XFS_IO_PROG -f -c "pwrite 0 1024k" -c "mmap 64k 64k" -c "mread -r" $file > /dev/null
26
27 rm -f $file
28
29 status=0
30 exit