f245c1c54dd60dc558abe96bf210e04fdfc42831
[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 echo "QA output created by $seq"
27
28 here=`pwd`
29 tmp=/tmp/$$
30 status=1        # failure is the default!
31 trap "_cleanup; exit \$status" 0 1 2 3 15
32
33 _cleanup()
34 {
35     cd /
36     rm -f $tmp.* $TESTFILE
37 }
38
39 # get standard environment, filters and checks
40 . ./common.rc
41 . ./common.filter
42
43 # real QA test starts here
44
45 # Modify as appropriate.
46 _supported_fs generic
47 _supported_os Linux
48
49 TESTFILE=$TEST_DIR/test_file
50 TEST_PROG=$here/src/pwrite_mmap_blocked
51
52 $TEST_PROG $TESTFILE
53
54 # success, all done
55 status=0
56 exit