All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] runner: Fix graceful exit result parsing for dynamic subtests
@ 2021-01-25 13:55 Petri Latvala
  2021-01-25 15:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Petri Latvala @ 2021-01-25 13:55 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

Commit 10c83dfa5ad2 ("runner: Introduce a way to stop testing without
marking tests incomplete") added graceful exiting by signaling the
runner with SIGHUP, marking the currently running test as 'notrun'
instead of 'incomplete'. The result handling didn't handle dynamic
subtests though, so the currently executing dynamic subtest was still
marked as 'incomplete'. Handle that now similarly as handling the
'abort' result.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arek@hiler.eu>
---
 runner/resultgen.c | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index 8d0c6249..b74970a6 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -656,19 +656,24 @@ static void process_dynamic_subtest_output(const char *piglit_name,
 					     dynend);
 
 			/*
-			 * If a dynamic subsubtest is considered incomplete we
-			 * need to check parent's status first, to be sure that
-			 * the binary hasn't aborted (exit code). If it has
-			 * aborted then we have to attribute this status to our
-			 * subsubtest.
+			 * If a dynamic subsubtest is considered
+			 * incomplete we need to check parent's status
+			 * first, to be sure that the binary hasn't
+			 * aborted or stopped gracefully (exit
+			 * code). If it has aborted then we have to
+			 * attribute this status to our subsubtest.
 			 */
 			if (!strcmp(dynresulttext, "incomplete")) {
 				struct json_object *parent_subtest;
 
 				if (json_object_object_get_ex(tests, piglit_name, &parent_subtest) &&
-				    json_object_object_get_ex(parent_subtest, "result", &parent_subtest) &&
-				    !strcmp(json_object_get_string(parent_subtest), "abort"))
-					dynresulttext = "abort";
+				    json_object_object_get_ex(parent_subtest, "result", &parent_subtest)) {
+					const char *resulttext = json_object_get_string(parent_subtest);
+
+					if (!strcmp(resulttext, "abort") ||
+					    !strcmp(resulttext, "notrun"))
+						dynresulttext = resulttext;
+				}
 			}
 
 			set_result(current_dynamic_test, dynresulttext);
-- 
2.29.2

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

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

end of thread, other threads:[~2021-01-26 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-25 13:55 [igt-dev] [PATCH i-g-t] runner: Fix graceful exit result parsing for dynamic subtests Petri Latvala
2021-01-25 15:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-01-25 19:58 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-01-26 11:07 ` [igt-dev] [PATCH i-g-t] " Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.