]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs: notrun if kernel xfs not supports ascii-ci feature
authorZorro Lang <zlang@kernel.org>
Sat, 26 Oct 2024 20:12:34 +0000 (04:12 +0800)
committerZorro Lang <zlang@kernel.org>
Mon, 28 Oct 2024 13:36:16 +0000 (21:36 +0800)
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 <hch@lst.de>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/xfs
tests/xfs/188
tests/xfs/597
tests/xfs/598

index 53d55f9907fbb03bef0d0f7d36b63f51a37dd74e..68abfa71d8552f3e79ab1b59f8d7bb919cf6c479 100644 (file)
@@ -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()
 {
index a72bf15d6e0601f5e33afa23a62cd948075bb9e4..98cdfd501823d3f8045a4945bda7344ec5fc4c6d 100755 (executable)
@@ -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
index d3bf91a99d6eace495ca5b306ad83d84c7f69f23..2bf3610803827fc81e9072391b187d7a26cf65be 100755 (executable)
@@ -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
index 54f50cd604aa98b20b0815cae4b019614d205a56..20a80fcb6b91aa903d8cb38c7affeb092b9b8403 100755 (executable)
@@ -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