overlay: run unionmount testsuite test cases
[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 _supported_os Linux
35 # prelim
36 rm -f $seqres.full $tmp.*
37 _require_scratch
38 _require_v2log
39
40 echo "*** init FS"
41 _scratch_unmount >/dev/null 2>&1
42
43 cat >$tmp.seq.params <<EOF
44 # mkfs-opt        mount-opt
45   version=1     logbsize=32k
46   version=2     logbsize=32k
47   version=2     logbsize=64k
48   version=2     logbsize=128k
49   version=2     logbsize=256k
50 EOF
51
52 start_blk=2
53
54 # do the work for various log params which
55 # should not effect the data content of the log
56 cat $tmp.seq.params \
57 | while read mkfs mnt
58 do
59     if [ "$mkfs" = "#" ]; then
60         continue
61     fi
62     export MOUNT_OPTIONS="-o noalign,$mnt"
63     _mkfs_log "-l $mkfs"
64     _create_log
65     _check_log
66
67     _print_operation
68     _cmp_op_output $seqfull.op $filtered
69
70     _print_transaction_inode $start_blk
71     _cmp_output $seqfull.trans_inode $filtered
72
73     _print_transaction_buf $start_blk
74     _cmp_output $seqfull.trans_buf $filtered
75 done
76
77 # got thru it all so we may have success
78 status=0
79
80 exit