mkfs will soon refuse to format a log smaller than 64MB, so update this test to reflect the new log sizing calculations. Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- tests/xfs/216 | 19 +++++++++++++++++++ tests/xfs/216.out.64mblog | 10 ++++++++++ tests/xfs/216.out.classic | 0 3 files changed, 29 insertions(+) create mode 100644 tests/xfs/216.out.64mblog rename tests/xfs/{216.out => 216.out.classic} (100%) diff --git a/tests/xfs/216 b/tests/xfs/216 index c3697db7..ebae8979 100755 --- a/tests/xfs/216 +++ b/tests/xfs/216 @@ -29,6 +29,23 @@ $MKFS_XFS_PROG 2>&1 | grep -q rmapbt && \ $MKFS_XFS_PROG 2>&1 | grep -q reflink && \ loop_mkfs_opts="$loop_mkfs_opts -m reflink=0" +# Decide which golden output file we're using. Starting with mkfs.xfs 5.15, +# the default minimum log size was raised to 64MB for all cases, so we detect +# that by test-formatting with a 512M filesystem. This is a little handwavy, +# but it's the best we can do. +choose_golden_output() { + local seqfull=$1 + local file=$2 + + if $MKFS_XFS_PROG -f -b size=4096 -l version=2 \ + -d name=$file,size=512m $loop_mkfs_opts | \ + grep -q 'log.*blocks=16384'; then + ln -f -s $seqfull.out.64mblog $seqfull.out + else + ln -f -s $seqfull.out.classic $seqfull.out + fi +} + _do_mkfs() { for i in $*; do @@ -43,6 +60,8 @@ _do_mkfs() # make large holey file $XFS_IO_PROG -f -c "truncate 256g" $LOOP_DEV +choose_golden_output $0 $LOOP_DEV + #make loopback mount dir mkdir $LOOP_MNT diff --git a/tests/xfs/216.out.64mblog b/tests/xfs/216.out.64mblog new file mode 100644 index 00000000..3c12085f --- /dev/null +++ b/tests/xfs/216.out.64mblog @@ -0,0 +1,10 @@ +QA output created by 216 +fssize=1g log =internal log bsize=4096 blocks=16384, version=2 +fssize=2g log =internal log bsize=4096 blocks=16384, version=2 +fssize=4g log =internal log bsize=4096 blocks=16384, version=2 +fssize=8g log =internal log bsize=4096 blocks=16384, version=2 +fssize=16g log =internal log bsize=4096 blocks=16384, version=2 +fssize=32g log =internal log bsize=4096 blocks=16384, version=2 +fssize=64g log =internal log bsize=4096 blocks=16384, version=2 +fssize=128g log =internal log bsize=4096 blocks=16384, version=2 +fssize=256g log =internal log bsize=4096 blocks=32768, version=2 diff --git a/tests/xfs/216.out b/tests/xfs/216.out.classic similarity index 100% rename from tests/xfs/216.out rename to tests/xfs/216.out.classic