@@ -141,6 +141,12 @@ _require_fsverity_dump_metadata()
_fail "Unexpected output from 'fsverity dump_metadata': $(<"$tmpfile")"
}
+# Check for userspace tools needed to corrupt verity data or metadata.
+_require_fsverity_corruption()
+{
+ _require_xfs_io_command "fiemap"
+}
+
_scratch_mkfs_verity()
{
case $FSTYP in
@@ -28,6 +28,7 @@ _cleanup()
_supported_fs generic
_require_scratch_verity
_disable_fsverity_signatures
+_require_fsverity_corruption
_scratch_mkfs_verity &>> $seqres.full
_scratch_mount
@@ -28,6 +28,7 @@ _supported_fs generic
_require_scratch_verity
_require_scratch_encryption
_require_command "$KEYCTL_PROG" keyctl
+_require_fsverity_corruption
_disable_fsverity_signatures
_scratch_mkfs_encrypted_verity &>> $seqres.full