Project

General

Profile

Actions

action #17622

closed

Unwanted login prompt occurence in script_output() output

Added by thehejik about 7 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Support
Target version:
-
Start date:
2017-03-09
Due date:
% Done:

0%

Estimated time:

Description

By testing CaaSP we have very often problems with unwanted login prompt occurrence in a serial output (VIRTIO_CONSOLE not used).
Problem is when we are using a variable filled by script_output() function and then we parse the output of the script/command (stored in variable) for eg. by a regexp or xpath.

You can see the issue for example at:
https://openqa.suse.de/tests/806271#step/create_autoyast/6
https://openqa.suse.de/tests/790734#step/journal_check/8

Example of the borken serial output:

# wait_serial expected: 'SCRIPT_FINISHEDv0ljj-\\d+-'
# Result:

Welcome to SUSE Container as a Service Platform 1.0 Alpha2 (x86_64) - Kernel 4.4.47-1-default (ttyS0).    
SSH host key: SHA256:WBi4YrbTzezxp05B4ibLDA0zpZOSGijoqyLCo7yh8N8 
SSH host key: SHA256:sf4tcMJKKe+O+NqjAR6PI7QbKEW2FC0Hv1NUj7MnFzw 
SSH host key: SHA256:rnkrqIo9z2uoITEyWVJkWQWqtKbjyzQQebg0c0Pgg7g 
SSH host key: SHA256:FeJnlhhj2qTIiOUA74UlGv0y/bJaj0QKUh5FXTJz97A 
eth0: 10.0.2.15 fec0::d444:d784:1972:eff5

linux-m0wl login: Feb 28 10:23:40 linux-m0wl wickedd[1038]: ni_process_reap: process 1503 has not exited yet; now doing a blocking waitpid()

SCRIPT_FINISHEDv0ljj-0-

But the correct output should be just:

# wait_serial expected: 'SCRIPT_FINISHEDv0ljj-\\d+-'
# Result:

Feb 28 10:23:40 linux-m0wl wickedd[1038]: ni_process_reap: process 1503 has not exited yet; now doing a blocking waitpid()

SCRIPT_FINISHEDv0ljj-0-

Possible workaround for eg. first-login.pm "systemctl stop serial-getty@ttyS0.service" (didn't test it yet)

Actions

Also available in: Atom PDF