Project

General

Profile

action #91965

Enable switching to the qemu serial0 line

Added by dancermak 3 months ago. Updated 2 months ago.

Status:
Workable
Priority:
Low
Assignee:
-
Category:
Feature requests
Target version:
Start date:
2021-04-29
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Motivation

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?

Acceptance criteria

  • AC1: The primary serial console in a qemu SUT can be written to from openQA tests

Suggestions

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

History

#1 Updated by okurz 3 months ago

  • Category set to Feature requests
  • Target version set to Ready

#2 Updated by okurz 3 months ago

  • Description updated (diff)
  • Status changed from New to Workable
  • Priority changed from Normal to Low

#3 Updated by okurz 3 months ago

  • Status changed from Workable to Feedback
  • Assignee set to okurz

#4 Updated by okurz 2 months ago

  • Status changed from Feedback to Workable
  • Assignee deleted (okurz)
  • Target version changed from Ready to future

sorry I could not offer more so far.

Also available in: Atom PDF