From: Ian Jackson Date: Fri, 18 Sep 2015 16:26:44 +0000 (+0100) Subject: Timeouts: Honour guest-related timeout-adjustment runvars X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=c0d0164ddff84153e820c568cecf556faec9074e;p=osstest.git Timeouts: Honour guest-related timeout-adjustment runvars 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 Acked-by: Ian Campbell --- diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 110339d..7ba51ec 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 ---------- @@ -1618,6 +1622,8 @@ sub prepareguest ($$$$$$) { } } + $gho->{TimeoutContext} = 'install'; + guest_find_lv($gho); guest_find_diskimg($gho); guest_find_ether($gho);