blob: 706aff61fafde8bdce54b4baedd12fb53ff3113a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2022 Oracle. All Rights Reserved.
#
# FS QA Test No. 144
#
# Now that we've increased the default log size calculation, test mkfs with
# various stripe units and filesystem sizes to see if we can provoke mkfs into
# breaking.
#
. ./common/preamble
_begin_fstest auto mkfs
# real QA test starts here
# Modify as appropriate.
_supported_fs xfs
_require_test
# The last testcase creates a (sparse) fs image with a 2GB log, so we need
# 3GB to avoid failing the mkfs due to ENOSPC.
_require_fs_space $TEST_DIR $((3 * 1048576))
echo Silence is golden
testfile=$TEST_DIR/a
rm -f $testfile
test_format() {
local tag="$1"
shift
echo "$tag" >> $seqres.full
$MKFS_XFS_PROG -f $@ -d file,name=$testfile &>> $seqres.full
local res=$?
test $res -eq 0 || echo "$tag FAIL $res" | tee -a $seqres.full
}
# First we try various small filesystems and stripe sizes.
for M in `seq 298 302` `seq 490 520`; do
for S in `seq 32 4 64`; do
test_format "M=$M S=$S" -dsu=${S}k,sw=1,size=${M}m -N
done
done
# log end rounded beyond EOAG due to stripe unit
test_format "log end beyond eoag" -d agcount=3200,size=6366g -d su=256k,sw=4 -N
# Log so large it pushes the root dir into AG 1. We can't use -N for the mkfs
# because this check only occurs after the root directory has been allocated,
# which mkfs -N doesn't do.
test_format "log pushes rootdir into AG 1" -d agcount=3200,size=6366g -lagnum=0
# success, all done
status=0
exit
|