Fix menu items order
[xfstests-dev.git] / 141
1 #! /bin/sh
2 # FSQA Test No. 141
3 #
4 # Test for xfs_io mmap read problem
5 #
6 #-----------------------------------------------------------------------
7 #  Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
8 #-----------------------------------------------------------------------
9 #
10 # creator
11 owner=bnaujok@sgi.com
12
13 seq=`basename $0`
14 echo "QA output created by $seq"
15
16 here=`pwd`
17 tmp=/tmp/$$
18 status=1    # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
20
21 _cleanup()
22 {
23     _cleanup_testdir
24 }
25
26 # get standard environment, filters and checks
27 . ./common.rc
28 . ./common.filter
29
30 # real QA test starts here
31 _supported_fs xfs
32 _supported_os Linux
33
34 _setup_testdir
35 _require_scratch
36 _scratch_mkfs_xfs >/dev/null 2>&1
37 _scratch_mount
38
39 # create file, mmap a region and mmap read it
40 file=$SCRATCH_MNT/mmap
41
42 xfs_io -f -c "pwrite 0 64k" -c "mmap 16k 16k" -c "mread -r" $file > /dev/null
43
44 rm -f $file
45
46 status=0
47 exit