Skip to content
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

Record blocked state tasks to serial using sysrq #5769

Merged
merged 1 commit into from Sep 17, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/console_yasttest.pm
Expand Up @@ -4,6 +4,7 @@ package console_yasttest;
use base 'y2logsstep';
use strict;
use testapi;
use utils 'show_tasks_in_blocked_state';

sub change_service_configuration {
my ($self, %args) = @_;
Expand Down Expand Up @@ -32,6 +33,8 @@ sub change_service_configuration_step {
sub post_fail_hook {
my $self = shift;

show_tasks_in_blocked_state;

select_console 'log-console';
save_screenshot;

Expand Down
2 changes: 2 additions & 0 deletions lib/opensusebasetest.pm
Expand Up @@ -555,6 +555,8 @@ sub post_fail_hook {
my ($self) = @_;
return if testapi::is_serial_terminal(); # in case it is VIRTIO_CONSOLE=1 nothing below make sense

show_tasks_in_blocked_state;

# just output error if selected program doesn't exist instead of collecting all logs
# set current variables in x11_start_program
if (get_var('IN_X11_START_PROGRAM')) {
Expand Down
7 changes: 7 additions & 0 deletions lib/utils.pm
Expand Up @@ -72,6 +72,7 @@ our @EXPORT = qw(
reconnect_s390
set_hostname
zypper_ar
show_tasks_in_blocked_state
);


Expand Down Expand Up @@ -1008,4 +1009,10 @@ sub zypper_ar {
zypper_call("--gpg-auto-import-keys ref --repo $name", dumb_term => 1);
}

sub show_tasks_in_blocked_state {
# info will be sent to serial tty
send_key 'alt-sysrq-w';
wait_serial('SysRq : Show Blocked State', 1);
}

1;