4 # Check for file corruption when using the extent size hint on
5 # the normal data subvolume.
7 # http://oss.sgi.com/bugzilla/show_bug.cgi?id=874
9 # Based on a bug report and testcase from Geoffrey Wehrman <gwehrman@sgi.com>.
11 #-----------------------------------------------------------------------
12 # Copyright (c) 2010 Christoph Hellwig. All Rights Reserved.
13 # Copyright (c) 2010 Silicon Graphics, Inc. All Rights Reserved.
15 # This program is free software; you can redistribute it and/or
16 # modify it under the terms of the GNU General Public License as
17 # published by the Free Software Foundation.
19 # This program is distributed in the hope that it would be useful,
20 # but WITHOUT ANY WARRANTY; without even the implied warranty of
21 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 # GNU General Public License for more details.
24 # You should have received a copy of the GNU General Public License
25 # along with this program; if not, write the Free Software Foundation,
26 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
28 #-----------------------------------------------------------------------
32 seqres=$RESULT_DIR/$seq
33 echo "QA output created by $seq"
37 status=1 # failure is the default!
44 trap "_cleanup ; exit \$status" 0 1 2 3 15
46 # get standard environment, filters and checks
49 # real QA test starts here
53 _require_fs_space $TEST_DIR 3200000
55 TDIR="${TEST_DIR}/t_holes"
59 # Create the test directory
62 # Set the test directory extsize
63 $XFS_IO_PROG -c "extsize ${EXTSIZE}" ${TDIR}
65 # Create a set of holey files
66 echo "generating ${NFILES} files"
68 for i in $(seq 0 ${NFILES}); do
69 $here/src/t_holes ${TDIR}/${i}
73 echo "comparing files"
76 for i in $(seq 0 ${NFILES}); do
78 while [ ${j} -lt ${NFILES} ] ; do
79 if ! cmp ${TDIR}/${i} ${TDIR}/${j} ; then
86 echo "got ${errcnt} errors"