public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] runner: Actually ping watchdogs every interval
@ 2019-12-03 10:44 Petri Latvala
  2019-12-03 10:44 ` [igt-dev] [PATCH i-g-t 2/2] runner: Don't wait forever for processes to die Petri Latvala
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Petri Latvala @ 2019-12-03 10:44 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

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@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@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

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

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

end of thread, other threads:[~2019-12-03 16:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-03 10:44 [igt-dev] [PATCH i-g-t 1/2] runner: Actually ping watchdogs every interval Petri Latvala
2019-12-03 10:44 ` [igt-dev] [PATCH i-g-t 2/2] runner: Don't wait forever for processes to die Petri Latvala
2019-12-03 10:53   ` Chris Wilson
2019-12-03 10:58     ` Petri Latvala
2019-12-03 11:15   ` [igt-dev] [PATCH i-g-t v2 " Petri Latvala
2019-12-03 11:37     ` Chris Wilson
2019-12-03 11:39 ` [igt-dev] [PATCH i-g-t 1/2] runner: Actually ping watchdogs every interval Chris Wilson
2019-12-03 11:51 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] runner: Actually ping watchdogs every interval (rev2) Patchwork
2019-12-03 16:31 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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