fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: Gabriel Krisman Bertazi <krisman@collabora.com>
Cc: fstests@vger.kernel.org, linux-ext4@vger.kernel.org
Subject: Re: [PATCH xfstests 1/2] common/casefold: Add infrastructure to test filename casefold feature
Date: Mon, 6 May 2019 16:03:25 -0400	[thread overview]
Message-ID: <20190506200325.GA3985@mit.edu> (raw)
In-Reply-To: <20190506185941.10570-1-krisman@collabora.com>

On Mon, May 06, 2019 at 02:59:40PM -0400, Gabriel Krisman Bertazi wrote:
> +_require_test_casefold_feature () {
> +    _has_casefold_feature $TEST_DEV || \
> +	_notrun "Feature casefold required for this test"
> +}
> +_require_scratch_casefold_feature () {
> +    _has_casefold_feature $SCRATCH_DEV || \
> +	_notrun "Feature casefold required for this test"
> +}

I've just pushed out a commit to ext4.git tree which will cause
/sys/fs/ext4/features/casefold will exist iff CONFIG_UNICODE is
present.  This will allow the test to check whether or not the kernel
version and configuration will support the casefold feature.

Could you add a check for this flag if the file system type is ext4?

A file system independent way of doing this would be to create a test
file system on the test file system, calling "chattr +F" on the
directory.  If it fails, then either the file system doesn't support
it or the chattr program is too old and doesn't support casefold.  If
the chattr +F succeeds, then the test should call lsattr -d on the
directory and make sure the request to set casefold flag was actually
honored; some file systems will simply fail to set flags that they
don't support, so we do need to do a SETFLAGS followed by a GETFLAGS
to be sure that it was supported.

Speaking of file system independent casefold, I believe that it will
be likely that the casefold feature will be supported by f2fs in the
fullness of time.  If that happens, how to test for the file system
feature will be different (since dumpe2fs is ext4-specific), but I
would expect "chattr +F" interface to be the same between ext4 and
f2fs.

This might mean that we should add casefold tests to either generic/
or shared/ instead of ext4/ --- I think it would be shared since at
least initially it would only be ext4 and f2fs, and I haven't seen any
indication than other file systems would be interested in adding
casefold support.  Or we can move the casefold tests later from ext4/
to shared/ once the f2fs support materializes.

Cheers,

						- Ted

  parent reply	other threads:[~2019-05-06 20:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-06 18:59 [PATCH xfstests 1/2] common/casefold: Add infrastructure to test filename casefold feature Gabriel Krisman Bertazi
2019-05-06 18:59 ` [PATCH xfstests 2/2] ext4/035: Add tests for filename casefolding feature Gabriel Krisman Bertazi
2019-05-06 20:03 ` Theodore Ts'o [this message]
2019-05-06 20:32   ` [PATCH xfstests 1/2] common/casefold: Add infrastructure to test filename casefold feature 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=20190506200325.GA3985@mit.edu \
    --to=tytso@mit.edu \
    --cc=fstests@vger.kernel.org \
    --cc=krisman@collabora.com \
    --cc=linux-ext4@vger.kernel.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).