Allow VM logging from compos_verify
We no longer need the never_log parameter (it is always false), so
remove it.
Note that logs are only written when the VM is debuggable, which is
currently only when only non-protected VMs are available.
Bug: 235350758
Test: Force debug on, stage APEX, compile, reboot -> see vm logs
Test: Presubmit
Change-Id: Iba94111d4046f30766a60d9edbe718e9049222cb
diff --git a/compos/common/compos_client.rs b/compos/common/compos_client.rs
index fe31b27..1fd939d 100644
--- a/compos/common/compos_client.rs
+++ b/compos/common/compos_client.rs
@@ -58,8 +58,6 @@
pub config_path: Option<String>,
/// If present, overrides the amount of RAM to give the VM
pub memory_mib: Option<i32>,
- /// Never save VM logs to files.
- pub never_log: bool,
}
impl ComposClient {
@@ -94,7 +92,7 @@
(true, false) => DebugLevel::NONE,
};
- let (console_fd, log_fd) = if parameters.never_log || debug_level == DebugLevel::NONE {
+ let (console_fd, log_fd) = if debug_level == DebugLevel::NONE {
(None, None)
} else {
// Console output and the system log output from the VM are redirected to file.
diff --git a/compos/verify/verify.rs b/compos/verify/verify.rs
index 7a22cfd..64ae75f 100644
--- a/compos/verify/verify.rs
+++ b/compos/verify/verify.rs
@@ -104,7 +104,7 @@
instance_image,
&idsig,
&idsig_manifest_apk,
- &VmParameters { debug_mode, never_log: !debug_mode, ..Default::default() },
+ &VmParameters { debug_mode, ..Default::default() },
)?;
let service = vm_instance.get_service()?;