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

Ensure that send_key doesn't run on virtio console #5814

Merged
merged 2 commits into from
Sep 25, 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
5 changes: 4 additions & 1 deletion lib/console_yasttest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@ use utils 'show_tasks_in_blocked_state';
sub post_fail_hook {
my $self = shift;

show_tasks_in_blocked_state;
my $defer_blocked_task_info = testapi::is_serial_terminal();
show_tasks_in_blocked_state unless ($defer_blocked_task_info);

select_console 'log-console';
save_screenshot;

show_tasks_in_blocked_state if ($defer_blocked_task_info);

upload_logs('/var/log/zypper.log');
$self->remount_tmp_if_ro;
$self->save_upload_y2logs;
Expand Down
9 changes: 6 additions & 3 deletions lib/utils.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1014,9 +1014,12 @@ sub zypper_ar {
}

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);
# sending sysrqs doesn't work for hyperv
if (!check_var('MACHINE', 'svirt-hyperv')) {
send_key 'alt-sysrq-w';
# info will be sent to serial tty
wait_serial('SysRq : Show Blocked State', 1);
}
}

1;