mbox series

[0/4] xfstests: test custom crypto data unit size

Message ID 20231013061403.138425-1-ebiggers@kernel.org (mailing list archive)
Headers show
Series xfstests: test custom crypto data unit size | expand

Message

Eric Biggers Oct. 13, 2023, 6:13 a.m. UTC
This series adds a test for the functionality introduced by the kernel
patch
"fscrypt: support crypto data unit size less than filesystem block size"
(https://lore.kernel.org/linux-fscrypt/20230925055451.59499-6-ebiggers@kernel.org/).
It is a ciphertext verification test, as opposed to general I/O test.

This feature is not yet in mainline, but I've applied it for 6.7.

The test depends on an xfsprogs patch that adds the '-s' option to the
set_encpolicy command of xfs_io, allowing the new log2_data_unit_size
field to be set via a shell script.

As usual, the test skips itself when any prerequisite isn't met.

Eric Biggers (4):
  fscrypt-crypt-util: rename block to data unit
  common/rc: fix _require_xfs_io_command with digits in argument
  common/encrypt: support custom data unit size
  generic: add test for custom crypto data unit size

 common/encrypt           | 42 +++++++++++++-----
 common/rc                |  2 +-
 src/fscrypt-crypt-util.c | 93 ++++++++++++++++++++--------------------
 tests/f2fs/002           |  6 +--
 tests/generic/900        | 27 ++++++++++++
 tests/generic/900.out    | 11 +++++
 6 files changed, 121 insertions(+), 60 deletions(-)
 create mode 100755 tests/generic/900
 create mode 100644 tests/generic/900.out


base-commit: 59299b65ac8f15935ab45e7920cbfda8a6beffd1