2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2010 Christoph Hellwig. All Rights Reserved.
4 # Copyright (c) 2010 Silicon Graphics, Inc. All Rights Reserved.
8 # Check for file corruption when using the extent size hint on
9 # the normal data subvolume.
11 # http://oss.sgi.com/bugzilla/show_bug.cgi?id=874
13 # Based on a bug report and testcase from Geoffrey Wehrman <gwehrman@sgi.com>.
16 seqres=$RESULT_DIR/$seq
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
28 trap "_cleanup ; exit \$status" 0 1 2 3 15
30 # get standard environment, filters and checks
33 # real QA test starts here
36 _require_fs_space $TEST_DIR 3200000
38 TDIR="${TEST_DIR}/t_holes"
42 # Create the test directory
45 # Set the test directory extsize
46 $XFS_IO_PROG -c "extsize ${EXTSIZE}" ${TDIR}
48 # Create a set of holey files
49 echo "generating ${NFILES} files"
51 for i in $(seq 0 ${NFILES}); do
52 $here/src/t_holes ${TDIR}/${i}
56 echo "comparing files"
59 for i in $(seq 0 ${NFILES}); do
61 while [ ${j} -lt ${NFILES} ] ; do
62 if ! cmp ${TDIR}/${i} ${TDIR}/${j} ; then
69 echo "got ${errcnt} errors"