From cef0ac422b5142c845cbb5a8d850483133820fee Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 8 Mar 2021 20:40:25 -0800 Subject: [PATCH] xfs: test mkfs min log size calculation w/ rt volumes In "mkfs: set required parts of the realtime geometry before computing log geometry" we made sure that mkfs set up enough of the fs geometry to compute the minimum xfs log size correctly when formatting the filesystem. This is the regression test for that issue. Signed-off-by: Darrick J. Wong Reviewed-by: Chandan Babu R Signed-off-by: Eryu Guan --- tests/xfs/143 | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/xfs/143.out | 2 ++ tests/xfs/group | 1 + 3 files changed, 49 insertions(+) create mode 100755 tests/xfs/143 create mode 100644 tests/xfs/143.out diff --git a/tests/xfs/143 b/tests/xfs/143 new file mode 100755 index 00000000..66536a16 --- /dev/null +++ b/tests/xfs/143 @@ -0,0 +1,46 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later +# Copyright (c) 2021 Oracle. All Rights Reserved. +# +# FS QA Test No. 143 +# +# Make sure mkfs sets up enough of the rt geometry that we can compute the +# correct min log size for formatting the fs. +# +# This is a regression test for the xfsprogs commit 31409f48 ("mkfs: set +# required parts of the realtime geometry before computing log geometry"). + +seq=`basename $0` +seqres=$RESULT_DIR/$seq +echo "QA output created by $seq" + +here=`pwd` +tmp=/tmp/$$ +status=1 # failure is the default! +trap "_cleanup; exit \$status" 0 1 2 3 15 + +_cleanup() +{ + cd / + rm -f $tmp.* +} + +# get standard environment, filters and checks +. ./common/rc +. ./common/filter + +# real QA test starts here +_supported_fs xfs +_require_scratch +_require_realtime + +rm -f $seqres.full + +# Format a tiny filesystem to force minimum log size, then see if it mounts +_scratch_mkfs -r size=1m -d size=100m > $seqres.full +_scratch_mount >> $seqres.full +echo "Silence is golden" + +# success, all done +status=0 +exit diff --git a/tests/xfs/143.out b/tests/xfs/143.out new file mode 100644 index 00000000..6f3a1863 --- /dev/null +++ b/tests/xfs/143.out @@ -0,0 +1,2 @@ +QA output created by 143 +Silence is golden diff --git a/tests/xfs/group b/tests/xfs/group index 5141824c..e3072fe8 100644 --- a/tests/xfs/group +++ b/tests/xfs/group @@ -140,6 +140,7 @@ 140 auto clone 141 auto log metadata 142 auto quick rw attr realtime +143 auto quick realtime mount 148 auto quick fuzzers 149 auto quick growfs 164 rw pattern auto prealloc quick -- 2.39.5