generic: add _require_odirect to generic/113 and generic/214
[xfstests-dev.git] / tests / generic / 248
1 #! /bin/bash
2 # FS QA Test No. 248
3 #
4 # Test for pwrite hang problem when writing from mmaped buffer of the same page 
5 #
6 #-----------------------------------------------------------------------
7 #    Copyright (c) 2010 Intel Corporation
8 #
9 #    This program is free software; you can redistribute it and/or modify it
10 #    under the terms of the GNU General Public License as published by the Free
11 #    Software Foundation; version 2 of the License
12 #
13 #    This program is distributed in the hope that it will be useful, but
14 #    WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15 #    or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 #    for more details.
17 #
18 #    You should have received a copy of the GNU General Public License along
19 #    with this program; if not, write to the Free Software Foundation, Inc., 59
20 #    Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #
22 #-----------------------------------------------------------------------
23 #
24
25 seq=`basename $0`
26 seqres=$RESULT_DIR/$seq
27 echo "QA output created by $seq"
28
29 here=`pwd`
30 tmp=/tmp/$$
31 status=1        # failure is the default!
32 trap "_cleanup; exit \$status" 0 1 2 3 15
33
34 _cleanup()
35 {
36     cd /
37     rm -f $tmp.* $TESTFILE
38 }
39
40 # get standard environment, filters and checks
41 . ./common/rc
42 . ./common/filter
43
44 # real QA test starts here
45
46 # Modify as appropriate.
47 _supported_fs generic
48 _supported_os Linux
49 _require_test
50
51 TESTFILE=$TEST_DIR/test_file
52 TEST_PROG=$here/src/pwrite_mmap_blocked
53
54 $TEST_PROG $TESTFILE
55
56 # success, all done
57 status=0
58 exit