New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s390x: Collect linuxrc logs in post_fail_hook #4725
Conversation
d440292
to
42e0831
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks promising. Even though I miss experience of using s390x specific calls.
assert_screen 'linuxrc-shell'; | ||
|
||
# collect linuxrc logs | ||
#$s3270->sequence_3270((String(\"cat /var/log/linuxrc.log\"), ENTER)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove this line
output_delim => qr/LINUXRC_LOG_SAVED/, | ||
timeout => 60 | ||
); | ||
$r ? record_info 'Logs collected', 'Linuxrc logs can be found in autoinst-log.txt' : die "Could not save linuxrc logs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'n not sure how exactly it sequence_3270 works, but will it be in autoinst log, or in serial or in both?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only in autoinst-log.txt
|
||
# collect linuxrc logs | ||
#$s3270->sequence_3270((String(\"cat /var/log/linuxrc.log\"), ENTER)); | ||
$s3270->sequence_3270("String(\"cat /var/log/linuxrc.log && echo 'LINUXRC_LOG_SAVED'\")", "ENTER",); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we don't need comma in the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great achievement already!
@@ -15,6 +15,7 @@ | |||
use base "installbasetest"; | |||
|
|||
use testapi; | |||
use opensusebasetest; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this module ISA installbasetest which ISA opensusebasetest so I do not get why this should be needed
my $s3270 = console('x3270'); | ||
my $r; | ||
|
||
if (check_screen 'linuxrc') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
meh, as you probably know by know I consider a check_screen with default timeout a bad practice but this time, being in the post_fail_hook
… ok
output_delim => qr/LINUXRC_LOG_SAVED/, | ||
timeout => 60 | ||
); | ||
$r ? record_info 'Logs collected', 'Linuxrc logs can be found in autoinst-log.txt' : die "Could not save linuxrc logs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only in autoinst-log.txt
|
||
# Collect Linuxrc logs | ||
type_line_svirt "'cat /var/log/linuxrc.log > /dev/$serialdev && echo 'LINUXRC_LOG_SAVED' > /dev/$serialdev'"; | ||
wait_serial "LINUXRC_LOG_SAVED" ? record_info 'Logs collected', 'Linuxrc logs can be found in serial0.txt' : die "could not collect linuxrc logs"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all three type_line_svirt+wait_serial tuples: type_line_svirt
has the "expect" parameter, see opensusebasetest::rewrite_static_svirt_network_configuration how it's used. So the section could/should be rewritten as:
# Enter Linuxrc extra mode
type_line_svirt 'x', expect => 'Linuxrc extras';
# Start linuxrc shell
type_line_svirt '3', expect => 'ttysclp0:install';
# Collect Linuxrc logs
type_line_svirt "'cat /var/log/linuxrc.log > /dev/$serialdev && echo 'LINUXRC_LOG_SAVED' > /dev/$serialdev'";
 wait_serial "LINUXRC_LOG_SAVED" ? record_info 'Logs collected', 'Linuxrc logs can be found in serial0.txt' : die "could not collect linuxrc logs";
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Didn't know that. Will change
needles merged |
42e0831
to
ba1fdaa
Compare
updated - will retrigger verification runs to be sure |
ba1fdaa
to
e004403
Compare
verifications: http://opeth.suse.de/tests/855 |
related progress ticket
related MR for needles
verification for z/VM
verification for (z)KVM