From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Cc: igt-dev@lists.freedesktop.org, Piotr Kira <piotr.kira@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] runner/resultgen: Fix subtest runtimes
Date: Wed, 6 Dec 2023 12:02:22 +0100 [thread overview]
Message-ID: <20231206120222.3c34a552@maurocar-mobl2> (raw)
In-Reply-To: <20231130150923.17707-1-kamil.konieczny@linux.intel.com>
On Thu, 30 Nov 2023 16:09:23 +0100
Kamil Konieczny <kamil.konieczny@linux.intel.com> wrote:
> From: Piotr Kira <piotr.kira@intel.com>
>
> Runtimes for single subtest are not included in results json object
> after switching to socket communication. Make times for both subtests
> and dynamic subtests when using comms.
>
> v2: added GitLab issue number, added Petri to Cc (Kamil)
> reformat so it could be applied (Kamil)
>
> Cc: Petri Latvala <adrinael@adrinael.net>
> Fixes: 9d889fa6b8f0 ("runner: Use socket communications")
> Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/132
> Signed-off-by: Piotr Kira <piotr.kira@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
Didn't test it, but LGTM.
Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
> runner/resultgen.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/runner/resultgen.c b/runner/resultgen.c
> index b00bb6ba5..63f5b26d7 100644
> --- a/runner/resultgen.c
> +++ b/runner/resultgen.c
> @@ -1262,6 +1262,9 @@ struct comms_context
> char *subtestresult;
> char *dynamicsubtestresult;
>
> + double subtest_execution_time;
> + double dynamic_subtest_execution_time;
> +
> char *cmdline;
> int exitcode;
>
> @@ -1321,6 +1324,7 @@ static void comms_finish_subtest(struct comms_context *context)
> if (context->subtestresult == NULL)
> context->subtestresult = strdup("incomplete");
> set_result(context->current_test, context->subtestresult);
> + add_runtime(context->current_test, context->subtest_execution_time);
>
> free(context->subtestresult);
> context->subtestresult = NULL;
> @@ -1343,6 +1347,7 @@ static void comms_finish_dynamic_subtest(struct comms_context *context)
> if (context->dynamicsubtestresult == NULL)
> context->dynamicsubtestresult = strdup("incomplete");
> set_result(context->current_dynamic_subtest, context->dynamicsubtestresult);
> + add_runtime(context->current_dynamic_subtest, context->dynamic_subtest_execution_time);
>
> free(context->dynamicsubtestresult);
> context->dynamicsubtestresult = NULL;
> @@ -1617,6 +1622,7 @@ static bool comms_handle_subtest_result(const struct runnerpacket *packet,
> strlen(helper.subtestresult.result),
> &mappedresult, NULL);
> context->subtestresult = strdup(mappedresult);
> + context->subtest_execution_time = strtod(helper.subtestresult.timeused, NULL);
> }
>
> context->state = STATE_BETWEEN_SUBTESTS;
> @@ -1757,6 +1763,7 @@ static bool comms_handle_dynamic_subtest_result(const struct runnerpacket *packe
> strlen(helper.dynamicsubtestresult.result),
> &mappedresult, NULL);
> context->dynamicsubtestresult = strdup(mappedresult);
> + context->dynamic_subtest_execution_time = strtod(helper.dynamicsubtestresult.timeused, NULL);
> }
>
> context->state = STATE_BETWEEN_DYNAMIC_SUBTESTS;
next prev parent reply other threads:[~2023-12-06 11:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 15:09 [igt-dev] [PATCH i-g-t] runner/resultgen: Fix subtest runtimes Kamil Konieczny
2023-11-30 17:22 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-11-30 19:04 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-12-01 20:04 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-12-06 11:02 ` Mauro Carvalho Chehab [this message]
2023-12-06 11:06 ` [PATCH i-g-t] " Kira, Piotr
2023-12-08 10:20 ` [i-g-t] " Kira, Piotr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231206120222.3c34a552@maurocar-mobl2 \
--to=mauro.chehab@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.intel.com \
--cc=piotr.kira@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox