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