[PATCH 4/9] generic/45[34]: check unicode names only if xfs_scrub linked against libicu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Since we've rewriting the xfs_scrub Unicode name scanner to use libicu
to detect potential spoof names, change our check for unicode-enabled
name scanning xfs_scrub to look for libicu instead of libunistring,
adjust the golden output to reflect the new library's detection
capabilities and make sure we get all the scrub output by invoking with
-v.

Note that this requires xfsprogs 4.16 or newer; since xfs_scrub is (for
now) an experimental program, we don't care about breaking backwards
compatibility.

Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
 tests/generic/453 |    5 ++---
 tests/generic/454 |    5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)


diff --git a/tests/generic/453 b/tests/generic/453
index f2cd81fb..6cb2a296 100755
--- a/tests/generic/453
+++ b/tests/generic/453
@@ -158,7 +158,7 @@ check_xfs_scrub() {
 
 	# We only care if xfs_scrub has unicode string support...
 	if ! type ldd > /dev/null 2>&1 || \
-	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then
+	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
 		return 1
 	fi
 
@@ -166,9 +166,8 @@ check_xfs_scrub() {
 }
 
 if check_xfs_scrub; then
-	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
+	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
-	echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
 	echo "Actual xfs_scrub output:" >> $seqres.full
diff --git a/tests/generic/454 b/tests/generic/454
index c6530290..ec4fb997 100755
--- a/tests/generic/454
+++ b/tests/generic/454
@@ -154,7 +154,7 @@ check_xfs_scrub() {
 
 	# We only care if xfs_scrub has unicode string support...
 	if ! type ldd > /dev/null 2>&1 || \
-	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libunistring; then
+	   ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
 		return 1
 	fi
 
@@ -162,9 +162,8 @@ check_xfs_scrub() {
 }
 
 if check_xfs_scrub; then
-	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
+	output="$(LC_ALL="C.UTF-8" ${XFS_SCRUB_PROG} -v -n "${SCRATCH_MNT}" 2>&1 | filter_scrub)"
 	echo "${output}" | grep -q "french_" || echo "No complaints about french e accent?"
-	echo "${output}" | grep -q "chinese_" || echo "No complaints about chinese width-different?"
 	echo "${output}" | grep -q "greek_" || echo "No complaints about greek letter mess?"
 	echo "${output}" | grep -q "arabic_" || echo "No complaints about arabic expanded string?"
 	echo "Actual xfs_scrub output:" >> $seqres.full

--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux