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 #-----------------------------------------------------------------------
34 echo "QA output created by $seq"
38 status=1 # failure is the default!
45 trap "_cleanup ; exit \$status" 0 1 2 3 15
47 # get standard environment, filters and checks
50 # real QA test starts here
54 TDIR="${TEST_DIR}/t_holes"
58 # Create the test directory
61 # Set the test directory extsize
62 xfs_io -c "extsize ${EXTSIZE}" ${TDIR}
64 # Create a set of holey files
65 echo "generating ${NFILES} files"
67 for i in $(seq 0 ${NFILES}); do
68 $here/src/t_holes ${TDIR}/${i}
72 echo "comparing files"
75 for i in $(seq 0 ${NFILES}); do
77 while [ ${j} -lt ${NFILES} ] ; do
78 if ! cmp ${TDIR}/${i} ${TDIR}/${j} ; then
85 echo "got ${errcnt} errors"