2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc. All Rights Reserved.
7 # external log uuid/format tests (TODO - version 2 log format)
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
18 # get standard environment, filters and checks
22 # real QA test starts here
29 echo " *** mount (expect success)"
30 if ! _try_scratch_mount
32 echo " !!! mount failed (expecting success)"
40 echo " !!! umount failed (expecting success)"
48 echo " *** mount (expect failure)"
49 if _try_scratch_mount >$tmp.err 2>&1
52 echo " !!! mount succeeded (expecting failure)"
58 _check_require_logdev()
60 echo " *** mount without logdev (expect failure)"
61 if mount -t xfs $SCRATCH_DEV $SCRATCH_MNT >$tmp.err 2>&1
64 echo " !!! mount succeeded (expecting failure)"
72 echo " !!! unexpected XFS command failure"
77 # real QA test starts here
83 # this test only works for version 1 logs currently
86 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
88 _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
89 _filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
91 [ $lversion -ne 1 ] && \
92 _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
94 _require_test_program "loggen"
100 _scratch_xfs_db -x -l $SCRATCH_LOGDEV -c "uuid 02020202-0202-0202-0202-020202020202"
101 [ $? -ne 0 ] && _unexpected
105 $here/src/loggen -z 100 >$SCRATCH_LOGDEV
108 echo "*** write clean log"
109 $here/src/loggen -u 2 -f 1 -m 1 -z 100 >$SCRATCH_LOGDEV
112 echo "*** write clean log (different format)"
113 $here/src/loggen -u 2 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
116 echo "*** write clean log (different uuid)"
117 $here/src/loggen -u 7 -m 1 -z 100 >$SCRATCH_LOGDEV
120 echo "*** write clean log (different uuid & format)"
121 $here/src/loggen -u 7 -f 99 -m 1 -z 100 >$SCRATCH_LOGDEV
124 echo "*** write dirty log"
125 $here/src/loggen -u 2 -e 1 -z 100 >$SCRATCH_LOGDEV
128 echo "*** write dirty log (different format)"
129 $here/src/loggen -u 2 -f 99 -e 1 -z 100 >$SCRATCH_LOGDEV
132 echo "*** write dirty log (irix style)"
133 $here/src/loggen -u 0 -f 0 -e 1 -z 100 >$SCRATCH_LOGDEV
136 echo "*** write large dirty log"
137 $here/src/loggen -u 2 -e 16000 -z 100 >$SCRATCH_LOGDEV
140 echo -e -n "\n\r*** XFS QA 044 - done\n\r\n\r" >/dev/console