[qe-core] virtio-terminal is missing for non root users
$self->select_user_serial_terminal; (alias for
$self->select_serial_terminal(0);) in test on a QEMU backend results in the following error:
[2021-01-25T14:06:53.271 CET] [debug] tests/x11/ghostscript.pm:45 called opensusebasetest::select_serial_terminal -> lib/opensusebasetest.pm:1243 called testapi::select_console [2021-01-25T14:06:53.271 CET] [debug] <<< testapi::select_console(testapi_console="virtio-terminal") console virtio-terminal does not exist at /usr/lib/os-autoinst/backend/driver.pm line 86. [2021-01-25T14:06:53.319 CET] [info] ::: basetest::runtest: # Test died: Can't call method "select" on an undefined value at /usr/lib/os-autoinst/backend/baseclass.pm line 667.
select_serial_terminal method expects to have a non-root virtio console named
lib/susedistribution.pm does not define any non-root virtio consoles.
#1 Updated by szarate almost 2 years ago
- Project changed from openQA Tests to openQA Project
- Subject changed from virtio-terminal is missing to [tools][qe-core] virtio-terminal is missing for non root users
- Category changed from Bugs in existing tests to Feature requests
#2 Updated by okurz almost 2 years ago
- Subject changed from [tools][qe-core] virtio-terminal is missing for non root users to [qe-core] virtio-terminal is missing for non root users
- Priority changed from Normal to Low
- Target version set to future
This should be fixable by non-tools-team contributions. Considering the backlog limit for SUSE QE Tools setting to "future" for now.
#4 Updated by okurz almost 2 years ago
- Target version set to future
szarate can you please help a bit with explaining what you want to achieve with changing the prio again and deleting the target version? I set the target version as we use it for the "SUSE QE Tools" team backlog and all issues within the openQA issue tracker have a target version so that they are "triaged", otherwise these tickets reappear on the "to be triaged" ticket query so in our current process we need either that or we move the issue to another issue tracker. As you have kept the marker "qe-core" in the subject I assume you are still fine with having that on the backlog of said team so maybe the other change was by mistake when you updated the ticket or something, hence setting the target version "future" again.
#7 Updated by ybonatakis 6 months ago
select_serial_terminal picks by default
root-virtio-terminal but the
subroutine provides parameter to select a console as normal user.
Somehow this found misconfigured. The condition was like that
$console = $root ? 'root-virtio-terminal' : 'virtio-terminal';. There was
two main issues. One was that the propor console was not added during the
init_consoles and the second was that the variable was not a valid option.
The first is solved easily by adding another line to call
In the second case the correct name is
virtio-terminal. the underline variable is evaluated later against a regex
to assign some other variables, one of them is $user and another is type
which each are required for the user login and the console initialization.
#9 Updated by ybonatakis 6 months ago
Seems working however it seems
select_serial_terminal(0) will do it right, unless there is an already active console. this is due to wait_serial(qr/login:\s*$/i, timeout => 3, quiet => 1);.
As a workaround in case to switch from current active console we can use
type_string('pkill -u root'); before
select_serial_terminal(0). But this can also become conditional inside the subroutine. WDYT?