5 # external log uuid/format tests
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved.
10 # This program is free software; you can redistribute it and/or modify it
11 # under the terms of version 2 of the GNU General Public License as
12 # published by the Free Software Foundation.
14 # This program is distributed in the hope that it would be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
18 # Further, this software is distributed without any warranty that it is
19 # free of the rightful claim of any third person regarding infringement
20 # or the like. Any license provided herein, whether implied or
21 # otherwise, applies only to this software file. Patent licenses, if
22 # any, provided herein do not apply to combinations of this program with
23 # other software, or any other product whatsoever.
25 # You should have received a copy of the GNU General Public License along
26 # with this program; if not, write the Free Software Foundation, Inc., 59
27 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
29 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
30 # Mountain View, CA 94043, or:
34 # For further information regarding this notice, see:
36 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
37 #-----------------------------------------------------------------------
43 echo "QA output created by $seq"
47 status=1 # failure is the default!
48 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
50 # get standard environment, filters and checks
54 # real QA test starts here
61 s/data device: ([\w|\/]+)/data device: DDEV/;
62 s/log device: ([\w|\/]+) daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
63 s/log file: "([\w|\/]+)" daddr: (\d+) length: (\d+)/log device: LDEV daddr: XXX length: XXX/;
64 s/uuid: ([abcdef\d-]+)\s+format: (.+)/uuid: UUID format: FORMAT/;
65 s/skipped (\w+) zeroed blocks/skipped XXX zeroed blocks/;
72 echo " *** mount (expect success)"
73 if ! mount -t xfs -o logdev=$SCRATCH_LOGDEV $SCRATCH_DEV $SCRATCH_MNT
75 echo " !!! mount failed (expecting success)"
81 if ! umount $SCRATCH_DEV
83 echo " !!! umount failed (expecting success)"
91 echo " *** mount (expect failure)"
92 if mount -t xfs -o logdev=$SCRATCH_LOGDEV $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
95 echo " !!! mount succeeded (expecting failure)"
101 _check_require_logdev()
103 echo " *** mount without logdev (expect failure)"
104 if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
107 echo " !!! mount succeeded (expecting failure)"
115 # real QA test starts here
119 echo -e -n "\n\r*** XFS QA 044 - expect mount failure messages\n\r\n\r" >/dev/console
122 mkfs -t xfs -f -l logdev=$SCRATCH_LOGDEV,size=4096b $SCRATCH_DEV | _filter_mkfs 2>/dev/null
124 _check_require_logdev
127 xfs_db -x $SCRATCH_DEV -l $SCRATCH_LOGDEV -c "uuid 02020202-0202-0202-0202-020202020202" \
132 $here/src/loggen -z 100 >$SCRATCH_LOGDEV
135 echo "*** write clean log"
136 $here/src/loggen -u 2 -f 1 -m 1 -z 100 >$SCRATCH_LOGDEV
139 echo "*** write clean log (different format)"
140 $here/src/loggen -u 2 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
143 echo "*** write clean log (different uuid)"
144 $here/src/loggen -u 7 -m 1 -z 100 >$SCRATCH_LOGDEV
147 echo "*** write clean log (different uuid & format)"
148 $here/src/loggen -u 7 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
151 echo "*** write dirty log"
152 $here/src/loggen -u 2 -e 1 -z 100 >$SCRATCH_LOGDEV
155 echo "*** write dirty log (different format)"
156 $here/src/loggen -u 2 -f 99 -e 1 -z 100 >$SCRATCH_LOGDEV
159 echo "*** write dirty log (irix style)"
160 $here/src/loggen -u 0 -f 0 -e 1 -z 100 >$SCRATCH_LOGDEV
163 echo "*** write large dirty log"
164 $here/src/loggen -u 2 -e 16000 -z 100 >$SCRATCH_LOGDEV
167 echo -e -n "\n\r*** XFS QA 044 - done\n\r\n\r" >/dev/console