From d07fb7a19b8b78a2c8d75e0f99939bd477219213 Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Tue, 11 Sep 2018 14:38:52 +0300 Subject: runner/resultgen: More checking if subtests should exist If a test with subtests just exits immediately, or the test binary doesn't exist at all (as is sometimes the case with kms_chamelium), the existence of subtests doesn't end up in the execution journal. As was done for timeouts in a797cbf6918a ("runner/resultgen: Be more robust with incomplete tests"), check if we were attempting to run a subtest before attributing a 'notrun' result to an incorrect field. Signed-off-by: Petri Latvala Cc: Arkadiusz Hiler Cc: Martin Peres Reviewed-by: Arkadiusz Hiler --- runner/resultgen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'runner') diff --git a/runner/resultgen.c b/runner/resultgen.c index ea680914..d939583d 100644 --- a/runner/resultgen.c +++ b/runner/resultgen.c @@ -778,7 +778,7 @@ static void fill_from_journal(int fd, add_runtime(obj, time); /* If no subtests, the test result node also gets the runtime */ - if (subtests->size == 0) { + if (subtests->size == 0 && entry->subtest_count == 0) { obj = get_or_create_json_object(tests, piglit_name); add_runtime(obj, time); } -- cgit v1.2.3