Change name we use for virtio serial consoles

There is nothing inherently 'root'-y about these so it makes no
sense to prefix their names with 'root-'. And why change from
'console' to 'terminal' compared to the naming used in the
actual qemu command and the log files? It's just confusing.
Let's be consistent (except for using - instead of _ here...
but - is easier to type!)

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2019-11-20 08:39:28 -08:00
parent 73ca0f2d3f
commit 48b6c9d3e9
5 changed files with 16 additions and 14 deletions

View File

@ -123,7 +123,7 @@ sub root_console {
elsif (get_var("SERIAL_CONSOLE")) {
# select first virtio terminal, we rely on anaconda having run
# a root shell on it for us
select_console("root-virtio-terminal");
select_console("virtio-console");
# as we don't have any live image serial install tests, we
# know we don't need to login
return;

View File

@ -22,11 +22,13 @@ sub init() {
my ($self) = @_;
$self->SUPER::init();
# This initiates the serial console as "root-virtio-terminal".
# Initialize the first virtio serial console as "virtio-console"
if (check_var('BACKEND', 'qemu')) {
$self->add_console('root-virtio-terminal', 'virtio-terminal', {});
$self->add_console('virtio-console', 'virtio-console', {});
for (my $num = 1; $num < get_var('VIRTIO_CONSOLE_NUM', 1); $num++) {
$self->add_console('root-virtio-terminal' . $num, 'virtio-terminal', {socked_path => cwd() . '/virtio_console' . $num});
# initialize second virtio serial console as
# "virtio-console1", third as "virtio-console2" etc.
$self->add_console('virtio-console' . $num, 'virtio-console', {socked_path => cwd() . '/virtio_console' . $num});
}
}
}

View File

@ -18,7 +18,7 @@ sub root_console {
if (get_var("SERIAL_CONSOLE")) {
# select the first virtio terminal, for now we assume we can
# always use that (we may have to make this smarter in future)
select_console("root-virtio-terminal");
select_console("virtio-console");
}
else {
# For normal terminal emulation, use key combo to reach a tty

View File

@ -47,13 +47,13 @@ sub run {
# displaying information but does not accept key strokes. Therefore,
# let us use a real virtio console here.
if (get_var("SERIAL_CONSOLE")) {
# this is icky. on ppc64 (OFW), virtio-terminal is hvc1 and
# virtio-terminal1 is hvc2, because the 'standard' serial
# this is icky. on ppc64 (OFW), virtio-console is hvc1 and
# virtio-console1 is hvc2, because the 'standard' serial
# terminal is hvc0 (the firmware does this or something).
# On other arches, the 'standard' serial terminal is ttyS0,
# so virtio-terminal becomes hvc0 and virtio-terminal1 is
# so virtio-console becomes hvc0 and virtio-console1 is
# hvc1. We want anaconda to wind up on the console that is
# virtio-terminal1 in both cases
# virtio-console1 in both cases
if (get_var("OFW")) {
$params .= "console=hvc2 ";
}
@ -96,9 +96,9 @@ sub run {
if (get_var("ANACONDA_TEXT")) {
# select that we don't want to start VNC; we want to run in text mode
if (get_var("SERIAL_CONSOLE")) {
# we direct the installer to virtio-terminal1, and use
# virtio-terminal as a root console
select_console('root-virtio-terminal1');
# we direct the installer to virtio-console1, and use
# virtio-console as a root console
select_console('virtio-console1');
unless (wait_serial "Use text mode", timeout=>120) { die "Anaconda has not started."; }
type_string "2\n";
unless (wait_serial "Installation") { die "Text version of Anaconda has not started."; }

View File

@ -25,7 +25,7 @@ sub run {
# First, preset the environment according to the chosen console. This test
# can run both on a VNC based console, or a serial console.
if (get_var("SERIAL_CONSOLE")) {
select_console('root-virtio-terminal1');
select_console('virtio-console1');
unless (testapi::is_serial_terminal) {
die "The test does not run on a serial console when it should.";
}
@ -135,7 +135,7 @@ sub run {
assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc1';
assert_script_run 'chroot /mnt/sysimage systemctl enable serial-getty@hvc2';
# back to anaconda ui
select_console("root-virtio-terminal1");
select_console("virtio-console1");
}
}
else {