summaryrefslogtreecommitdiff
path: root/tests/ext4/051
blob: e4b63a3261ab47235d19250e14aab47815e58d07 (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
#! /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 kernel commit:
# 4274f516d4bc ext4: recalucate superblock checksum after updating free blocks/inodes
# b2bbb92f7042 ext4: fix e2fsprogs 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