2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2020 Red Hat, Inc.. All Rights Reserved.
7 # https://bugzilla.kernel.org/show_bug.cgi?id=211605
8 # Verify that the warnings are not printed on remount if the mount option has
9 # the same value as during the mount
11 # Regression test for commit:
12 # xfs: Skip repetitive warnings about mount options
15 _begin_fstest auto quick mount
17 # Import common functions.
25 echo "fstests $seqnum [tag]" > /dev/kmsg
28 dmesg_since_test_tag()
30 dmesg | tac | sed -ne "0,\#fstests $seqnum \[tag\]#p" | \
34 check_dmesg_for_since_tag()
36 dmesg_since_test_tag | egrep -q "$1"
39 echo "Silence is golden."
41 # Skip old kernels that did not print the warning yet
43 _scratch_mkfs > $seqres.full 2>&1
44 _scratch_mount -o attr2
46 check_dmesg_for_since_tag "XFS: attr2 mount option is deprecated" || \
47 _notrun "Deprecation warning are not printed at all."
49 # Test mount with default options (attr2 and noikeep) and remount with
51 # 1) the defaults (attr2, noikeep)
52 # 2) non defaults (noattr2, ikeep)
54 for VAR in {attr2,noikeep}; do
57 check_dmesg_for_since_tag "XFS: $VAR mount option is deprecated." && \
58 echo "Should not be able to find deprecation warning for $VAR"
60 for VAR in {noattr2,ikeep}; do
63 check_dmesg_for_since_tag "XFS: $VAR mount option is deprecated" || \
64 echo "Could not find deprecation warning for $VAR"