Re: [PATCH 2/2] generic/45[34]: don't warn on mixed bidirectional characters

Zorro Lang <[email protected]>
Newsgroups org.kernel.vger.fstests,org.kernel.vger.linux-xfs
Message-ID <af2Mdd3vl61NTnUI@zlang-mailbox>
On Thu, May 07, 2026 at 03:23:34PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <[email protected]>
> 
> We're dropping this warning from xfs_scrub because the warning is
> incorrect, so let's make sure the QA system checks that it's gone.
> 
> Cc: [email protected]
> Signed-off-by: "Darrick J. Wong" <[email protected]>
> ---

/me is just back from a paper about BIDI (Bidirectional Text), so the
"\xd7...\xaa" is RTL part, then ".pdf" is LTR part. OK, this test makes
sense to me. Darrick is going to become a word/char processing master now :)

Reviewed-by: Zorro Lang <[email protected]>

>  tests/generic/453 |   10 ++++++++++
>  tests/generic/454 |   10 ++++++++++
>  2 files changed, 20 insertions(+)
> 
> 
> diff --git a/tests/generic/453 b/tests/generic/453
> index 0193b010306c48..9b121d995ad1ab 100755
> --- a/tests/generic/453
> +++ b/tests/generic/453
> @@ -247,6 +247,10 @@ setf "tags_m\xf3\xa0\x81\xadoocow.txt" u1
>  # totally hidden name? "(Hi)" is the file name
>  setf "\xf3\xa0\x80\xa8\xf3\xa0\x81\x88\xf3\xa0\x81\xa9\xf3\xa0\x80\xa9" "(Hi)"
>  
> +# Gedalya complained about being flagged for mixing Hebrew (RTL) and Latin
> +# (LTR) codepoints in the same name.  This is a common practice.
> +setf "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa.pdf" "mixed rtl and ltr chars?"
> +
>  ls -laR $testdir >> $seqres.full
>  
>  echo "Test files"
> @@ -359,6 +363,10 @@ testf "tags_m\xf3\xa0\x81\xadoocow.txt" u1
>  # totally hidden name? "(Hi)" is the file name
>  testf "\xf3\xa0\x80\xa8\xf3\xa0\x81\x88\xf3\xa0\x81\xa9\xf3\xa0\x80\xa9" "(Hi)"
>  
> +# Gedalya complained about being flagged for mixing Hebrew (RTL) and Latin
> +# (LTR) codepoints in the same name.  This is a common practice.
> +testf "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa.pdf" "mixed rtl and ltr chars?"
> +
>  echo "Uniqueness of inodes?"
>  stat -c '%i' "${testdir}/"* | sort | uniq -c | while read nr inum; do
>  	if [ "${nr}" -gt 1 ]; then
> @@ -403,6 +411,8 @@ if _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV"; then
>  		grep -q 'tags_m.xf3.xa0.x81' $tmp.scrub || echo "No complaints about deprecated unicode tags in a name?"
>  	fi
>  
> +	grep -q 'mixes bidirectional characters' $tmp.scrub && echo "Unnecessary complaints about mixed bidi characters in a name?"
> +
>  	echo "Actual xfs_scrub output:" >> $seqres.full
>  	cat $tmp.scrub >> $seqres.full
>  fi
> diff --git a/tests/generic/454 b/tests/generic/454
> index 3454cae5d5ea6c..81c9a721561cf8 100755
> --- a/tests/generic/454
> +++ b/tests/generic/454
> @@ -168,6 +168,10 @@ setf "tags_m\xf3\xa0\x81\xadoocow.txt" u1
>  # totally hidden name? "(Hi)" is the file name
>  setf "\xf3\xa0\x80\xa8\xf3\xa0\x81\x88\xf3\xa0\x81\xa9\xf3\xa0\x80\xa9" "(Hi)"
>  
> +# Gedalya complained about being flagged for mixing Hebrew (RTL) and Latin
> +# (LTR) codepoints in the same name.  This is a common practice.
> +setf "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa.pdf" "mixed rtl and ltr chars?"
> +
>  _getfattr --absolute-names -d "${testfile}" >> $seqres.full
>  
>  echo "Test files"
> @@ -256,6 +260,10 @@ testf "tags_m\xf3\xa0\x81\xadoocow.txt" u1
>  
>  # totally hidden name? "(Hi)" is the file name
>  testf "\xf3\xa0\x80\xa8\xf3\xa0\x81\x88\xf3\xa0\x81\xa9\xf3\xa0\x80\xa9" "(Hi)"
> +#
> +# Gedalya complained about being flagged for mixing Hebrew (RTL) and Latin
> +# (LTR) codepoints in the same name.  This is a common practice.
> +testf "\xd7\xa2\xd7\x91\xd7\xa8\xd7\x99\xd7\xaa.pdf" "mixed rtl and ltr chars?"
>  
>  echo "Uniqueness of keys?"
>  crazy_keys="$(_getfattr --absolute-names -d "${testfile}" | grep -E -c '(french_|chinese_|greek_|arabic_|urk)')"
> @@ -285,6 +293,8 @@ if _check_xfs_scrub_does_unicode "$SCRATCH_MNT" "$SCRATCH_DEV"; then
>  		grep -q 'tags_m.xf3.xa0.x81' $tmp.scrub || echo "No complaints about deprecated unicode tags in a name?"
>  	fi
>  
> +	grep -q 'mixes bidirectional characters' $tmp.scrub && echo "Unnecessary complaints about mixed bidi characters in a name?"
> +
>  	echo "Actual xfs_scrub output:" >> $seqres.full
>  	echo "${output}" >> $seqres.full
>  fi
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.