4 # * like 086 but want to create more/different kinds of metadata
5 # and so will use fsstress
6 # * also can interrupt metadata with godown
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
11 # This program is free software; you can redistribute it and/or modify it
12 # under the terms of version 2 of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful, but
16 # WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 # Further, this software is distributed without any warranty that it is
20 # free of the rightful claim of any third person regarding infringement
21 # or the like. Any license provided herein, whether implied or
22 # otherwise, applies only to this software file. Patent licenses, if
23 # any, provided herein do not apply to combinations of this program with
24 # other software, or any other product whatsoever.
26 # You should have received a copy of the GNU General Public License along
27 # with this program; if not, write the Free Software Foundation, Inc., 59
28 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
30 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
31 # Mountain View, CA 94043, or:
35 # For further information regarding this notice, see:
37 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
38 #-----------------------------------------------------------------------
41 owner=tes@melbourne.sgi.com
44 echo "QA output created by $seq"
48 status=1 # failure is the default!
49 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
51 # get standard environment, filters and checks
58 out=$SCRATCH_MNT/fsstress
60 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
61 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
62 _echofull "calling fsstress $param -m8 -n $count"
63 if ! $here/ltp/fsstress $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
65 _echofull "fsstress failed"
69 # real QA test starts here
71 _supported_os IRIX Linux
73 rm -f $seq.full $tmp.*
78 umount $SCRATCH_DEV >/dev/null 2>&1
80 cat >$tmp.seq.params <<EOF
82 # ------------------------------
83 version=2 logbsize=32k
84 version=2,su=4096 logbsize=32k
85 version=2,su=32768 logbsize=32k
86 version=2 logbsize=64k
87 version=2,su=64k logbsize=64k
88 version=2 logbsize=128k
89 version=2,su=128k logbsize=128k
90 version=2 logbsize=256k
91 version=2,su=256k logbsize=256k
95 | while read mkfs mnt restofline
97 if [ "$mkfs" = "#" ]; then
101 echo "--- mkfs=$mkfs, mnt=$mnt ---"
102 export MKFS_OPTIONS="-l $mkfs"
103 export MOUNT_OPTIONS="-o $mnt"
107 _scratch_mkfs_xfs >>$seq.full 2>&1
108 if [ $? -ne 0 ] ; then
109 _echofull "mkfs failed: $MKFS_OPTIONS"
115 if ! _scratch_mount >>$seq.full 2>&1; then
116 _echofull "mount failed: $MOUNT_OPTIONS"
120 # create the metadata
123 # check before on what FS should look like
124 _echofull "ls -RF SCRATCH_MNT"
125 ls -RF $SCRATCH_MNT >$tmp.ls1
128 src/godown -v -f $SCRATCH_MNT >> $seq.full
131 umount $SCRATCH_DEV >>$seq.full 2>&1 \
132 || _fail "umount failed"
134 _echofull "logprint after going down..."
137 _full "logprint headers"
138 _scratch_xfs_logprint -n >>$seq.full 2>&1
140 _echofull "mount with replay"
141 _scratch_mount >>$seq.full 2>&1 \
142 || _fail "mount failed: $MOUNT_OPTIONS"
144 # check on what FS looks like after log recovery
145 _echofull "ls -RF SCRATCH_MNT"
146 ls -RF $SCRATCH_MNT >$tmp.ls2
148 _echofull "diff ls before and after"
149 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
154 _echofull "logprint after mount and replay..."
157 if _check_scratch_fs; then
158 _echofull "filesystem is checked ok"
160 _echofull "filesystem is NOT ok"