Project

General

Profile

action #120723

coordination #68794: [qe-core][functional][epic] rework postfail hooks

[qe-core] Guarantee `show_tasks_in_blocked_state` will always be called

Added by szarate 3 months ago. Updated 2 days ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Refactor/Code Improvements
Target version:
Start date:
2022-11-18
Due date:
% Done:

100%

Estimated time:
Difficulty:

Description

Currently we're not executing any post_fail_hooks if we're in serial-terminal and it shouldn't be the case, if possible we would like to trigger this from the serial terminal, however at this point it is known that sending special keys does not work, so we might need to resolve to switching to either root-console or log-console for this to work always.

While we're at it, also try to use logger if available, to tag it on the journal, so we can know easily where to look for

This will help us to collect valuable information in case the SUT is experiencing some unforseen load

Tasks

  • Ensure the show_tasks_in_blocked_state is always called, unless the SUT doesn't have a real console
  • If binary logger is available in the system, use it to create a tag so that we know when does the tasks_in_blocked_state start and when do they end

Acceptance Criteria

  1. AC1: show_tasks_in_blocked_state is called unconditionally, unless the SUT doesn't have a real console
  2. AC2: When logger is available, messages can be seen in the journal, signaling the beginning and the end of the trace

Related issues

Related to openQA Tests - action #120720: [qe-core] Use Utils::Logging::save_ulog to redefine upload_logs in opensusebasetestIn Progress2022-11-18

Copied to openQA Tests - action #120729: [qe-core] *basetest::post_fail_hook: leave early if `NOLOGS` is setResolved2022-11-18

History

#1 Updated by szarate 3 months ago

  • Copied to action #120729: [qe-core] *basetest::post_fail_hook: leave early if `NOLOGS` is set added

#2 Updated by szarate 3 months ago

  • Status changed from New to Workable

#3 Updated by rfan1 2 months ago

  • Assignee set to rfan1

#4 Updated by rfan1 2 months ago

  • Assignee deleted (rfan1)

#5 Updated by szarate 2 months ago

  • Sprint changed from QE-Core: November Sprint (Nov 09 - Dec 07) to QE-Core: December Sprint (Dec 07 - Jan 04)

#6 Updated by szarate 28 days ago

  • Sprint changed from QE-Core: December Sprint (Dec 07 - Jan 11) to QE-Core: January Sprint (Jan 11 - Feb 08)

#7 Updated by dzedro 23 days ago

  • Status changed from Workable to In Progress
  • Assignee set to dzedro

#8 Updated by dzedro 20 days ago

szarate I'm sure there are tests which do not upload logs at all, but e.g. console tests do not run show_tasks_in_blocked_statem but they do run post_fail_hook and upload logs. I will try to find tests which do not upload logs at all, but mentioned examples would be helpful.

#9 Updated by szarate 20 days ago

dzedro wrote:

szarate I'm sure there are tests which do not upload logs at all, but e.g. console tests do not run show_tasks_in_blocked_statem but they do run post_fail_hook and upload logs. I will try to find tests which do not upload logs at all, but mentioned examples would be helpful.

dzedro, there's also for instance: #120735 which was reverted, introduced a way to not exit the post_fail_hook when we're in serial terminal:

  unless (is_serial_terminal()) {
        show_tasks_in_blocked_state;

        # In case the system is stuck in shutting down or during boot up, press
        # 'esc' just in case the plymouth splash screen is shown and we can not
        # see any interesting console logs.
        send_key 'esc';
        save_screenshot;
        # the space prevents the esc from eating up the next alphanumerical
        # character typed into the console
        send_key 'spc';
    }

I think that rather unconditionally, to ensure that for anything that inherits from opensusebasetest, x11test, consolebasetest would call the show_tasks_in_blocked_state. Later as a separate ticket, we can add a new static check, to verify that tests are calling SUPER::post_fail_hook correctly.

What do you think?

#10 Updated by szarate 20 days ago

  • Related to action #120720: [qe-core] Use Utils::Logging::save_ulog to redefine upload_logs in opensusebasetest added

#11 Updated by szarate 20 days ago

Dee is also having a similar problem due to #120735 being reverted

#12 Updated by dzedro 20 days ago

The issue why #120735 was reverted is because of issue with serial_console #109929, serial_console does not work properly/same as VNC console (is activate_console or not).
OK unconditionally, but I would like to avoid unexpected failures and test all affected base classes running show_tasks_in_blocked_state.

#14 Updated by dzedro 2 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF