[igt-dev] [PATCH i-g-t 1/2] runner: Actually ping watchdogs every interval

Petri Latvala petri.latvala at intel.com
Tue Dec 3 10:44:56 UTC 2019


The split to timeout intervals was made to accomodate for watchdogs
that cannot use a timeout as high as we wanted. Actually using that
feature requires us to ping the watchdog every interval even though we
handle actual timeouting after all intervals are used up.

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

diff --git a/runner/executor.c b/runner/executor.c
index ba58fb17..e6086772 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -734,6 +734,8 @@ static int monitor_output(pid_t child,
 			FD_SET(sigfd, &set);
 
 		n = select(nfds, &set, NULL, NULL, timeout == 0 ? NULL : &tv);
+		ping_watchdogs();
+
 		if (n < 0) {
 			/* TODO */
 			return -1;
@@ -743,8 +745,6 @@ static int monitor_output(pid_t child,
 			if (--intervals_left)
 				continue;
 
-			ping_watchdogs();
-
 			switch (killed) {
 			case 0:
 				show_kernel_task_state();
@@ -807,7 +807,6 @@ static int monitor_output(pid_t child,
 		}
 
 		intervals_left = timeout_intervals;
-		ping_watchdogs();
 
 		/* TODO: Refactor these handlers to their own functions */
 		if (outfd >= 0 && FD_ISSET(outfd, &set)) {
-- 
2.19.1



More information about the igt-dev mailing list