Project

General

Profile

Actions

action #28027

closed

Add function to account for the unexpected in serial output

Added by coolo about 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2017-11-21
Due date:
% Done:

90%

Estimated time:

Description

We want a test to fail properly if the kernel output OOPS or BUG, but we can't always hook this into specific tests.

So we need a hook in the distribution to check the serial0.txt for regexps given in main.pm - and either generate soft failure or hard failure from the test.

See https://progress.opensuse.org/issues/18286 for a specific use case.


Related issues 2 (0 open2 closed)

Has duplicate openQA Project - action #18286: Catch CPU lockupsRejected2017-04-03

Actions
Has duplicate openQA Project - action #18416: [tools][openqa][backend] Catch kernel opps on serial console / journalRejected2017-04-04

Actions
Actions #1

Updated by coolo about 7 years ago

Actions #2

Updated by coolo about 7 years ago

  • Has duplicate action #18416: [tools][openqa][backend] Catch kernel opps on serial console / journal added
Actions #3

Updated by dasantiago over 6 years ago

  • Assignee set to dasantiago
Actions #4

Updated by dasantiago over 6 years ago

  • Status changed from New to In Progress
Actions #5

Updated by coolo over 6 years ago

  • Target version changed from Ready to Current Sprint
Actions #6

Updated by dasantiago over 6 years ago

  • % Done changed from 0 to 90
Actions #7

Updated by szarate over 6 years ago

  • Status changed from In Progress to Resolved
Actions #8

Updated by szarate over 6 years ago

  • Target version changed from Current Sprint to Done
Actions #9

Updated by okurz over 6 years ago

Hi, can you say what fixed it and how we can make use of it in tests?

Actions #10

Updated by szarate over 6 years ago

Aloha!:

You can take a look at this pr which is basically allowing you to use two type of regexps, that either will trigger a soft fail or a hard failure of a test based on what's being seen on serial output log file of the SUT if it's present.

Actions #11

Updated by dasantiago over 6 years ago

szarate wrote:

Aloha!:

You can take a look at this pr which is basically allowing you to use two type of regexps, that either will trigger a soft fail or a hard failure of a test based on what's being seen on serial output log file of the SUT if it's present.

Yes :-)

On the main.pm you can define overall regular expressions for all the current set of tests. Example:

$testapi::distri->set_expected_serial_failures(soft=>[quotemeta 'THIS A PATTERN'], hard=>[qr/pattern.*?matched/])

You can also specify and override patterns specified in the tests:

sub run {
my ($self) = @_;
$self->set_expected_serial_failures(soft=>[quotemeta 'THIS A PATTERN'], hard=>[qr/pattern.*?matched/])

Let me know if you have any question.

Actions

Also available in: Atom PDF