Merge "Always log to logcat"
diff --git a/.prebuilt_info/prebuilt_info_pvmfw_pvmfw_img.asciipb b/.prebuilt_info/prebuilt_info_pvmfw_pvmfw_img.asciipb
index 4199b2b..a8abf97 100644
--- a/.prebuilt_info/prebuilt_info_pvmfw_pvmfw_img.asciipb
+++ b/.prebuilt_info/prebuilt_info_pvmfw_pvmfw_img.asciipb
@@ -1,6 +1,6 @@
drops {
android_build_drop {
- build_id: "8134799"
+ build_id: "8149267"
target: "u-boot_pvmfw"
source_file: "pvmfw.img"
}
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 6338c82..7be81a8 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -7,7 +7,7 @@
"name": "ComposHostTestCases"
},
{
- "name": "VirtualizationTestCases"
+ "name": "VirtualizationTestCases.64"
},
{
"name": "MicrodroidTestApp"
diff --git a/authfs/tests/Android.bp b/authfs/tests/Android.bp
index ca403e8..c8d780d 100644
--- a/authfs/tests/Android.bp
+++ b/authfs/tests/Android.bp
@@ -15,6 +15,7 @@
],
test_suites: ["general-tests"],
data_device_bins: ["open_then_run"],
+ per_testcase_directory: true,
data: [
":authfs_test_files",
":MicrodroidTestApp.signed",
diff --git a/compos/tests/Android.bp b/compos/tests/Android.bp
index d380059..c178ddd 100644
--- a/compos/tests/Android.bp
+++ b/compos/tests/Android.bp
@@ -13,5 +13,7 @@
static_libs: [
"VirtualizationTestHelper",
],
- test_suites: ["general-tests"],
+ test_suites: [
+ "general-tests",
+ ],
}
diff --git a/docs/getting_started/index.md b/docs/getting_started/index.md
index 6d3b208..ac5d38b 100644
--- a/docs/getting_started/index.md
+++ b/docs/getting_started/index.md
@@ -36,7 +36,7 @@
all can run via `atest`.
```shell
-atest VirtualizationTestCases
+atest VirtualizationTestCases.64
atest MicrodroidHostTestCases
atest MicrodroidTestApp
```
diff --git a/microdroid/Android.bp b/microdroid/Android.bp
index 3566bd2..7384cef 100644
--- a/microdroid/Android.bp
+++ b/microdroid/Android.bp
@@ -518,11 +518,6 @@
prebuilt_etc {
name: "microdroid_uboot_env",
src: ":microdroid_uboot_env_gen",
- arch: {
- x86_64: {
- src: ":microdroid_uboot_env_gen_x86_64",
- },
- },
filename: "uboot_env.img",
}
@@ -546,26 +541,6 @@
"--image $(out)",
}
-genrule {
- name: "microdroid_uboot_env_gen_x86_64",
- tools: [
- "mkenvimage_host",
- "avbtool",
- ],
- srcs: [
- "uboot-env-x86_64.txt",
- ":microdroid_sign_key",
- ],
- out: ["output.img"],
- cmd: "$(location mkenvimage_host) -s 4096 -o $(out) $(location uboot-env-x86_64.txt) && " +
- "$(location avbtool) add_hash_footer " +
- "--algorithm SHA256_RSA4096 " +
- "--partition_name uboot_env " +
- "--key $(location :microdroid_sign_key) " +
- "--partition_size $$(( " + avb_hash_footer_kb + " * 1024 + ( $$(stat --format=%s $(out)) + 4096 - 1 ) / 4096 * 4096 )) " +
- "--image $(out)",
-}
-
// Note that keys can be different for filesystem images even though we're using the same key
// for microdroid. However, the key signing VBmeta should match with the pubkey embedded in
// bootloader.
diff --git a/microdroid/uboot-env-x86_64.txt b/microdroid/uboot-env-x86_64.txt
deleted file mode 100644
index 07a9b18..0000000
--- a/microdroid/uboot-env-x86_64.txt
+++ /dev/null
@@ -1,18 +0,0 @@
-# Static u-boot environment variables for microdroid. See b/180481192
-
-# Boot the device following the Android boot procedure
-# `0` is the disk number of os_composite.img
-# `a` and `_a` are the slot index for A/B
-bootcmd=verified_boot_android virtio 0 a
-
-bootdelay=0
-
-# U-Boot in x86_64 by defaults loads kernel at 0x20000000 (512MB), which is
-# out of the physical memory when the VM is launched with the default memory
-# size of 256MB. To avoid that, explicitly set the kernel load addresss using
-# loadaddr variable.
-loadaddr=0x02000000
-fdtaddr=0x40000000
-
-# Microdroid doesn't use keymint yet
-android_keymint_needed=N
diff --git a/microdroid/uboot-env.txt b/microdroid/uboot-env.txt
index 0385b50..e5f8b79 100644
--- a/microdroid/uboot-env.txt
+++ b/microdroid/uboot-env.txt
@@ -1,12 +1 @@
-# Static u-boot environment variables for microdroid. See b/180481192
-
-# Boot the device following the Android boot procedure
-# `0` is the disk number of os_composite.img
-# `a` and `_a` are the slot index for A/B
-bootcmd=verified_boot_android virtio 0 a
-
-bootdelay=0
-fdtaddr=0x80000000
-
-# Microdroid doesn't use keymint yet
-android_keymint_needed=N
+# Empty environment for bootloader debugging
diff --git a/pvmfw/pvmfw.img b/pvmfw/pvmfw.img
index a2541a3..c036c76 100644
--- a/pvmfw/pvmfw.img
+++ b/pvmfw/pvmfw.img
Binary files differ
diff --git a/tests/Android.bp b/tests/Android.bp
index cf720f1..58cc06f 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -22,8 +22,13 @@
kernel_modules_stem = "virt_device_prebuilts_kernel_modules-" + kernel_version
cc_test {
- name: "VirtualizationTestCases",
- test_suites: ["general-tests"],
+ // ".64" suffix is to work around cts-unit-test which is demanding that all
+ // executables in CTS should have both 32 and 64 ABIs.
+ name: "VirtualizationTestCases.64",
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
srcs: [
"common.cc",
"vsock_test.cc",
diff --git a/tests/AndroidTest.xml b/tests/AndroidTest.xml
index 5e7faf9..68e9c1b 100644
--- a/tests/AndroidTest.xml
+++ b/tests/AndroidTest.xml
@@ -15,11 +15,16 @@
-->
<configuration description="Config for Virtualization tests">
+ <option name="test-suite-tag" value="cts" />
+ <option name="config-descriptor:metadata" key="component" value="security" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
<!-- Push test binaries to the device. -->
<target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
<option name="cleanup" value="true" />
<option name="abort-on-push-failure" value="true" />
- <option name="push-file" key="VirtualizationTestCases" value="/data/local/tmp/virt-test/VirtualizationTestCases" />
+ <option name="push-file" key="VirtualizationTestCases.64" value="/data/local/tmp/virt-test/VirtualizationTestCases.64" />
<option name="push-file" key="virt_test_kernel" value="/data/local/tmp/virt-test/kernel" />
<option name="push-file" key="virt_test_initramfs.img" value="/data/local/tmp/virt-test/initramfs" />
</target_preparer>
@@ -30,7 +35,7 @@
<test class="com.android.tradefed.testtype.GTest" >
<option name="native-test-device-path" value="/data/local/tmp/virt-test" />
- <option name="module-name" value="VirtualizationTestCases" />
+ <option name="module-name" value="VirtualizationTestCases.64" />
<!-- test-timeout unit is ms, value = 2 minutes -->
<option name="native-test-timeout" value="120000" />
</test>
diff --git a/tests/aidl/Android.bp b/tests/aidl/Android.bp
index a2315ce..893ec0b 100644
--- a/tests/aidl/Android.bp
+++ b/tests/aidl/Android.bp
@@ -9,7 +9,7 @@
backend: {
java: {
platform_apis: true,
- require_rpc: true,
+ gen_rpc: true,
},
cpp: {
enabled: true,
diff --git a/tests/hostside/Android.bp b/tests/hostside/Android.bp
index d1318b5..9bab286 100644
--- a/tests/hostside/Android.bp
+++ b/tests/hostside/Android.bp
@@ -5,12 +5,16 @@
java_test_host {
name: "MicrodroidHostTestCases",
srcs: ["java/**/*.java"],
- test_suites: ["general-tests"],
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
libs: [
"tradefed",
],
static_libs: [
"VirtualizationTestHelper",
],
+ per_testcase_directory: true,
data: [":MicrodroidTestApp.signed"],
}
diff --git a/tests/hostside/AndroidTest.xml b/tests/hostside/AndroidTest.xml
index e8aced6..79428ce 100644
--- a/tests/hostside/AndroidTest.xml
+++ b/tests/hostside/AndroidTest.xml
@@ -14,6 +14,11 @@
limitations under the License.
-->
<configuration description="Tests for microdroid">
+ <option name="test-suite-tag" value="cts" />
+ <option name="config-descriptor:metadata" key="component" value="security" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
<test class="com.android.compatibility.common.tradefed.testtype.JarHostTest" >
<option name="jar" value="MicrodroidHostTestCases.jar" />
</test>
diff --git a/tests/testapk/Android.bp b/tests/testapk/Android.bp
index 7dca024..5c5e608 100644
--- a/tests/testapk/Android.bp
+++ b/tests/testapk/Android.bp
@@ -4,7 +4,10 @@
android_test {
name: "MicrodroidTestApp",
- test_suites: ["general-tests"],
+ test_suites: [
+ "cts",
+ "general-tests",
+ ],
srcs: ["src/java/**/*.java"],
static_libs: [
"androidx.test.runner",
@@ -16,6 +19,8 @@
jni_libs: ["MicrodroidTestNativeLib"],
platform_apis: true,
use_embedded_native_libs: true,
+ // We only support 64-bit ABI, but CTS demands all APKs to be multi-ABI.
+ compile_multilib: "both",
}
// TODO(jiyong): make this a binary, not a shared library
diff --git a/tests/testapk/AndroidTest.xml b/tests/testapk/AndroidTest.xml
index c7097db..e8bb1aa 100644
--- a/tests/testapk/AndroidTest.xml
+++ b/tests/testapk/AndroidTest.xml
@@ -14,7 +14,12 @@
limitations under the License.
-->
<configuration description="Runs sample instrumentation test.">
- <target_preparer class="com.android.tradefed.targetprep.TestAppInstallSetup">
+ <option name="test-suite-tag" value="cts" />
+ <option name="config-descriptor:metadata" key="component" value="security" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_instant_app" />
+ <option name="config-descriptor:metadata" key="parameter" value="not_multi_abi" />
+ <option name="config-descriptor:metadata" key="parameter" value="secondary_user" />
+ <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
<option name="test-file-name" value="MicrodroidTestApp.apk" />
</target_preparer>
<target_preparer class="com.android.tradefed.targetprep.RunCommandTargetPreparer">
diff --git a/virtualizationservice/src/crosvm.rs b/virtualizationservice/src/crosvm.rs
index 352ed50..2c50fed 100644
--- a/virtualizationservice/src/crosvm.rs
+++ b/virtualizationservice/src/crosvm.rs
@@ -271,8 +271,7 @@
.arg(config.cid.to_string());
if config.protected {
- // TODO: Go back to "--protected-vm" once pVM firmware is fixed.
- command.arg("--protected-vm-without-firmware");
+ command.arg("--protected-vm");
}
if let Some(memory_mib) = config.memory_mib {