[service-vm] Identitfy service VM in pvmfw with avb property

The kernel footer only accepted hash descriptor prior to this change.
With this change, at most one property descriptor is allow to
indicate that this VM is a service VM.

Test: atest libpvmfw_avb.integration_test
Bug: 279557218
Change-Id: Ied476eba2e88be63ab78eae7ed05512a97406ec2
diff --git a/pvmfw/avb/Android.bp b/pvmfw/avb/Android.bp
index 90f3971..5353a21 100644
--- a/pvmfw/avb/Android.bp
+++ b/pvmfw/avb/Android.bp
@@ -42,6 +42,10 @@
         ":test_image_with_non_initrd_hashdesc",
         ":test_image_with_initrd_and_non_initrd_desc",
         ":test_image_with_prop_desc",
+        ":test_image_with_service_vm_prop",
+        ":test_image_with_unknown_vm_type_prop",
+        ":test_image_with_multiple_props",
+        ":test_image_with_duplicated_capability",
         ":unsigned_test_image",
     ],
     prefer_rlib: true,
@@ -127,6 +131,66 @@
 }
 
 avb_add_hash_footer {
+    name: "test_image_with_service_vm_prop",
+    src: ":unsigned_test_image",
+    partition_name: "boot",
+    private_key: ":pvmfw_sign_key",
+    salt: "2131",
+    props: [
+        {
+            name: "com.android.virt.cap",
+            value: "remote_attest",
+        },
+    ],
+}
+
+avb_add_hash_footer {
+    name: "test_image_with_unknown_vm_type_prop",
+    src: ":unsigned_test_image",
+    partition_name: "boot",
+    private_key: ":pvmfw_sign_key",
+    salt: "2132",
+    props: [
+        {
+            name: "com.android.virt.cap",
+            value: "foo",
+        },
+    ],
+}
+
+avb_add_hash_footer {
+    name: "test_image_with_multiple_props",
+    src: ":unsigned_test_image",
+    partition_name: "boot",
+    private_key: ":pvmfw_sign_key",
+    salt: "2133",
+    props: [
+        {
+            name: "com.android.virt.cap",
+            value: "remote_attest",
+        },
+        {
+            name: "another_vm_type",
+            value: "foo_vm",
+        },
+    ],
+}
+
+avb_add_hash_footer {
+    name: "test_image_with_duplicated_capability",
+    src: ":unsigned_test_image",
+    partition_name: "boot",
+    private_key: ":pvmfw_sign_key",
+    salt: "2134",
+    props: [
+        {
+            name: "com.android.virt.cap",
+            value: "remote_attest|remote_attest|remote_attest",
+        },
+    ],
+}
+
+avb_add_hash_footer {
     name: "test_image_with_one_hashdesc",
     src: ":unsigned_test_image",
     partition_name: "boot",