#
# FS QA Test No. 504
#
-# Create a directory with multiple filenames that all appear the same
-# (in unicode, anyway) but point to different inodes. In theory all
-# Linux filesystems should allow this (filenames are a sequence of
-# arbitrary bytes) even if the user implications are horrifying.
+# Create a filesystem label with emoji and confusing unicode characters
+# to make sure that these special things actually work on xfs. In
+# theory it should allow this (labels are a sequence of arbitrary bytes)
+# even if the user implications are horrifying.
#
-seq=`basename "$0"`
-seqres="$RESULT_DIR/$seq"
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1 # failure is the default!
-trap "_cleanup; exit \$status" 0 1 2 3 15
-
-_cleanup()
-{
- cd /
- rm -f $tmp.*
-}
+. ./common/preamble
+_begin_fstest auto quick mkfs label
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
-_supported_os Linux
_supported_fs xfs
_require_scratch_nocheck
_require_xfs_io_command 'label'
echo "Silence is golden."
+_scratch_mkfs > /dev/null
+_scratch_mount
want_scrub=
_check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV" && want_scrub=yes
+_scratch_unmount
filter_scrub() {
grep 'Unicode' | sed -e 's/^.*Duplicate/Duplicate/g'