On Mon, Feb 14, 2022 at 04:09:55PM -0800, Boris Burkov wrote: > diff --git a/common/verity b/common/verity > index 38eea157..eec8ae72 100644 > --- a/common/verity > +++ b/common/verity > @@ -3,6 +3,8 @@ > # > # Functions for setting up and testing fs-verity > > +. common/btrfs Why does common/btrfs need to be included here? > +# Check for userspace tools needed to corrupt verity data or metadata. > +_require_fsverity_corruption() > +{ > + _require_xfs_io_command "fiemap" > + if [ $FSTYP == "btrfs" ]; then > + _require_btrfs_corrupt_block > + fi > +} Which function(s), specifically, is this function a prerequisite for? Based on the name, it sounds like it would be a prerequisite for calling _fsv_scratch_corrupt_bytes() and _fsv_scratch_corrupt_merkle_tree(). But that's apparently not the case, seeing as generic/576 calls _fsv_scratch_corrupt_bytes() but doesn't call _require_fsverity_corruption(), and your new test btrfs/290 calls _require_fsverity_corruption() but doesn't call either _fsv_scratch_corrupt_bytes() or _fsv_scratch_corrupt_merkle_tree(). So, the purpose of this function is unclear. Perhaps it should be a prerequisite for all _fsv_scratch_corrupt*() functions, and btrfs/290 should check for btrfs-corrupt-block directly? - Eric