All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com, zlang@redhat.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 1/3] common/rc: let xfs_scrub tell us about its unicode checker
Date: Mon, 11 Apr 2022 15:55:02 -0700	[thread overview]
Message-ID: <164971770270.170109.8871111464246200861.stgit@magnolia> (raw)
In-Reply-To: <164971769710.170109.8985299417765876269.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

Now that xfs_scrub can report whether or not it was built with the
Unicode name checker, rewrite _check_xfs_scrub_does_unicode to take
advantage of that.  This supersedes the old method of trying to observe
dynamic library linkages and grepping the binary, neither of which
worked very well.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/rc |   12 ++++++++++++
 1 file changed, 12 insertions(+)


diff --git a/common/rc b/common/rc
index 17629801..ec146c4e 100644
--- a/common/rc
+++ b/common/rc
@@ -4800,6 +4800,18 @@ _check_xfs_scrub_does_unicode() {
 
 	_supports_xfs_scrub "${mount}" "${dev}" || return 1
 
+	# Newer versions of xfs_scrub advertise whether or not it supports
+	# Unicode name checks.
+	local xfs_scrub_ver="$("${XFS_SCRUB_PROG}" -VV)"
+
+	if echo "${xfs_scrub_ver}" | grep -q -- '-Unicode'; then
+		return 1
+	fi
+
+	if echo "${xfs_scrub_ver}" | grep -q -- '+Unicode'; then
+		return 0
+	fi
+
 	# If the xfs_scrub binary contains the string "Unicode name.*%s", then
 	# we know that it has the ability to complain about improper Unicode
 	# names.


  reply	other threads:[~2022-04-11 22:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 22:54 [PATCHSET 0/3] fstests: updates for xfsprogs 5.15 Darrick J. Wong
2022-04-11 22:55 ` Darrick J. Wong [this message]
2022-04-13 18:07   ` [PATCH 1/3] common/rc: let xfs_scrub tell us about its unicode checker Zorro Lang
2022-04-11 22:55 ` [PATCH 2/3] xfs: test mkfs.xfs config file stack corruption issues Darrick J. Wong
2022-04-13 17:56   ` Zorro Lang
2022-04-11 22:55 ` [PATCH 3/3] xfs/216: handle larger log sizes Darrick J. Wong
2022-04-13 17:44   ` Zorro Lang
2022-04-14  1:51     ` Darrick J. Wong
2022-04-14 19:25       ` Zorro Lang
2022-04-14 19:36         ` Darrick J. Wong
2022-04-15  3:24           ` Zorro Lang
2022-04-15 15:04   ` [PATCH v1.1 " Darrick J. Wong
2022-04-16 13:35     ` Zorro Lang
2022-04-17 14:42       ` Eryu Guan
2022-04-17 16:39         ` Zorro Lang

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=164971770270.170109.8871111464246200861.stgit@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=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.