* [OSSTEST PATCH 1/3] timeouts: Refactor target_adjust_timeout to have $adjust->(), and log
@ 2017-01-20 12:04 Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 2/3] timeouts: Call target_adjust_timeout for all build commands Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 3/3] timeouts: Honour TimeoutFactor host property Ian Jackson
0 siblings, 2 replies; 3+ messages in thread
From: Ian Jackson @ 2017-01-20 12:04 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson
If a timeout is adjusted, print a log message. We are going to want
to reuse this logic in a moment.
Do the defaulting in $adjust->() rather than passing 1 as a default
to the lookup functions, which is slightly neater.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 888f0ac..5a10cae 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -334,9 +334,17 @@ END
sub target_adjust_timeout ($$) {
my ($ho,$timeoutref) = @_; # $ho might be a $gho
+ my $adjust = sub {
+ my ($factor, $what) = @_;
+ return unless defined $factor;
+ return if $factor==1;
+ logm("(adjusting timeout by factor $factor, from $what)");
+ $$timeoutref *= $factor;
+ };
if ($ho->{Guest}) {
my $context = $ho->{TimeoutContext} // 'general';
- $$timeoutref *= guest_var($ho,"${context}_timeoutfactor",1);
+ my $guest_var = "${context}_timeoutfactor";
+ $adjust->(guest_var($ho,$guest_var), "guest variable $guest_var");
}
}
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* [OSSTEST PATCH 2/3] timeouts: Call target_adjust_timeout for all build commands
2017-01-20 12:04 [OSSTEST PATCH 1/3] timeouts: Refactor target_adjust_timeout to have $adjust->(), and log Ian Jackson
@ 2017-01-20 12:04 ` Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 3/3] timeouts: Honour TimeoutFactor host property Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2017-01-20 12:04 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson
Currently this has no real effect, because the only place where a
timeout factor is specified is nested L1s and we do not run build
commands on those.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index 5a10cae..b8946da 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -627,6 +627,8 @@ END
export http_proxy
END
+ target_adjust_timeout($ho, \$timeout);
+
target_cmd($ho, <<END.$distcc.$httpproxy.<<END.$script, $timeout);
set -xe
LC_ALL=C; export LC_ALL
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread* [OSSTEST PATCH 3/3] timeouts: Honour TimeoutFactor host property
2017-01-20 12:04 [OSSTEST PATCH 1/3] timeouts: Refactor target_adjust_timeout to have $adjust->(), and log Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 2/3] timeouts: Call target_adjust_timeout for all build commands Ian Jackson
@ 2017-01-20 12:04 ` Ian Jackson
1 sibling, 0 replies; 3+ messages in thread
From: Ian Jackson @ 2017-01-20 12:04 UTC (permalink / raw)
To: xen-devel; +Cc: Ian Jackson
This gives us a single place to say that a host is particularly slow.
Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
---
Osstest/TestSupport.pm | 1 +
1 file changed, 1 insertion(+)
diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm
index b8946da..1108dbd 100644
--- a/Osstest/TestSupport.pm
+++ b/Osstest/TestSupport.pm
@@ -346,6 +346,7 @@ sub target_adjust_timeout ($$) {
my $guest_var = "${context}_timeoutfactor";
$adjust->(guest_var($ho,$guest_var), "guest variable $guest_var");
}
+ $adjust->(get_target_property($ho,"TimeoutFactor"), "target TimeoutFactor");
}
#---------- running commands eg on targets ----------
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-20 12:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-20 12:04 [OSSTEST PATCH 1/3] timeouts: Refactor target_adjust_timeout to have $adjust->(), and log Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 2/3] timeouts: Call target_adjust_timeout for all build commands Ian Jackson
2017-01-20 12:04 ` [OSSTEST PATCH 3/3] timeouts: Honour TimeoutFactor host property Ian Jackson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).