public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@kernel.org>
To: fstests@vger.kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH] xfs: notrun if kernel xfs not supports ascii-ci feature
Date: Sun, 27 Oct 2024 04:12:34 +0800	[thread overview]
Message-ID: <20241026201234.77387-1-zlang@kernel.org> (raw)

As the ascii-ci feature is deprecated, if linux build without the
CONFIG_XFS_SUPPORT_ASCII_CI, mount xfs with "-n version=ci" will
get EINVAL. So let's notrun if it's not supported by kernel.

Signed-off-by: Zorro Lang <zlang@kernel.org>
---
 common/xfs    | 10 ++++++++++
 tests/xfs/188 |  1 +
 tests/xfs/597 |  1 +
 tests/xfs/598 |  1 +
 4 files changed, 13 insertions(+)

diff --git a/common/xfs b/common/xfs
index 62e3100ee..cbcf4ee0b 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1181,6 +1181,16 @@ _require_xfs_mkfs_ciname()
 		|| _notrun "need case-insensitive naming support in mkfs.xfs"
 }
 
+# this test requires the xfs kernel support ascii-ci feature
+#
+_require_xfs_ciname()
+{
+	_try_scratch_mkfs_xfs -n version=ci >/dev/null 2>&1
+	_try_scratch_mount >/dev/null 2>&1 \
+		|| _notrun "XFS doesn't support ascii-ci feature"
+	_scratch_unmount
+}
+
 # this test requires mkfs.xfs have configuration file support
 _require_xfs_mkfs_cfgfile()
 {
diff --git a/tests/xfs/188 b/tests/xfs/188
index a72bf15d6..98cdfd501 100755
--- a/tests/xfs/188
+++ b/tests/xfs/188
@@ -31,6 +31,7 @@ _cleanup()
 
 _require_scratch
 _require_xfs_mkfs_ciname
+_require_xfs_ciname
 
 _scratch_mkfs -n version=ci >/dev/null 2>&1
 _scratch_mount
diff --git a/tests/xfs/597 b/tests/xfs/597
index d3bf91a99..2bf361080 100755
--- a/tests/xfs/597
+++ b/tests/xfs/597
@@ -20,6 +20,7 @@ _fixed_by_kernel_commit 9dceccc5822f \
 
 _require_scratch
 _require_xfs_mkfs_ciname
+_require_xfs_ciname
 
 _scratch_mkfs -n version=ci > $seqres.full
 _scratch_mount
diff --git a/tests/xfs/598 b/tests/xfs/598
index 54f50cd60..20a80fcb6 100755
--- a/tests/xfs/598
+++ b/tests/xfs/598
@@ -27,6 +27,7 @@ _fixed_by_kernel_commit 9dceccc5822f \
 _require_test
 _require_scratch
 _require_xfs_mkfs_ciname
+_require_xfs_ciname
 
 _scratch_mkfs -n version=ci > $seqres.full
 _scratch_mount
-- 
2.45.2


             reply	other threads:[~2024-10-26 20:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26 20:12 Zorro Lang [this message]
2024-10-28  8:45 ` [PATCH] xfs: notrun if kernel xfs not supports ascii-ci feature Christoph Hellwig
2024-10-28 12:50   ` 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=20241026201234.77387-1-zlang@kernel.org \
    --to=zlang@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=linux-xfs@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