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


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to