From: Ian Jackson Subject: [OSSTEST PATCH 1/2] Use ssh -v when ssh'ing to guests to check they are up Date: Thu, 2 Apr 2015 12:44:59 +0100 Message-ID: <1427975100-18848-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YddYY-0004ti-NV for xen-devel@lists.xenproject.org; Thu, 02 Apr 2015 11:45:06 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org * Make tcmd take an optional $extrasshopts argument * Make target_cmd{,_root} pass this through * Supply this with value [qw(-v)] Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 1053016..eca68be 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -595,14 +595,14 @@ sub target_await_down ($$) { } sub tcmd { # $tcmd will be put between '' but not escaped - my ($stdout,$user,$ho,$tcmd,$timeout) = @_; + my ($stdout,$user,$ho,$tcmd,$timeout,$extrasshopts) = @_; $timeout=30 if !defined $timeout; tcmdex($timeout,$stdout, - 'ssh', sshopts(), + 'ssh', sshopts(), @{ $extrasshopts || [] }, sshuho($user,$ho), $tcmd); } -sub target_cmd ($$;$) { tcmd(undef,'osstest',@_); } -sub target_cmd_root ($$;$) { tcmd(undef,'root',@_); } +sub target_cmd ($$;$$) { tcmd(undef,'osstest',@_); } +sub target_cmd_root ($$;$$) { tcmd(undef,'root',@_); } sub tcmdout { my $stdout= IO::File::new_tmpfile(); @@ -1653,7 +1653,7 @@ sub guest_check_via_ssh ($) { sub guest_check_up_quick ($) { my ($gho) = @_; if (guest_check_via_ssh($gho)) { - target_cmd_root($gho, "date"); + target_cmd_root($gho, "date", undef, [qw(-v)]); } else { target_ping_check_up($gho); } @@ -1663,7 +1663,7 @@ sub guest_check_up ($) { my ($gho) = @_; guest_await_dhcp_tcp($gho,20); target_ping_check_up($gho); - target_cmd_root($gho, "echo guest $gho->{Name}: ok") + target_cmd_root($gho, "echo guest $gho->{Name}: ok", undef, [qw(-v)]) if guest_check_via_ssh($gho); } -- 1.7.10.4