Skip to contentSkip to conversation

xfs: notrun if kernel xfs not supports ascii-ci feature

PATCH In review Zorro Lang 3 participants 3 messages Oct 26, 2024 – Oct 28, 2024

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH 1/1 xfs: notrun if kernel xfs not supports ascii-ci feature

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.

---
 common/xfs    | 10 ++++++++++
 tests/xfs/188 |  1 +
 tests/xfs/597 |  1 +
 tests/xfs/598 |  1 +
 4 files changed, 13 insertions(+)
common/xfs +10 -0
index 62e3100ee..cbcf4ee0b 100644
@@ -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()
 {
tests/xfs/188 +1 -0
index a72bf15d6..98cdfd501 100755
@@ -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
tests/xfs/597 +1 -0
index d3bf91a99..2bf361080 100755
@@ -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
tests/xfs/598 +1 -0
index 54f50cd60..20a80fcb6 100755
@@ -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
Signature · 1 line
2.45.2
Reviewed-by on v1 1/1
#1 lore raw

common/xfs _require_xfs_mkfs_ciname() · line 1190

Quoted 2 lines
common/xfs +2 -0
+	_try_scratch_mount >/dev/null 2>&1 \
+		|| _notrun "XFS doesn't support ascii-ci feature"

I would have normally expected the || to be placed on the previous line.

Nitpicking aside:

#2 lore raw
Quoted 5 lines · Christoph Hellwig

common/xfs _require_xfs_mkfs_ciname() · line 1190

Quoted 2 lines
common/xfs +2 -0
+	_try_scratch_mount >/dev/null 2>&1 \
+		|| _notrun "XFS doesn't support ascii-ci feature"

I would have normally expected the || to be placed on the previous line.

Sure, I'll merge this patch as this:

_try_scratch_mount >/dev/null 2>&1 || \
_notrun "XFS doesn't support ascii-ci feature"

Thanks for your reviewing.

Quoted 6 lines

Nitpicking aside: