Don't forward console_in to both /dev/ttyS0 and /dev/hvc0
Previously, console_in was forwarded to both /dev/ttyS0 and /dev/hvc0.
This was wrong because data typed into console_in was sometimes consumed
by /dev/ttyS0, and sometimes by /dev/hvc0. This was non-deterministic
and also has caused test flakiness.
Fixing this by not sending the stream to /dev/ttyS0 which is for early
kernel outputs before virtio-console driver is loaded. We don't need the
serial device to be bi-directional.
Bug: 289732678
Test: run MicrodroidTestApp multiple times
Test: run Microdroid, type in something. check /dev/ttyS0 in the
Microdroid; it shows nothing. (Previously, it showed some partial
characters typed in.)
Change-Id: Ia8982fc7fbc917edb53de4e19bd1e81fa68a4fbf
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 13367c3..a344847 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -792,7 +792,7 @@
// devices in the same PCI bus and serial devices comes before the block devices. Arm crosvm
// doesn't have the issue.
// /dev/ttyS0
- command.arg(format!("--serial={}{},hardware=serial,num=1", &console_out_arg, &console_in_arg));
+ command.arg(format!("--serial={},hardware=serial,num=1", &console_out_arg));
// /dev/ttyS1
command.arg(format!("--serial=type=file,path={},hardware=serial,num=2", &failure_serial_path));
// /dev/hvc0