Project

General

Profile

Actions

action #10534

closed

wait_serial fails to match special string in serial console occasionally

Added by jtzhao about 8 years ago. Updated over 7 years ago.

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

0%

Estimated time:

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 1 (0 open1 closed)

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

Actions
Actions #1

Updated by okurz about 8 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.

Actions #2

Updated by okurz about 8 years ago

Actions #3

Updated by jtzhao about 8 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);
    }
}
Actions #4

Updated by okurz about 8 years ago

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

Actions #5

Updated by oholecek about 8 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.

Actions #6

Updated by coolo about 8 years ago

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

Actions #7

Updated by jtzhao about 8 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.

Actions #8

Updated by okurz over 7 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.

Actions #9

Updated by okurz over 6 years ago

Actions #10

Updated by szarate over 6 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
Actions #11

Updated by szarate over 6 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)
Actions

Also available in: Atom PDF