67e458a3392e77a0d0c07d5f7aebe820d97598e4
[xfstests-dev.git] / 240
1 #! /bin/bash
2 # FS QA Test No. 240
3 #
4 # Test that non-block-aligned aio+dio into holes does not leave
5 # zero'd out portions of the file
6 #
7 # QEMU IO to a file-backed device with misaligned partitions
8 # can send this sort of IO
9 #
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2010 Red Hat, Inc.  All Rights Reserved.
12 #
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
16 #
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20 # GNU General Public License for more details.
21 #
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
25 #-----------------------------------------------------------------------
26 #
27 # creator
28 owner=sandeen@sandeen.net
29
30 seq=`basename $0`
31 echo "QA output created by $seq"
32
33 here=`pwd`
34 tmp=/tmp/$$
35 status=1        # failure is the default!
36 trap "_cleanup; exit \$status" 0 1 2 3 15
37
38 _cleanup()
39 {
40     cd /
41     rm -f $tmp.*
42 }
43
44 # get standard environment, filters and checks
45 . ./common.rc
46 . ./common.filter
47
48 _supported_fs generic
49 _supported_os Linux
50
51 echo "Silence is golden."
52
53 # real QA test starts here
54 rm -f $seq.full
55
56 rm -f $TEST_DIR/aiodio_sparse
57
58 # 2 threads, 4k writes, 16k filesize, stride throug file by 4k, start at 512 offset
59 $here/src/aio-dio-regress/aiodio_sparse2 -i 2 -w 4k -s 16k -n 4k -o 512 "$TEST_DIR/aiodio_sparse"
60
61 status=$?
62 exit