[igt-dev] [PATCH i-g-t] runner: Don't read journal at all if socket comms are used

Petri Latvala petri.latvala at intel.com
Wed Nov 16 11:11:40 UTC 2022


When socket communications are used, the journal is left empty. When
processing results, reading an empty journal will add a test result
for the requested test, which can be incorrect when using testlists
with wildcards.

Testlists with wildcards were not the intended use of testlists but
they are used and thus this is considered a fix for a regression.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Nicholas Choi <Nicholas.Choi at amd.com>
Cc: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 runner/resultgen.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/runner/resultgen.c b/runner/resultgen.c
index 05c4234e..596de786 100644
--- a/runner/resultgen.c
+++ b/runner/resultgen.c
@@ -2119,12 +2119,6 @@ static bool parse_test_directory(int dirfd,
 		return false;
 	}
 
-	/*
-	 * fill_from_journal fills the subtests struct and adds
-	 * timeout results where applicable.
-	 */
-	fill_from_journal(fds[_F_JOURNAL], entry, &subtests, results);
-
 	/*
 	 * Get test output from socket comms if it exists, otherwise
 	 * parse stdout/stderr
@@ -2137,6 +2131,12 @@ static bool parse_test_directory(int dirfd,
 	}
 
 	if (commsparsed == COMMSPARSE_EMPTY) {
+		/*
+		 * fill_from_journal fills the subtests struct and
+		 * adds timeout results where applicable.
+		 */
+		fill_from_journal(fds[_F_JOURNAL], entry, &subtests, results);
+
 		if (!fill_from_output(fds[_F_OUT], entry->binary, "out", &subtests, results->tests) ||
 		    !fill_from_output(fds[_F_ERR], entry->binary, "err", &subtests, results->tests)) {
 			fprintf(stderr, "Error parsing output files (out.txt, err.txt)\n");
-- 
2.30.2



More information about the igt-dev mailing list