FS/XFS testing framework
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Jan Prusakowski <jprusakowski@google.com>
Cc: Zorro Lang <zlang@kernel.org>, Chao Yu <chao@kernel.org>,
	fstests@vger.kernel.org, jaegeuk@kernel.org,
	linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [PATCH v1] common/encrypt: Do not run _verify_ciphertext_for_encryption_policy on compressed FS
Date: Thu, 4 Sep 2025 17:39:17 +0000	[thread overview]
Message-ID: <20250904173917.GB854551@google.com> (raw)
In-Reply-To: <20250904085449.290354-1-jprusakowski@google.com>

On Thu, Sep 04, 2025 at 10:54:49AM +0200, Jan Prusakowski wrote:
> _verify_ciphertext_for_encryption_policy() checks if encryption works
> correctly by reading encrypted file's contents directly from a block device and
> comparing it to a known good ciphertext.
> 
> This, however, won't work if the file systems is also compressed. So this patch
> disables tests using this function when a compressed FS is used.

Apparently this is for f2fs.  There isn't really any such thing as a
"compressed filesystem" for f2fs.  Rather, f2fs supports compression on
a per-file basis: the filesystem can contain a mix of compressed and
uncompressed files.  Probably you used 'compression_extension=*', which
caused f2fs to automatically enable compression on the files that
xfstests created, which caused the test failure.  But that behavior is
specific to 'compress_extension=*', not to compression support per se.

> diff --git a/common/f2fs b/common/f2fs
> index 1b39d8ce..c46e2aa2 100644
> --- a/common/f2fs
> +++ b/common/f2fs
> @@ -25,3 +25,10 @@ _require_scratch_f2fs_compression()
>  		_scratch_unmount
>  	fi
>  }
> +
> +_require_f2fs_no_compress()
> +{
> +	if _normalize_mount_options "$MOUNT_OPTIONS" | grep -q "compress"; then
> +		_notrun "This test requires no compression enabled"
> +	fi
> +}

That just checks for compression support, not whether the test file is
actually compressed.

But also, we don't really need to skip these tests.  Instead, how about
using 'chattr +m' to explicitly set the test file to uncompressed?

- Eric

  reply	other threads:[~2025-09-04 17:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-04  8:54 [PATCH v1] common/encrypt: Do not run _verify_ciphertext_for_encryption_policy on compressed FS Jan Prusakowski
2025-09-04 17:39 ` Eric Biggers [this message]
2025-09-12 13:11   ` Jan Prusakowski

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=20250904173917.GB854551@google.com \
    --to=ebiggers@kernel.org \
    --cc=chao@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=jprusakowski@google.com \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=zlang@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