From: Boyang Xue Date: Thu, 19 Aug 2021 08:07:51 +0000 (+0800) Subject: ext4: regression test for "tune2fs -l" after ext4 shutdown X-Git-Tag: v2022.05.01~274 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=39d6777fb39f54688250ec36ba4322194ae7c03c;p=xfstests-dev.git ext4: regression test for "tune2fs -l" after ext4 shutdown Regression test for e2fsprogs commit: e905fbe3fd0f ext4: Fix tune2fs checksum failure for mounted filesystem This test runs "tune2fs -l" after ext4 shutdown. tune2fs reads superblock checksum from the buffer cache. On unfixed kernels, the checksum is incorrect until the writeout happens, so tune2fs fails with "superblock checksum does not match" in this case. Signed-off-by: Boyang Xue Reviewed-by: Zorro Lang Signed-off-by: Eryu Guan --- diff --git a/tests/ext4/051 b/tests/ext4/051 new file mode 100755 index 00000000..b4f56b08 --- /dev/null +++ b/tests/ext4/051 @@ -0,0 +1,29 @@ +#! /bin/bash +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2021 Red Hat Inc. All Rights Reserved. +# +# FS QA Test No. 051 +# +# Test that tune2fs doesn't fail after ext4 shutdown +# Regression test for commit: +# e905fbe3fd0f ext4: Fix tune2fs checksum failure for mounted filesystem +# +. ./common/preamble +_begin_fstest auto rw quick + +# real QA test starts here +_supported_fs ext4 +_require_scratch +_require_scratch_shutdown +_require_command "$TUNE2FS_PROG" tune2fs + +echo "Silence is golden" + +_scratch_mkfs >/dev/null 2>&1 +_scratch_mount +echo "This is a test" > $SCRATCH_MNT/testfile +_scratch_shutdown +_scratch_cycle_mount +$TUNE2FS_PROG -l $SCRATCH_DEV >> $seqres.full +status=0 +exit diff --git a/tests/ext4/051.out b/tests/ext4/051.out new file mode 100644 index 00000000..32f74d89 --- /dev/null +++ b/tests/ext4/051.out @@ -0,0 +1,2 @@ +QA output created by 051 +Silence is golden