Project

General

Profile

Actions

action #25716

closed

[sle][functional][demo][hard] different test-modules fail because of "unexpected token" in the script

Added by nicksinger over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Bugs in existing tests
Start date:
2017-10-02
Due date:
2017-11-22
% Done:

0%

Estimated time:
Difficulty:

Description

Observation

openQA test in scenario sle-15-Leanos-DVD-x86_64-USBinstall@uefi fails in
zypper_lifecycle
and also
zypper_lifecycle

The script which runs there exits with: "syntax error near unexpected token '('"

Reproducible

Looks like that this always happens on USB-Install jobs since every other job succeeds to execute this script.
Sporadic but happens often enough to be suspicious.

Expected result

Script can be executed without an unexpected token

Further details

Always latest result in this scenario: latest


Related issues 2 (0 open2 closed)

Related to openQA Tests - action #26112: [sle][functional] test fails in zypper_lifecycle - bash script failsRejected2017-10-172018-02-13

Actions
Has duplicate openQA Tests - action #27823: [sle][functional][hard] login output interferes with commands execution on ppc64leResolved2017-11-17

Actions
Actions #1

Updated by okurz over 6 years ago

  • Related to action #26112: [sle][functional] test fails in zypper_lifecycle - bash script fails added
Actions #3

Updated by nicksinger over 6 years ago

  • Description updated (diff)
Actions #4

Updated by nicksinger over 6 years ago

Most recent examples:

  1. https://openqa.suse.de/tests/1244530#step/zypper_lifecycle/36
  2. https://openqa.suse.de/tests/1244490#step/zypper_lifecycle/20
  3. https://openqa.suse.de/tests/1244506#step/zypper_lifecycle/20

Where it all fails because of the unexpected token '('… However, several other tests can pass successfully and the syntax error is even in another line (for the first job).

Actions #5

Updated by okurz over 6 years ago

  • Due date set to 2017-11-22
  • Target version set to Milestone 12
Actions #6

Updated by riafarov over 6 years ago

  • Assignee set to riafarov
Actions #7

Updated by riafarov over 6 years ago

  • Subject changed from [sle][functional] test fails in zypper_lifecycle because of "unexpected token" in the script to [sle][functional][hard] test fails in zypper_lifecycle because of "unexpected token" in the script

Issue is sporadic, was able to reproduce it 2 out 50 runs. Now I've added logging to see the script content. As of now I suspect that we do not parse some output properly which is then injected into next script and breaks it. Other possibility is that script_output is not reliable and doesn't write file correctly.

Actions #8

Updated by mgriessmeier over 6 years ago

  • Subject changed from [sle][functional][hard] test fails in zypper_lifecycle because of "unexpected token" in the script to [sle][functional][hard] different test-modules fail because of "unexpected token" in the script

not only happening in zypper_lifecycle, also seen here:
https://openqa.suse.de/tests/1251399#step/snapper_create/64

-> renaming ticket

Actions #9

Updated by riafarov over 6 years ago

  • Status changed from New to In Progress

@mgriessmeier I believe this is another problem, as zypper_lifecycle we use script_output and execute downloaded script. And here we get some welcome messages which break syntax. I've created separate ticket for that: https://progress.opensuse.org/issues/27823

Actions #10

Updated by riafarov over 6 years ago

  • Has duplicate action #27823: [sle][functional][hard] login output interferes with commands execution on ppc64le added
Actions #11

Updated by riafarov over 6 years ago

So, issue is sporadic, welcome messages are in the script for whatever reason, for example here:

echo $(for repo in Welcome to SUSE Linux Enterprise Server 15 Beta2 (x86_64) - Kernel 4.12.14-3.2-default (ttyS0).

eth0: 10.0.2.15 fec0::5970:498e:9c9b:a910

linux-75xp login: SLE-Product-SLES15-Pool SLE-Product-SLES15-Updates ; do zypper -n -x se -t package -i -s -r $repo ; done | grep name= | head -n 1 |sed -e 's|.name="(["])".*|\1|' )

Actions #12

Updated by riafarov over 6 years ago

  • Status changed from In Progress to Feedback

All problems occur due to extra output on serial device, to avoid this issue, we parse results according to our expectations:
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3909
https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/3908

For similar issues we should address them in separate tickets, as otherwise this ticket won't ever get resolved if we will get new failures here and there.

Actions #13

Updated by riafarov over 6 years ago

  • Subject changed from [sle][functional][hard] different test-modules fail because of "unexpected token" in the script to [sle][functional][demo][hard] different test-modules fail because of "unexpected token" in the script
Actions #14

Updated by okurz over 6 years ago

  • Status changed from Feedback to Resolved

haven't seen this issue in the latest build 343.1 . Whenever we find another instability regarding the use of output of script_output we should either push the os-autoinst change or handle it explicitly in the according test module.

Actions #15

Updated by thehejik over 6 years ago

Maybe the problem wasn't fixed completely, please see https://openqa.suse.de/tests/overview?distri=sle&version=12-SP3&build=0040&groupid=128 - it is SLE12 SP3 + RT, it worked correctly 2 weeks ago.

But the problem seems to be different, there is no trace of "unexpected token" in script_output output and the XML from zypper seems to be correct and valid. Details here https://openqa.suse.de/tests/1258673#step/zypper_lifecycle/21

Actions #16

Updated by thehejik over 6 years ago

  • Status changed from Resolved to Feedback
Actions #17

Updated by riafarov over 6 years ago

Ouch, tried to be to picky with regexp, will provide a fix after verification run

Actions #19

Updated by riafarov over 6 years ago

  • Status changed from Feedback to In Progress

Seems that it didn't work well, as output of this line is not handled properly and script-finished is not parsed on serial: https://openqa.suse.de/tests/1260361#step/zypper_lifecycle/24
script_output 'echo $(for repo in ' . $base_repos . ' ; do zypper -n -x se -t package -i -s -r $repo ; done )'

Actions #21

Updated by riafarov over 6 years ago

  • Status changed from In Progress to Feedback
Actions #22

Updated by riafarov over 6 years ago

  • Status changed from Feedback to Resolved
Actions #24

Updated by riafarov about 6 years ago

@michalnowak, yes, but it got worse because in my improvement I've forgotten to escape $ sign: https://github.com/os-autoinst/os-autoinst-distri-opensuse/pull/4349 here is the fix. And this is a new ticket where we handle it: https://progress.opensuse.org/issues/29646

Actions

Also available in: Atom PDF