Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Petri Latvala <adrinael@adrinael.net>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH 1/3] runner: Normalize testlist entries that don't list subtests
Date: Tue, 24 Oct 2023 15:51:05 +0200	[thread overview]
Message-ID: <20231024155105.60f3a741@maurocar-mobl2> (raw)
In-Reply-To: <20231020133041.58257-1-adrinael@adrinael.net>

On Fri, 20 Oct 2023 16:30:39 +0300
Petri Latvala <adrinael@adrinael.net> wrote:

> As the syntax for "all subtests" and "test that doesn't have subtests"
> is the same, check the subtest listing when building the execution
> plan. Doing that makes it possible to still have "all subtests" in
> testlists (albeit not originally designed to support that) and enables
> blocklisting particular subtests.
> 
> Signed-off-by: Petri Latvala <adrinael@adrinael.net>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: Arkadiusz Hiler <arek@hiler.eu>
> Cc: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> Cc: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> Cc: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> Closes: https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/issues/149

That does the job.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>

> ---
>  runner/job_list.c | 22 +++++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/runner/job_list.c b/runner/job_list.c
> index e6ea83631..27cbb10bc 100644
> --- a/runner/job_list.c
> +++ b/runner/job_list.c
> @@ -230,8 +230,28 @@ static bool job_list_from_test_list(struct job_list *job_list,
>  			continue;
>  
>  		if (sscanf(line, "igt@%ms", &binary) == 1) {
> -			if ((delim = strchr(binary, '@')) != NULL)
> +			if ((delim = strchr(binary, '@')) != NULL) {
>  				*delim++ = '\0';
> +			} else {
> +				/*
> +				 * No subtests specified. Check
> +				 * whether the user means "all
> +				 * subtests" or if the test doesn't
> +				 * have any.
> +				 */
> +				if (entry.binary) {
> +					/* First flush the entry we're building for multiple-mode */
> +					add_job_list_entry(job_list, entry.binary, entry.subtests, entry.subtest_count);
> +					memset(&entry, 0, sizeof(entry));
> +					any = true;
> +				}
> +
> +				add_subtests(job_list, settings, binary,
> +					     &settings->include_regexes,
> +					     &settings->exclude_regexes);
> +				any = true;
> +				continue;
> +			}
>  
>  			if (!settings->multiple_mode) {
>  				char **subtests = NULL;

      parent reply	other threads:[~2023-10-24 13:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-20 13:30 [igt-dev] [PATCH 1/3] runner: Normalize testlist entries that don't list subtests Petri Latvala
2023-10-20 13:30 ` [igt-dev] [PATCH 2/3] runner/runner_tests: Unit tests for binary-name-only testlist entries Petri Latvala
2023-10-24 13:57   ` Mauro Carvalho Chehab
2023-10-24 16:53   ` Kamil Konieczny
2023-10-20 13:30 ` [igt-dev] [PATCH 3/3] runner/runner_tests: Fix name of no-subtests in unit tests Petri Latvala
2023-10-24 13:58   ` Mauro Carvalho Chehab
2023-10-24  1:01 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [1/3] runner: Normalize testlist entries that don't list subtests Patchwork
2023-10-24  1:56 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-24 13:51 ` Mauro Carvalho Chehab [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=20231024155105.60f3a741@maurocar-mobl2 \
    --to=mauro.chehab@linux.intel.com \
    --cc=adrinael@adrinael.net \
    --cc=igt-dev@lists.freedesktop.org \
    /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