Skip to content

Commit efdaaab

Browse files
committed
Ensure correct value from/to SERIALCONSOLE
1.For OSD workers, some machines use ttyS0 and some others use ttyS1 or even ttyS2 which is assigned to setting SERIALDEV. But SERIALDEV is not safe enough to be used everywhere, because it becomes sshserial during test run, here is an example: https://openqa.suse.de/tests/21287146/file/vars.json. 2.Merge request https://gitlab.suse.de/openqa/salt-pillars-openqa/-/merge_requests/1225 introduces setting SERIALCONSOLE which is already being widely used in automation code. This can avoid incorrect SERIALCONSOLE leading to test run failure, for exmaple: https://openqa.suse.de/tests/21287262#step/prepare_transactional_server/74. 3.Current subroutine save_serial_console resets SERIALCONSOLE, if it has no value, to default value obtained from SERIALDEV which may become sshserial. So it is necessary to check and assign more meaningful default value ttyS1 to SERIALCONSOLE.
1 parent 63a1945 commit efdaaab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/Utils/Backends.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ sub save_serial_console {
6464
my $serialconsole = get_var('SERIALCONSOLE', '');
6565
return if ($serialconsole ne '');
6666
$serialconsole = get_var('SERIALDEV', 'ttyS1');
67+
$serialconsole = 'ttyS1' if ($serialconsole eq 'sshserial');
6768
set_var('SERIALCONSOLE', $serialconsole);
6869
bmwqemu::save_vars();
6970
}

0 commit comments

Comments
 (0)