From: "Darrick J. Wong" <djwong@kernel.org>
To: guaneryu@gmail.com, zlang@redhat.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me,
xuyang2018.jy@fujitsu.com
Subject: [PATCH v1.1 3/3] xfs/533: fix false negatives for this test
Date: Thu, 4 Aug 2022 09:26:49 -0700 [thread overview]
Message-ID: <YuvzSdINZZ3PV20q@magnolia> (raw)
In-Reply-To: <165950049724.198815.5496412458825635633.stgit@magnolia>
From: Darrick J. Wong <djwong@kernel.org>
xfsprogs 5.19 will change the error message that gets printed when the
primary superblock validation fails. Filter the _get_metadata_field
output so that the new message looks like the old message.
While we're at it, _notrun this test on V4 filesystems because the
validation messages are in the V5 superblock validation functions.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
tests/xfs/533 | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/tests/xfs/533 b/tests/xfs/533
index afbdadac..31858cc9 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -21,13 +21,19 @@ _fixed_by_git_commit xfsprogs f4afdcb0ad11 \
#skip fs check because invalid superblock 1
_require_scratch_nocheck
+# The error messages in the golden output come from the V5 superblock verifier
+# routines, so ignore V4 filesystems.
+_require_scratch_xfs_crc
+
_scratch_mkfs_xfs >>$seqres.full 2>&1
# write the bad magicnum field value(0) to the superblock 1
_scratch_xfs_set_metadata_field "magicnum" "0" "sb 1"
-#Even magicnum field has been corrupted, we still can read this field value
-_scratch_xfs_get_metadata_field "magicnum" "sb 1"
+# Even magicnum field has been corrupted, we still can read this field value.
+# The error message changed in xfsprogs 5.19.
+_scratch_xfs_get_metadata_field "magicnum" "sb 1" 2>&1 | \
+ sed -e 's/Superblock has bad magic number 0x0. Not an XFS filesystem?/bad magic number/g'
# success, all done
status=0
next prev parent reply other threads:[~2022-08-04 16:26 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-03 4:21 [PATCHSET 0/3] fstests: random fixes for v2022.07.31 Darrick J. Wong
2022-08-03 4:21 ` [PATCH 1/3] xfs/432: fix this test when external devices are in use Darrick J. Wong
2022-08-04 15:55 ` Zorro Lang
2022-08-03 4:21 ` [PATCH 2/3] xfs/291: convert open-coded _scratch_xfs_repair usage Darrick J. Wong
2022-08-04 15:57 ` Zorro Lang
2022-08-03 4:21 ` [PATCH 3/3] xfs/533: fix golden output for this test Darrick J. Wong
2022-08-04 1:53 ` xuyang2018.jy
2022-08-04 5:06 ` Darrick J. Wong
2022-08-04 5:15 ` Darrick J. Wong
2022-08-04 5:31 ` xuyang2018.jy
2022-08-04 5:37 ` Darrick J. Wong
2022-08-04 16:26 ` Darrick J. Wong [this message]
2022-08-05 1:38 ` [PATCH v1.1 3/3] xfs/533: fix false negatives " xuyang2018.jy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YuvzSdINZZ3PV20q@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=guaneryu@gmail.com \
--cc=linux-xfs@vger.kernel.org \
--cc=xuyang2018.jy@fujitsu.com \
--cc=zlang@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.