From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH v3] xfs/288: notrun if xfs_db write command fails
Date: Fri, 10 Aug 2018 11:26:32 +0800 [thread overview]
Message-ID: <20180810032632.9558-1-zlang@redhat.com> (raw)
Old xfsprogs can't change attr hdr.count to 0 on v5 filesystems, two
reasons maybe cause this issue:
1) This commit has been merged: 89baf918(xfs_db: write values into
dir/attr blocks and recalculate CRCs).
2) xfs_db write command doesn't support -d option.
That's not a real bug, so skip this test if xfs_db can't set attr
hdr.count to 0.
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
Hi,
V2 tried to bring in a common function named _require_xfs_db_write_da():
https://marc.info/?l=linux-xfs&m=153301569124126&w=2
But by talking with #xfs channel, I drop that common function, only change
in xfs/288 inside now.
Thanks,
Zorro
tests/xfs/288 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/xfs/288 b/tests/xfs/288
index f4165b6c..c6821909 100755
--- a/tests/xfs/288
+++ b/tests/xfs/288
@@ -59,6 +59,14 @@ _scratch_unmount
_scratch_xfs_set_metadata_field "hdr.count" "0" \
"inode $inum" "ablock 0" >> $seqres.full
+# verify current xfs_db write command can set hdr.count to 0. Old xfsprogs
+# can't do that on v5 filesystems.
+count=$(_scratch_xfs_get_metadata_field "hdr.count" \
+ "inode $inum" "ablock 0")
+if [ "$count" != "0" ]; then
+ _notrun "xfs_db can't set attr hdr.count to 0"
+fi
+
# make sure xfs_repair can find above corruption. If it can't, that
# means we need to fix this bug on current xfs_repair
_scratch_xfs_repair -n >> $seqres.full 2>&1
--
2.14.4
reply other threads:[~2018-08-10 5:54 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180810032632.9558-1-zlang@redhat.com \
--to=zlang@redhat.com \
--cc=fstests@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox