From 66434a1cb73131f45457208ca0a0382ff8708067 Mon Sep 17 00:00:00 2001 From: Zorro Lang Date: Sun, 27 Oct 2024 04:12:34 +0800 Subject: [PATCH] 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. Reviewed-by: Christoph Hellwig Signed-off-by: Zorro Lang --- 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 53d55f99..68abfa71 100644 --- a/common/xfs +++ b/common/xfs @@ -1186,6 +1186,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 a72bf15d..98cdfd50 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 d3bf91a9..2bf36108 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 54f50cd6..20a80fcb 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.39.5