Project

General

Profile

Actions

action #161378

open

apparmortest: post_fail_hook uses send_key, incompatible with VIRTIO

Added by dimstar 27 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2024-06-03
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

Issue has appeared in https://openqa.opensuse.org/tests/4242034 (the fact that we reach fail_hook is obviously a product bug, the fact that the fail_hook does not work, is THIS issue)

[2024-06-01T14:16:01.425013Z] [debug] [pid:119980] <<< testapi::send_key(key="alt-f4", wait_screen_change=0)
[2024-06-01T14:16:01.426070Z] [info] [pid:120172] ::: backend::baseclass::die_handler: Backend process died, backend errors are reported below in the following lines:
Virtio terminal and svirt serial terminal do not support send_key. Use
type_string (possibly with an ANSI/XTERM escape sequence), or switch to a
console which sends key presses, not terminal codes.

This is triggered by this code snippet:

sub post_fail_hook {
    my ($self) = shift;

    return if get_var('NOLOGS');
    # Exit x11 and turn to console in case
    send_key("alt-f4");
    select_console("root-console");
    if (script_run("! [[ -e $audit_log ]]")) {
        upload_logs("$audit_log");
    }
    $self->SUPER::post_fail_hook;
}

No data to display

Actions

Also available in: Atom PDF