generic/233,270: unlimit the max locked memory size for io_uring
[xfstests-dev.git] / tests / xfs / 082
1 #! /bin/bash
2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc.  All Rights Reserved.
4 #
5 # FS QA Test No. 082
6 #
7 # Test out the v2 stripe logs with logprint
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
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            start-blk
45   version=2            logbsize=32k       2
46   version=2,su=4096    logbsize=32k       8
47   version=2,su=32768   logbsize=32k       64
48 #
49 # expect following line to fail
50 #
51   version=2,su=36864   logbsize=32k       72
52 #
53 # following is not a power of 2 BBs 
54 #
55   version=2,su=5120    logbsize=32k       10
56 EOF
57
58 # Do the work for various log params which
59 # should not effect the data content of the log
60 # Try with and without sync'ing - sync'ing will mean that
61 # the log will be written out unfilled and thus the log 
62 # stripe can have an effect.
63 #
64 for s in sync nosync ; do
65     cat $tmp.seq.params \
66     | while read mkfs mnt start restofline
67     do
68         if [ "$mkfs" = "#" ]; then 
69             continue
70         fi
71         echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
72         export MOUNT_OPTIONS="-o $mnt"
73         if ! _mkfs_log "-l $mkfs"; then
74             continue
75         fi      
76         if [ $s = "sync" ]; then
77             _create_log_sync
78         else
79             _create_log
80         fi
81         if [ $? -ne 0 ]; then
82             continue
83         fi
84         _check_log
85
86         sync_suffix=".$s"
87
88         if [ $s = "sync" ]; then
89             # if sync then we have chance of DATA FORK EXTENTS items
90             # not hanging around very long due to inode syncing to disk
91             # (see comment in xfs_iflush_int())
92             # and this is to hard to reconcile in the op output
93             :
94         else
95             _print_operation
96             _cmp_op_output $seqfull.op $filtered
97         fi
98
99         _print_transaction_inode $start
100         _cmp_output $seqfull.trans_inode $filtered
101
102         _print_transaction_buf $start
103         _cmp_output $seqfull.trans_buf $filtered
104     done
105 done
106
107 status=0
108 exit