4 # * like 054 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
12 # modify it under the terms 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,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #-----------------------------------------------------------------------
28 seqres=$RESULT_DIR/$seq
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
34 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
36 # get standard environment, filters and checks
44 out=$SCRATCH_MNT/fsstress
46 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
47 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
48 _echofull "calling fsstress $param -m8 -n $count"
49 FSSTRESS_ARGS=`_scale_fsstress_args $param $FSSTRESS_AVOID -m 8 -n $count -d $out`
50 if ! $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full 2>&1
52 _echofull "fsstress failed"
68 # real QA test starts here
70 _supported_os IRIX Linux
72 rm -f $seqres.full $tmp.*
74 _require_scratch_shutdown
77 QUOTA_OPTION=`_get_quota_option`
80 _scratch_unmount >/dev/null 2>&1
82 _get_log_configs > $tmp.seq.params
85 | while read mkfs mnt restofline
87 if [ "$mkfs" = "#" ]; then
91 echo "--- mkfs=$mkfs, mnt=$mnt ---" >> $seqres.full
92 export MKFS_OPTIONS="-l $mkfs"
93 export MOUNT_OPTIONS="-o $mnt"
97 _scratch_mkfs >>$seqres.full 2>&1
98 if [ $? -ne 0 ] ; then
99 _echofull "mkfs failed: $MKFS_OPTIONS"
105 if ! _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1; then
106 _echofull "mount failed: $MOUNT_OPTIONS"
110 # create the metadata
113 # check before on what FS should look like
114 _echofull "ls -RF SCRATCH_MNT"
115 ls -RF $SCRATCH_MNT >$tmp.ls1
118 src/godown -v -f $SCRATCH_MNT >> $seqres.full
121 _scratch_unmount >>$seqres.full 2>&1 \
122 || _fail "umount failed"
124 _echofull "logprint after going down..."
127 _full "logprint headers"
128 _scratch_xfs_logprint -n >>$seqres.full 2>&1
130 _echofull "mount with replay"
131 _scratch_mount $QUOTA_OPTION >>$seqres.full 2>&1 \
132 || _fail "mount failed: $MOUNT_OPTIONS"
134 # check on what FS looks like after log recovery
135 _echofull "ls -RF SCRATCH_MNT"
136 ls -RF $SCRATCH_MNT >$tmp.ls2
138 _echofull "diff ls before and after"
139 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
144 _echofull "logprint after mount and replay..."
147 if _check_scratch_fs; then
148 _echofull "filesystem is checked ok"
150 _echofull "filesystem is NOT ok"