common: kill _supported_os
[xfstests-dev.git] / tests / xfs / 018
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2002 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 018
6 #
7 # xfs_logprint test - test v2 logs of different LR sizes
8 #
9 seqfull=$0
10 seq=`basename $0`
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
13
14 here=`pwd`
15 tmp=/tmp/$$
16 status=1        # failure is the default!
17
18 # get standard environment, filters and checks
19 . ./common/rc
20 . ./common/filter
21 . ./common/log
22
23 _cleanup()
24 {
25     cd /
26     _cleanup_logfiles
27     rm -f $tmp.*
28     _scratch_unmount 2>/dev/null
29 }
30 trap "_cleanup; exit \$status" 0 1 2 3 15
31
32 # real QA test starts here
33 _supported_fs xfs
34 # prelim
35 rm -f $seqres.full $tmp.*
36 _require_scratch
37 _require_v2log
38
39 echo "*** init FS"
40 _scratch_unmount >/dev/null 2>&1
41
42 cat >$tmp.seq.params <<EOF
43 # mkfs-opt        mount-opt
44   version=1     logbsize=32k
45   version=2     logbsize=32k
46   version=2     logbsize=64k
47   version=2     logbsize=128k
48   version=2     logbsize=256k
49 EOF
50
51 start_blk=2
52
53 # do the work for various log params which
54 # should not effect the data content of the log
55 cat $tmp.seq.params \
56 | while read mkfs mnt
57 do
58     if [ "$mkfs" = "#" ]; then
59         continue
60     fi
61     export MOUNT_OPTIONS="-o noalign,$mnt"
62     _mkfs_log "-l $mkfs"
63     _create_log
64     _check_log
65
66     _print_operation
67     _cmp_op_output $seqfull.op $filtered
68
69     _print_transaction_inode $start_blk
70     _cmp_output $seqfull.trans_inode $filtered
71
72     _print_transaction_buf $start_blk
73     _cmp_output $seqfull.trans_buf $filtered
74 done
75
76 # got thru it all so we may have success
77 status=0
78
79 exit