[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] timeout: adjust timeout when running nested tests


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Wed, 1 Apr 2020 15:37:40 +0200
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=roger.pau@xxxxxxxxxx; spf=Pass smtp.mailfrom=roger.pau@xxxxxxxxxx; spf=None smtp.helo=postmaster@xxxxxxxxxxxxxxx
  • Cc: ian.jackson@xxxxxxxxxxxxx, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 01 Apr 2020 13:38:11 +0000
  • Ironport-sdr: sZPiwuXttoB/QIfvMQye0xdMLzUrUni/Sx02jv5gzK2YNZYIoANBX9OD53TKRCAAunRPX0c4qB RJ/E0i5ZvcsBWhdu0WwA7eFRRll4hWZwPixd4GxXNBOdYVZPIEZh5ZS1hB5XYFNqtNSY2lj5Rt k4ueFC+h49ysZVu0fZ64Lq4fuZ/ca4WD0i9tpNGBHUdpO+w4JDYE5NOMWSlUvjTHw1jOcD97j3 RoLzaWUBl7bUAtYSmJk6Bx01cCvHTxSknHgJVteH0iMeITuvK3VdCBuqxREQ/2mXNW4gc7lWPE pro=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Expand the timeouts when the host is nested. The current algorithm
uses base_timeout * 2 ^ nesting_level.

This fixes the issues reported by the nested tests on elbling boxes:

http://logs.test-lab.xenproject.org/osstest/logs/149283/

Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
 Osstest/TestSupport.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 1c13e2af..ff749a32 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -436,6 +436,7 @@ END
 
 sub target_adjust_timeout ($$) {
     my ($ho,$timeoutref) = @_; # $ho might be a $gho
+    my $nestinglvl = $ho->{NestingLevel} || $ho->{Host}{NestingLevel};
     my $adjust = sub {
        my ($factor, $what) = @_;
        return unless defined $factor;
@@ -450,6 +451,9 @@ sub target_adjust_timeout ($$) {
        $adjust->(guest_var($ho,$guest_var), "guest variable $guest_var");
     }
     $adjust->(get_target_property($ho,"TimeoutFactor"), "target 
TimeoutFactor");
+    if ($nestinglvl) {
+        $adjust->(1 << $nestinglvl, "nesting level");
+    }
 }
 
 #---------- running commands eg on targets ----------
-- 
2.26.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.