Explicitly run compos_verity with 1 vCPU
Instead of relying on the default, be explicit.
Bug: None
Test: com.android.tests.odsign.CompOsSigningHostTest
Change-Id: I4ae58194823f2afce55052d020af891890ea4871
diff --git a/compos/verify/verify.rs b/compos/verify/verify.rs
index 71d8bcc..528719f 100644
--- a/compos/verify/verify.rs
+++ b/compos/verify/verify.rs
@@ -33,6 +33,7 @@
use log::error;
use std::fs::File;
use std::io::Read;
+use std::num::NonZeroU32;
use std::panic;
use std::path::Path;
@@ -114,7 +115,11 @@
&idsig,
&idsig_manifest_apk,
&idsig_manifest_ext_apk,
- &VmParameters { debug_mode: args.debug, ..Default::default() },
+ &VmParameters {
+ cpus: Some(NonZeroU32::new(1).unwrap()), // This VM runs very little work at boot
+ debug_mode: args.debug,
+ ..Default::default()
+ },
)?;
let service = vm_instance.connect_service()?;