Project

General

Profile

Actions

action #29637

closed

[tools][kernel] test suddenly print login words -> script_output used wrong

Added by yosun over 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Bugs in existing tests
Target version:
Start date:
2017-12-20
Due date:
% Done:

100%

Estimated time:
Difficulty:

Description

Observation

openQA test in scenario sle-15-Installer-DVD-ppc64le-xfstests_run_for_btrfs@ppc64le fails in
xfstests_prepare_env

Reproducible

Seems like a random issue.

Expected result

Last good: Build [368.3]https://openqa.suse.de/tests/1293242
Don't suddenly print login words. Actually it's only stay several seconds before show this login words.

Further details

Always latest result in this scenario: latest


Related issues 2 (0 open2 closed)

Related to openQA Project - action #30613: [functional][y][hard] script_output might include extra serial outputResolvedriafarov2018-01-222018-08-28

Actions
Has duplicate openQA Tests - action #30850: [sle][functional]test fails in execute_test_run -> script_output used wrongRejectedyosun2018-01-26

Actions
Actions #1

Updated by yosun over 6 years ago

Also happened in aarch test
https://openqa.suse.de/tests/1334743#

Actions #2

Updated by yosun about 6 years ago

  • Related to action #30850: [sle][functional]test fails in execute_test_run -> script_output used wrong added
Actions #3

Updated by okurz about 6 years ago

  • Related to deleted (action #30850: [sle][functional]test fails in execute_test_run -> script_output used wrong)
Actions #4

Updated by okurz about 6 years ago

  • Has duplicate action #30850: [sle][functional]test fails in execute_test_run -> script_output used wrong added
Actions #5

Updated by okurz about 6 years ago

  • Subject changed from [tools][kernel] test suddenly print login words to [tools][kernel] test suddenly print login words -> script_output used wrong

See #30613. If possible work with bash variables within the SUT, e.g. assert_script_run('test_log=$(ls /var/log/qa/ctcs2/); tar cjf /tmp/$test_log.tar.bz2 -C /var/log/qa/ctcs2 $test_log'); but as we need the logfile to upload later I could not find a complete solution now.

yosun wrote:

I think the line "eth0 xxxx" is a minor issue, the point I can't understand is why SUT alway randomly logout and print login information.

I can explain. The code currently is like this:

my $test_log = script_output("ls /var/log/qa/ctcs2/");
my $tarball  = "/tmp/$test_log.tar.bz2";
assert_script_run("tar cjf /tmp/$test_log.tar.bz2 -C /var/log/qa/ctcs2 $test_log");

With the first line you "assume" you would get only the output of ls /var/log/qa/ctcs2/ but instead you get everything what is there at this time on the serial output, e.g. the whole "Welcome to SUSE Linux Enterprise …". And all this content is stored in the variable $test_log which is then appended in the string "/tmp/$test_log…". Instead of writing just "/tmp/process_stress-2018-…" it writes instead the full content of the variable $test_log at this point, e.g. "/tmp/Welcome to … … … process_stress-2018…". This is not what you want :)

A not-complete workaround would be to call my $dummy = wait_serial('', 0); to catch all (useless) content on the serial device into a dummy variable before you execute the next step. But it can still happen that any process in the background is writing something on the serial output confusing your scripts. So you have the following possibilities:

Actions #6

Updated by yosun about 6 years ago

What a nice explanation for my confuse part! :)
I didn't realize what is inside of $test_log, I'll think about solutions. Thank you for your patient.

Actions #7

Updated by okurz about 6 years ago

This is an autogenerated message for openQA integration by the openqa_review script:

This bug is still referenced in a failing openQA test: xfstests_run_for_btrfs@aarch64
https://openqa.suse.de/tests/1458725

Actions #8

Updated by sebchlad about 6 years ago

  • Priority changed from Normal to High
  • Target version set to Milestone 15

Prio: +1

Actions #9

Updated by sebchlad about 6 years ago

  • Target version changed from Milestone 15 to 448
Actions #10

Updated by okurz about 6 years ago

  • Related to action #30613: [functional][y][hard] script_output might include extra serial output added
Actions #11

Updated by yosun almost 6 years ago

  • Assignee set to yosun
Actions #12

Updated by yosun almost 6 years ago

  • % Done changed from 0 to 50

I pick the solution that not use script_output to assign parameters. e.g. my $para=script_output(foo). Find other API for workaround.

Fixed qa_test_* related test in following PR:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/5076

TODO:
As xfstests change module recently, and it use another set of script which also contain lot of script_output. I'll give another PR for that.

Actions #13

Updated by yosun almost 6 years ago

  • Status changed from New to In Progress
Actions #14

Updated by yosun almost 6 years ago

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

I made some workaround to replace as much as script_output code to other api in execute_test_run and xfstests run scirpt, but some script_output still can't replace by others api. I think I can close this issue for testcase part, and leave remains for tools team in poo#30613.

Actions #15

Updated by sebchlad over 5 years ago

  • Target version changed from 448 to 445
Actions #16

Updated by sebchlad over 5 years ago

  • Target version changed from 445 to Done
Actions

Also available in: Atom PDF