linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Shreeya Patel <shreeya.patel@collabora.com>,
	Matthew Wilcox <willy@infradead.org>,
	fstests@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	krisman@collabora.com, preichl@redhat.com, kernel@collabora.com
Subject: Re: [PATCH] generic/453: Exclude filenames that are not supported by exfat
Date: Wed, 28 Apr 2021 17:37:26 -0700	[thread overview]
Message-ID: <20210429003726.GG1251862@magnolia> (raw)
In-Reply-To: <YIloQDGP+0mRQdbP@mit.edu>

On Wed, Apr 28, 2021 at 09:50:56AM -0400, Theodore Ts'o wrote:
> On Tue, Apr 27, 2021 at 11:11:16AM -0700, Darrick J. Wong wrote:
> > 
> > TBH I think these tests (g/453 and g/454) are probably only useful for
> > filesystems that allow unrestricted byte streams for names.
> 
> I'm actually a little puzzled about why these tests should exist:
> 
> # 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.
> 
> Why do we care about testing this?  The assertion "In all theory all
> Linux filesystems should allow this" is clearly not true --- if you
> enable unicode support for ext4 or f2fs, this will no longer be true,
> and this is considered by some a _feature_ not a bug --- precisely
> _because_ the user implications are horrifying.
> 
> So why does these tests exist?  Darrick, I see you added them in 2017
> to test whether or not xfs_scrub will warn about confuable names, if
> _check_xfs_scrub_does_unicode is true.  So we already understand that
> it's possible for a file system checker to complain that these file
> names are bad.

Yes, that's exactly why this test (and generic/454) were created -- as a
functional test for xfs_scrub's unicode checking.

> It's not at all clear to me that asserting that all Linux file systems
> _must_ treat file names as "bag of bits" and not apply any kind of
> unicode normalization or strict unicode validation is a valid thing to
> test for in 2021.

Perhaps not.  These two tests do have the interesting side effect of
catching filesystems that don't hew to the "names are bytestreams"
philosophy.  In 2017, fstests usage seemed like it pretty narrowly
included only the big three filesystems, so it amuses me to no end that
four years went by before this discussion started. :P

Nowadays with wider testing of other filesystems (thanks, Red Hat!) we
should hide these behind _require_names_are_bytes or move them to
tests/xfs/.

Question -- the unicode case folding doesn't apply to xattr names,
right?

--D

> 
> 					- Ted

  reply	other threads:[~2021-04-29  0:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-25 22:31 [PATCH] generic/453: Exclude filenames that are not supported by exfat Shreeya Patel
2021-04-26  0:34 ` Matthew Wilcox
2021-04-26 11:57   ` Shreeya Patel
2021-04-26 12:03     ` Shreeya Patel
2021-04-26 12:37     ` Matthew Wilcox
2021-04-27 11:13       ` Shreeya Patel
2021-04-27 18:11         ` Darrick J. Wong
2021-04-27 21:00           ` Shreeya Patel
2021-04-28 13:50           ` Theodore Ts'o
2021-04-29  0:37             ` Darrick J. Wong [this message]
2021-04-29 14:32               ` Gabriel Krisman Bertazi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210429003726.GG1251862@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=kernel@collabora.com \
    --cc=krisman@collabora.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=preichl@redhat.com \
    --cc=shreeya.patel@collabora.com \
    --cc=tytso@mit.edu \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).