Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kira, Piotr" <piotr.kira@intel.com>
To: "igt-dev@lists.freedesktop.org" <igt-dev@lists.freedesktop.org>,
	"kamil.konieczny@linux.intel.com"
	<kamil.konieczny@linux.intel.com>
Subject: Re: [i-g-t] runner/resultgen: Fix subtest runtimes
Date: Fri, 8 Dec 2023 10:20:09 +0000	[thread overview]
Message-ID: <baffdb1cdcbac38a4025810f9708e9f6d15c8ddf.camel@intel.com> (raw)
In-Reply-To: <20231130150923.17707-1-kamil.konieczny@linux.intel.com>

On Thu, 2023-11-30 at 16:09 +0100, Kamil Konieczny 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>
> Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>

I'm an original author of this patch, and I've tested it.

Tested-by: Piotr Kira <piotr.kira@intel.com>

> ---
>  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;


      parent reply	other threads:[~2023-12-08 10:20 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 ` [igt-dev] [PATCH i-g-t] " Mauro Carvalho Chehab
2023-12-06 11:06 ` Kira, Piotr
2023-12-08 10:20 ` Kira, Piotr [this message]

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=baffdb1cdcbac38a4025810f9708e9f6d15c8ddf.camel@intel.com \
    --to=piotr.kira@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.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