Enable switching to the qemu serial0 line
I am writing a test for an appliance that launches an installer after confirmation (send enter) over the serial line. This can be achieved rather easily in virt-manager by switching the default console from "graphical spice console" to "serial 1" and pressing enter there. Unfortunately, I cannot achieve the same in openQA. It records the output from the serial line into
/var/lib/openqa/pool/$worker_id/serial0, but I am not able to switch to this serial line or send something to it.
Is this somehow possible or generally unsupported?
- AC1: The primary serial console in a qemu SUT can be written to from openQA tests
Right now we hardcode "serial0" as the first and only device that is setup as a serial terminal for a qemu instance. This device is used by writing command outputs to a logfile by forwarding script output to the variable "$SERIALDEV", e.g. ttyS0 in GNU/Linux in script commands like
assert_script_run 'true' that end up being executed in SUTs like
true ; echo ...$? > /dev/ttyS0. The logfile is then read by commands like
wait_serial. Maybe we can make the name of the device+logfile configurable and add an option to configure a serial device before that internal logging device
#3 Updated by okurz over 1 year ago
- Status changed from Workable to Feedback
- Assignee set to okurz
Just a simple idea so far: https://github.com/os-autoinst/os-autoinst/pull/1662