public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/3] runner/executor: Make sure that intervals_left is always initialized
@ 2019-06-20 12:29 Arkadiusz Hiler
  2019-06-20 12:29 ` [igt-dev] [PATCH i-g-t 2/3] runner/resultgen: Don't pass NULL to str*() functions Arkadiusz Hiler
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Arkadiusz Hiler @ 2019-06-20 12:29 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

intervals_left got initialized only when when we had a timeout exceeding
watchdog capabilities, meaning we had to use multiple shorter intervals

by moving intervals_left = timeout_intervals down we are always
initializing it

Cc: Petri Latvala <petri.latvala@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/executor.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/runner/executor.c b/runner/executor.c
index 7e5fbe8f..bce4d420 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -493,7 +493,6 @@ static int monitor_output(pid_t child,
 			if (wd_timeout - wd_extra < 0)
 				wd_extra = wd_timeout / 2;
 			timeout_intervals = timeout / (wd_timeout - wd_extra);
-			intervals_left = timeout_intervals;
 			timeout /= timeout_intervals;
 
 			if (settings->log_level >= LOG_LEVEL_VERBOSE) {
@@ -504,6 +503,8 @@ static int monitor_output(pid_t child,
 		}
 	}
 
+	intervals_left = timeout_intervals;
+
 	while (outfd >= 0 || errfd >= 0 || sigfd >= 0) {
 		struct timeval tv = { .tv_sec = timeout };
 
-- 
2.21.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-06-20 19:15 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-20 12:29 [igt-dev] [PATCH i-g-t 1/3] runner/executor: Make sure that intervals_left is always initialized Arkadiusz Hiler
2019-06-20 12:29 ` [igt-dev] [PATCH i-g-t 2/3] runner/resultgen: Don't pass NULL to str*() functions Arkadiusz Hiler
2019-06-20 12:33   ` Petri Latvala
2019-06-20 12:29 ` [igt-dev] [PATCH i-g-t 3/3] runner/settings: Be consistent with empty blacklist Arkadiusz Hiler
2019-06-20 12:34   ` Petri Latvala
2019-06-20 12:33 ` [igt-dev] [PATCH i-g-t 1/3] runner/executor: Make sure that intervals_left is always initialized Petri Latvala
2019-06-20 16:50 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/3] " Patchwork
2019-06-20 19:15 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox