Project

General

Profile

action #10534

wait_serial fails to match special string in serial console occasionally

Added by jtzhao over 5 years ago. Updated about 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
-
Start date:
2016-02-02
Due date:
% Done:

0%

Estimated time:
Difficulty:

Description

A test died because wait_serial function failed to match anything in serial console using regex 'curl-0':
http://147.2.207.97/tests/694/file/autoinst-log.txt

But according to serial console log, the string "curl-0" did exist(the last line):
http://147.2.207.97/tests/694/file/serial0.txt


Related issues

Related to openQA Project - action #23404: Serial output gets lostResolved2017-08-16

History

#1 Updated by okurz over 5 years ago

From the logfiles it looks like you are running type_string and wait_serial manually. It might be (I don't know if this makes sense) that the type_string output shows up in the "serial console output" but wait_serial can not catch it. Did you try "assert_script_run" instead? From the logs it gives many warnings so your machine might be really slow and therefore having timing issues.

#2 Updated by okurz over 5 years ago

#3 Updated by jtzhao over 5 years ago

Thanks for replying. Actually I ran "script_output" instead of running wait_serial manually. That's why I think it's a test api issue.

Below is how I used "script_output" in my test case:

my $timeout = 3600 * 9;
my $interval = 120;
my $cmd = "[[ -f /var/log/qaset/control/DONE ]] && echo 'done' || echo 'running'";
while ($timeout >= 0) {
    my $output = script_output($cmd, 120);
    $output =~ s/^\s+|\s+$//g;
    if ($output eq "done") {
        last;
    }
    else {
        $timeout -= $interval;
        sleep($interval);
    }
}

#4 Updated by okurz over 5 years ago

hm, this looks ok. Yes, probably a testapi issue.

#5 Updated by oholecek over 5 years ago

It seems to me that curl is too slow for some reason. In the log wait_serial reports fail before Mojo logs for download are displayed. Try to use 'type_string' instead of 'script_output' like (not tested):

my $timeout = 3600 * 9;
my $interval = 120;
my $cmd = "[[ -f /var/log/qaset/control/DONE ]] && echo 'done'\n";
while ($timeout >= 0) {
    type_string($cmd);
    last if wait_serial('done', $interval);
    $timeout -= $interval;
}

Btw. $timeout 9hours is way too much for openQA. It will kill the job after 2h.

#6 Updated by coolo over 5 years ago

script_output has to work still. But I never seen such a problem.

#7 Updated by jtzhao over 5 years ago

I've replaced "script_output" with "type_string" and "wait_serial". So far so good. Thanks for your suggestion.

oholecek wrote:

It seems to me that curl is too slow for some reason. In the log wait_serial reports fail before Mojo logs for download are displayed. Try to use 'type_string' instead of 'script_output' like (not tested):
Btw. $timeout 9hours is way too much for openQA. It will kill the job after 2h.

#8 Updated by okurz about 5 years ago

  • Status changed from New to Resolved

according to the latest comment this seems to be fine. Also I don't recall any symptoms like the ones described here unless for very specific cases, e.g. s390x. reopen if you think it's still happening.

#9 Updated by okurz about 4 years ago

#10 Updated by szarate almost 4 years ago

  • Related to action #25620: [sle][functional][tools][svirt-hyperv-uefi] test fails in install_and_reboot with no wait_serial output whatsoever added

#11 Updated by szarate almost 4 years ago

  • Related to deleted (action #25620: [sle][functional][tools][svirt-hyperv-uefi] test fails in install_and_reboot with no wait_serial output whatsoever)

Also available in: Atom PDF