Test: Protected VM fails if images are signed by unknown
Arrange:
- prepare VM images signed with a test key
Act:
- start a protected VM
Assert:
- a boot process fails due to pubkey mismatch between pvmfw and
bootloader
Bug: 218934597
Test: atest MicrodroidHostTestCases
Change-Id: I05755ddf32839ef531ca9a11b2939bbc251ff1fb
diff --git a/tests/hostside/Android.bp b/tests/hostside/Android.bp
index 10bcbf4..67a0e8d 100644
--- a/tests/hostside/Android.bp
+++ b/tests/hostside/Android.bp
@@ -10,6 +10,7 @@
"general-tests",
],
libs: [
+ "gson-prebuilt-jar",
"tradefed",
],
static_libs: [
@@ -19,6 +20,31 @@
data: [
":MicrodroidTestApp",
":microdroid_general_sepolicy.conf",
+ ":test.com.android.virt.pem",
+ ":test-payload-metadata",
],
- data_native_bins: ["sepolicy-analyze"],
+ data_native_bins: [
+ "sepolicy-analyze",
+ // For re-sign test
+ "avbtool",
+ "img2simg",
+ "lpmake",
+ "lpunpack",
+ "sign_virt_apex",
+ "simg2img",
+ ],
+ // java_test_host doesn't have data_native_libs but jni_libs can be used to put
+ // native modules under ./lib directory.
+ // This works because host tools have rpath (../lib and ./lib).
+ jni_libs: [
+ "libbase",
+ "libc++",
+ "libcrypto_utils",
+ "libcrypto",
+ "libext4_utils",
+ "liblog",
+ "liblp",
+ "libsparse",
+ "libz",
+ ],
}