4 # external log uuid/format tests (TODO - version 2 log format)
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or modify it
10 # under the terms of version 2 of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful, but
14 # WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17 # Further, this software is distributed without any warranty that it is
18 # free of the rightful claim of any third person regarding infringement
19 # or the like. Any license provided herein, whether implied or
20 # otherwise, applies only to this software file. Patent licenses, if
21 # any, provided herein do not apply to combinations of this program with
22 # other software, or any other product whatsoever.
24 # You should have received a copy of the GNU General Public License along
25 # with this program; if not, write the Free Software Foundation, Inc., 59
26 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
28 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
29 # Mountain View, CA 94043, or:
33 # For further information regarding this notice, see:
35 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
36 #-----------------------------------------------------------------------
42 echo "QA output created by $seq"
46 status=1 # failure is the default!
47 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
49 # get standard environment, filters and checks
53 # real QA test starts here
60 s/data device: ([\w|\/.-]+)/data device: DDEV/;
61 s/log device: ([\w|\/.-]+) daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
62 s/log file: "([\w|\/.-]+)" daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
63 s/uuid: ([abcdef\d-]+)\s+format: (.+)/uuid: UUID format: FORMAT/;
64 s/skipped (\w+) zeroed blocks/skipped XXX zeroed blocks/;
71 echo " *** mount (expect success)"
74 echo " !!! mount failed (expecting success)"
80 if ! umount $SCRATCH_DEV
82 echo " !!! umount failed (expecting success)"
90 echo " *** mount (expect failure)"
91 if _scratch_mount >$tmp.err 2>&1
94 echo " !!! mount succeeded (expecting failure)"
100 _check_require_logdev()
102 echo " *** mount without logdev (expect failure)"
103 if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
106 echo " !!! mount succeeded (expecting failure)"
114 echo " !!! unexpected XFS command failure"
120 # real QA test starts here
124 echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/console
130 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
132 _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
133 _filter_mkfs <$tmp.mkfs0 2>/dev/null
135 _check_require_logdev
138 xfs_db -x $SCRATCH_DEV -l $SCRATCH_LOGDEV -c "uuid 02020202-0202-0202-0202-020202020202"
139 [ $? -ne 0 ] && _unexpected
143 $here/src/loggen -z 100 >$SCRATCH_LOGDEV
146 echo "*** write clean log"
147 $here/src/loggen -u 2 -f 1 -m 1 -z 100 >$SCRATCH_LOGDEV
150 echo "*** write clean log (different format)"
151 $here/src/loggen -u 2 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
154 echo "*** write clean log (different uuid)"
155 $here/src/loggen -u 7 -m 1 -z 100 >$SCRATCH_LOGDEV
158 echo "*** write clean log (different uuid & format)"
159 $here/src/loggen -u 7 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
162 echo "*** write dirty log"
163 $here/src/loggen -u 2 -e 1 -z 100 >$SCRATCH_LOGDEV
166 echo "*** write dirty log (different format)"
167 $here/src/loggen -u 2 -f 99 -e 1 -z 100 >$SCRATCH_LOGDEV
170 echo "*** write dirty log (irix style)"
171 $here/src/loggen -u 0 -f 0 -e 1 -z 100 >$SCRATCH_LOGDEV
174 echo "*** write large dirty log"
175 $here/src/loggen -u 2 -e 16000 -z 100 >$SCRATCH_LOGDEV
178 echo -e -n "\n\r*** XFS QA 044 - done\n\r\n\r" >/dev/console