Support console input to VM
createVm accepts a new ParcelFileDescriptor which when set is used as
the console input in the VM. The `vm` tool sets this to stdin unless
explicitly specified via `--console-in`. This will be useful for
bringing up custom OSes.
Note that Java APIs for this is not added in this CL.
Bug: 263360203
Test: Start a vm using the `vm` tool. Type something. Then do `cat
/dev/console` in the VM. It shows the typed characters.
Change-Id: I5d0dfcc4852387ec50897a8dcae2935dd4a2dd9a
diff --git a/rialto/tests/test.rs b/rialto/tests/test.rs
index 7048b44..98c935d 100644
--- a/rialto/tests/test.rs
+++ b/rialto/tests/test.rs
@@ -114,8 +114,15 @@
taskProfiles: vec![],
gdbPort: 0, // No gdb
});
- let vm = VmInstance::create(service.as_ref(), &config, Some(console), Some(log), None)
- .context("Failed to create VM")?;
+ let vm = VmInstance::create(
+ service.as_ref(),
+ &config,
+ Some(console),
+ /* consoleIn */ None,
+ Some(log),
+ None,
+ )
+ .context("Failed to create VM")?;
vm.start().context("Failed to start VM")?;