From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 24/26] Timeouts: Honour guest-related timeout-adjustment runvars Date: Fri, 18 Sep 2015 18:50:14 +0100 Message-ID: <1442598616-2884-11-git-send-email-ian.jackson@eu.citrix.com> References: <1442598616-2884-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.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Zcznt-0004GM-0D for xen-devel@lists.xenproject.org; Fri, 18 Sep 2015 17:50:33 +0000 In-Reply-To: <1442598616-2884-1-git-send-email-ian.jackson@eu.citrix.com> 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 We look up a guest runvar GUEST_CONTEXT_timeoutfactor (according to the usual rules for guest runvars). Here CONTEXT can currently be `general' or `install'. (`install' applies when the guest is being installed.) If the runvar exists, all timeouts relating to that guest in that context are increased by the specified factor. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index f1f900e..c18f4a6 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -312,6 +312,10 @@ END sub target_adjust_timeout ($$) { my ($ho,$timeoutref) = @_; # $ho might be a $gho + if ($ho->{Guest}) { + my $context = $ho->{TimeoutContext} // 'general'; + $$timeoutref *= guest_var($ho,"${context}_timeoutfactor",1); + } } #---------- running commands eg on targets ---------- @@ -1604,6 +1608,8 @@ sub prepareguest ($$$$$$) { } } + $gho->{TimeoutContext} = 'install'; + guest_find_lv($gho); guest_find_diskimg($gho); guest_find_ether($gho); -- 1.7.10.4