This patchset adds tests for the FS_IOC_READ_VERITY_METADATA ioctl (https://lkml.kernel.org/linux-fscrypt/20210115181819.34732-1-ebiggers@xxxxxxxxxx/T/#u). Running these tests requires a kernel at commit f7b36dc5cb37 or later for FS_IOC_READ_VERITY_METADATA support, and fsverity-utils at commit cf8fa5e5a7ac or later for 'dump_metadata' subcommand support. Like the other fs-verity tests, they also require an ext4 or f2fs filesystem, and CONFIG_FS_VERITY=y. The second test also requires CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y. As usual the tests will skip themselves if the prerequisites aren't met. Changed v1 => v2: - Updated cover letter and removed RFC tag, now that the kernel and fsverity-utils patches have been merged. - Added executable bit to generic/902. - Improved some comments in common/verity. Eric Biggers (4): generic: factor out helpers for fs-verity built-in signatures generic: add helpers for dumping fs-verity metadata generic: test retrieving verity Merkle tree and descriptor generic: test retrieving verity signature common/verity | 73 ++++++++++++++++++++++++++++++++++++++- tests/generic/577 | 15 ++------ tests/generic/901 | 79 +++++++++++++++++++++++++++++++++++++++++++ tests/generic/901.out | 16 +++++++++ tests/generic/902 | 66 ++++++++++++++++++++++++++++++++++++ tests/generic/902.out | 7 ++++ tests/generic/group | 2 ++ 7 files changed, 245 insertions(+), 13 deletions(-) create mode 100755 tests/generic/901 create mode 100644 tests/generic/901.out create mode 100644 tests/generic/902 create mode 100644 tests/generic/902.out -- 2.30.1