Project

General

Profile

action #88193

[qe-core] virtio-terminal is missing for non root users

Added by MDoucha almost 2 years ago. Updated 6 months ago.

Status:
Feedback
Priority:
Normal
Assignee:
Category:
Feature requests
Target version:
Start date:
2021-01-25
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Calling $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.

The select_serial_terminal method expects to have a non-root virtio console named virtio-terminal but lib/susedistribution.pm does not define any non-root virtio consoles.

History

#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.

#3 Updated by szarate almost 2 years ago

  • Priority changed from Low to Normal
  • Target version deleted (future)

#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.

#6 Updated by ybonatakis 6 months ago

  • Status changed from New to In Progress
  • Assignee set to ybonatakis

#7 Updated by ybonatakis 6 months ago

The 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 add_console.
In the second case the correct name is user-virtio-terminal instead
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.

https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/14967

#8 Updated by ybonatakis 6 months ago

  • Status changed from In Progress to Feedback

fix has been merged.

#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?

Also available in: Atom PDF