m/n/b/mkverity: produce a combined image

mkverity was updated to output a copy of the source image, with Verity
metadata appended to it, instead of a separate hash image. This is
needed by the upcoming verity rootfs implementation.

Change-Id: I2a311da6851dabf5a09d77551dc3e9d35bcc845f
Reviewed-on: https://review.monogon.dev/c/monogon/+/525
Reviewed-by: Sergiusz Bazanski <serge@monogon.tech>
diff --git a/metropolis/pkg/verity/encoder_test.go b/metropolis/pkg/verity/encoder_test.go
index c3a39fb..b53e06e 100644
--- a/metropolis/pkg/verity/encoder_test.go
+++ b/metropolis/pkg/verity/encoder_test.go
@@ -104,8 +104,9 @@
 	require.NoError(t, err, "while opening the hash device at %s", hashDevPath)
 
 	// Create a Verity encoder, backed with hfd. Configure it to write the
-	// Verity superblock.
-	verityEnc, err := NewEncoder(hfd, true)
+	// Verity superblock. Use 4096-byte blocks.
+	bs := uint32(4096)
+	verityEnc, err := NewEncoder(hfd, bs, bs, true)
 	require.NoError(t, err, "while creating a Verity encoder")
 
 	// Write pseudorandom data both to the Verity-protected data device, and
@@ -124,9 +125,10 @@
 	err = dfd.Close()
 	require.NoError(t, err, "while closing the data device descriptor")
 
-	// Generate the Verity mapping table based on the encoder state and
-	// device file paths, then return it along with the test data buffer.
-	mt, err := verityEnc.MappingTable(dataDevPath, hashDevPath)
+	// Generate the Verity mapping table based on the encoder state, device
+	// file paths and the metadata starting block, then return it along with
+	// the test data buffer.
+	mt, err := verityEnc.MappingTable(dataDevPath, hashDevPath, 0)
 	require.NoError(t, err, "while building a Verity mapping table")
 	return verityDMTarget(mt), testData
 }