public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] runner: Cope with repeated subtests in journal
@ 2019-05-31  9:56 Petri Latvala
  2019-05-31 11:36 ` Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Petri Latvala @ 2019-05-31  9:56 UTC (permalink / raw)
  To: igt-dev; +Cc: Tomi Sarvela, Petri Latvala

As seen in fallout with the i915 engine discovery patchset, subtests
can in very dire cases be entered multiple times, when the for loop
they're in doesn't progress. That is of course a bug in IGT that needs
to be fixed, but if (when) that happens again, don't make results take
a million years to process.

This patch has been tested to produce good results from the
corresponding bad runs.

Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 runner/resultgen.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index 2b7d26d5..7b4cd519 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -742,6 +742,7 @@ static const char *result_from_exitcode(int exitcode)
 static void add_subtest(struct subtests *subtests, char *subtest)
 {
 	size_t len = strlen(subtest);
+	size_t i;
 
 	if (len == 0)
 		return;
@@ -749,6 +750,11 @@ static void add_subtest(struct subtests *subtests, char *subtest)
 	if (subtest[len - 1] == '\n')
 		subtest[len - 1] = '\0';
 
+	/* Don't add if we already have this subtest */
+	for (i = 0; i < subtests->size; i++)
+		if (!strcmp(subtest, subtests->names[i]))
+			return;
+
 	subtests->size++;
 	subtests->names = realloc(subtests->names, sizeof(*subtests->names) * subtests->size);
 	subtests->names[subtests->size - 1] = subtest;
-- 
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] 4+ messages in thread

end of thread, other threads:[~2019-06-01 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-31  9:56 [igt-dev] [PATCH i-g-t] runner: Cope with repeated subtests in journal Petri Latvala
2019-05-31 11:36 ` Chris Wilson
2019-05-31 15:17 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-06-01 14:42 ` [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