echo "Test XFS online scrub, if applicable"
-# Only run this on xfs if xfs_scrub is available and has the unicode checker
-check_xfs_scrub() {
- [ "$FSTYP" == "xfs" ] || return 1
- _supports_xfs_scrub "$SCRATCH_MNT" "$SCRATCH_DEV" || return 1
-
- # We only care if xfs_scrub has unicode string support...
- if ! type ldd > /dev/null 2>&1 || \
- ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
- return 1
- fi
-
- return 0
-}
-
-if check_xfs_scrub; then
+if _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV"; then
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 "greek_" || echo "No complaints about greek letter mess?"