[avb] Verify vbmeta for payload with no initrd
Verifies that vbmeta doesn't have initrd hash descriptors when
payload has initrd == None.
Bug: 256148034
Test: m pvmfw_img && atest libpvmfw_avb.integration_test
Change-Id: I20a0d4798f535fa78fc5d56415653a860d1d2ae9
diff --git a/pvmfw/avb/Android.bp b/pvmfw/avb/Android.bp
index 1c5e91a..0527dfb 100644
--- a/pvmfw/avb/Android.bp
+++ b/pvmfw/avb/Android.bp
@@ -36,6 +36,8 @@
":microdroid_initrd_normal",
":microdroid_initrd_debuggable",
":test_image_with_one_hashdesc",
+ ":test_image_with_non_initrd_hashdesc",
+ ":test_image_with_prop_desc",
":unsigned_test_image",
],
prefer_rlib: true,
@@ -64,6 +66,38 @@
cmd: "$(location avbtool) generate_test_image --image_size 16384 --output $(out)",
}
+avb_gen_vbmeta_image {
+ name: "test_non_initrd_hashdesc",
+ src: ":unsigned_test_image",
+ partition_name: "non_initrd11",
+ salt: "2222",
+}
+
+avb_add_hash_footer {
+ name: "test_image_with_non_initrd_hashdesc",
+ src: ":unsigned_test_image",
+ partition_name: "boot",
+ private_key: ":pvmfw_sign_key",
+ salt: "1111",
+ include_descriptors_from_images: [
+ ":test_non_initrd_hashdesc",
+ ],
+}
+
+avb_add_hash_footer {
+ name: "test_image_with_prop_desc",
+ src: ":unsigned_test_image",
+ partition_name: "boot",
+ private_key: ":pvmfw_sign_key",
+ salt: "1111",
+ props: [
+ {
+ name: "mock_prop",
+ value: "3333",
+ },
+ ],
+}
+
avb_add_hash_footer {
name: "test_image_with_one_hashdesc",
src: ":unsigned_test_image",