e53c22bd797884b3a00efd42bce2c6d65147883a
[xfstests-dev.git] / 111
1 #! /bin/sh
2 #
3 #-----------------------------------------------------------------------
4 # Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
5 #
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
9 #
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 #
19 #-----------------------------------------------------------------------
20 #
21 # FS QA Test No. 111
22 #
23 # Infinite xfs_bulkstat bad-inode loop case from Roger Willcocks.
24 #
25 # creator
26 owner=nathans@sgi.com
27
28 seq=`basename $0`
29 echo "QA output created by $seq"
30
31 here=`pwd`
32 tmp=/tmp/$$
33 status=1        # failure is the default!
34 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
35
36 # get standard environment, filters and checks
37 . ./common.rc
38 . ./common.filter
39
40 # real QA test starts here
41 _supported_fs xfs
42 _supported_os Linux
43 _require_scratch
44
45 [ "$XFS_FSR_PROG" = "" ] && _notrun "xfs_fsr not found"
46
47 # real QA test starts here
48 umount $SCRATCH_DEV 2>/dev/null
49 MKFS_OPTIONS="-bsize=4096"
50 MOUNT_OPTIONS="-o noatime"
51 _scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
52 _scratch_mount
53
54 echo Create some files
55 I=0
56 while [ $I -lt 1000 ]
57 do
58     cp src/itrash.c $SCRATCH_MNT/${I}
59     let I=$I+1
60 done
61 umount $SCRATCH_DEV
62
63 echo Blat inode clusters
64 src/itrash $SCRATCH_DEV
65
66 _scratch_mount
67
68 echo Attempting bulkstat
69 #src/bstat -q $SCRATCH_MNT
70 xfs_fsr $SCRATCH_MNT
71
72 status=0
73 exit