action #15732

Exit code missing from "magic string" on svirt

Added by michalnowak over 2 years ago. Updated over 2 years ago.

Status:ResolvedStart date:02/01/2017
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Feature requests
Target version:-
Difficulty:
Duration:

Description

Sometimes exit code is missing from the "magic string" sent to serial line (https://openqa.suse.de/tests/692208/file/autoinst-log.txt):

12:31:32.3285 Debug: /var/lib/openqa/share/tests/sle/tests/console/textinfo.pm:22 called testapi::upload_logs
12:31:32.3286 26104 <<< testapi::script_run(name='curl --form upload=@/tmp/info.txt --form upname=textinfo-info.txt http://10.160.0.147:20133/7iYcoGfkno9PdIpN/uploadlog/info.txt; echo 3PVcL-$?- > /dev/ttyS0', wait=0)
12:31:32.3287 Debug: /var/lib/openqa/share/tests/sle/tests/console/textinfo.pm:22 called testapi::upload_logs
12:31:32.3288 26104 <<< testapi::type_string(string='curl --form upload=@/tmp/info.txt --form upname=textinfo-info.txt http://10.160.0.147:20133/7iYcoGfkno9PdIpN/uploadlog/info.txt; echo 3PVcL-$?- > /dev/ttyS0', max_interval=250, wait_screen_changes=0)
12:31:42.7782 Debug: /var/lib/openqa/share/tests/sle/tests/console/textinfo.pm:22 called testapi::upload_logs
12:31:42.7785 26104 <<< testapi::send_key(key='ret')
12:31:42.9796 Debug: /var/lib/openqa/share/tests/sle/tests/console/textinfo.pm:22 called testapi::upload_logs
12:31:42.9798 26104 <<< testapi::wait_serial(timeout=90, regexp='3PVcL-\\d+-')
3PVcL--
12:33:14.0994 26104 >>> testapi::wait_serial: 3PVcL-\d+-: fail
12:33:14.1004 26104 # Test died: command 'curl --form upload=@/tmp/info.txt --form upname=textinfo-info.txt http://10.160.0.147:20133/7iYcoGfkno9PdIpN/uploadlog/info.txt' failed at /var/lib/openqa/share/tests/sle/tests/console/textinfo.pm line 22.

So instead of 3PVcL-0- openQA sees in serial0.txt only 3PVcL--, i.e. w/o the exit code number.

When such a problem occurs, it's always the number, never any other literal.


Related issues

Related to openQA Project - action #17370: [svirt] serial0.txt is distorted on Xen HVM Resolved 28/02/2017
Blocks openQA Tests - action #10206: [tools]libvirt tests (Xen, Hyper-V, VMware) Resolved 13/01/2016

History

#2 Updated by okurz over 2 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: casp-admin
http://openqa.suse.de/tests/761467

#3 Updated by michalnowak over 2 years ago

While working on my VirtualBox Hack Week project (https://hackweek.suse.com/15/projects/add-virtualbox-bootloader-to-openqa) I noticed that this issue happens in hostname_inst test module all the time. Output from VM guest is directed to file on host and I see the correct string there: tuxlC-0-. But in /var/lib/openqa/pool/1/serial0 file it's always: tuxlC--.

I also noticed that tuxlC-1- string does not exhibit this issue, and that many other strings e.g. those from dmesg piped to serial line are often heavily distorted if they contain zeros:

VM's output:

[ 128.220251] sd 0:0:0:0: [sda] 41943040 512-byte logical blocks: (21.5 GB/20.0 GiB)
[ 128.220273] sd 0:0:0:0: [sda] Write Protect is off
[ 128.220283] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

/var/lib/openqa/pool/1/serial0:

[ 128.22251] sd 0:0:0:0: [sda] 4194304 512-byte logical blocks: (21.5 GB/20.0 GiB)
[ 128.22273] sd 0::0:0: [sda] Write Protect is off
[ 128.220283] sd 0:::: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

#4 Updated by michalnowak over 2 years ago

  • Assignee deleted (michalnowak)

#5 Updated by michalnowak over 2 years ago

  • Related to action #17370: [svirt] serial0.txt is distorted on Xen HVM added

#6 Updated by michalnowak over 2 years ago

  • Blocks action #10206: [tools]libvirt tests (Xen, Hyper-V, VMware) added

#7 Updated by michalnowak over 2 years ago

Well looking at description of perl-Net-SSH2: "Even if the module can be compiled and linked against very old versions of the library, nothing below 1.5.0 should really be used (older versions were quite buggy and unreliable) and version 1.7.0 or later is recommended."

In Leap 42.2 we use libssh2 v. 1.4.3... Perhaps the bug is in libssh2, which is used by perl-Net-SSH2.

#8 Updated by okurz over 2 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: CaaSP-vmx@svirt-xen-hvm
https://openqa.suse.de/tests/849743

#9 Updated by coolo over 2 years ago

Shooting out of the hips: perhaps because "0" is treated as false we skip it? (or Net::SSH)

#10 Updated by coolo over 2 years ago

E.g. here

        my $line = <$chan>;
        if ($line) {
            print $line;

#11 Updated by michalnowak over 2 years ago

  • Status changed from New to Feedback

#12 Updated by michalnowak over 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF