Skip to content

Commit

Permalink
virt_autotest: enhancement fuc config_ssh_client for s390x
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxuguang committed Jun 23, 2024
1 parent dbbb1eb commit 1fe8a39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/virt_autotest/login_console.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ sub set_ssh_console_timeout_before_use {
sub config_ssh_client {
my $ssh_config_file = shift;
$ssh_config_file //= '/etc/ssh/ssh_config';
if (script_run("ls $ssh_config_file") != 0) {
if ( -e $ssh_config_file ) {
script_run qq(echo -e "StrictHostKeyChecking no\\nUserKnownHostsFile /dev/null" > $ssh_config_file);
}
else {
Expand Down Expand Up @@ -298,7 +298,7 @@ sub login_to_console {
sub run {
my $self = shift;
$self->login_to_console;
config_ssh_client if get_var('VIRT_AUTOTEST') and !get_var('AUTOYAST') and !is_s390x;
config_ssh_client if get_var('VIRT_AUTOTEST') and !get_var('AUTOYAST');
}

sub post_fail_hook {
Expand Down

0 comments on commit 1fe8a39

Please sign in to comment.