All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: Petri Latvala <petri.latvala@intel.com>
Cc: igt-dev@lists.freedesktop.org,
	Jari Tahvanainen <jari.tahvanainen@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] lib/igt_core: Ensure subtest result is skip if all dynamic subtests skip
Date: Wed, 15 Dec 2021 06:31:46 -0800	[thread overview]
Message-ID: <878rwm0wj1.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211215103506.17273-1-petri.latvala@intel.com>

On Wed, 15 Dec 2021 02:35:06 -0800, Petri Latvala wrote:
>
> Even though the best practices for dynamic subtests is to not execute
> the dynamic subtest at all instead of skipping, there are a couple of
> tests that to the opposite, without an easy way to construct them
> along best practices. Accomodate this with fixing the handling of
> skipping dynamic subtests so that the result of the containing subtest
> becomes a skip also if all dynamic subtests skip, not just when there
> are no dynamic subtests.

I have seen this happen and the patch should convert a success exit status
to a skip exit status so this is:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

>
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Cc: Arkadiusz Hiler <arek@hiler.eu>
> Cc: Jari Tahvanainen <jari.tahvanainen@intel.com>
> ---
>  lib/igt_core.c | 9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index ec05535c..7c906675 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1471,7 +1471,14 @@ void igt_skip(const char *f, ...)
>	}
>
>	if (in_subtest) {
> -		/* Doing the same even if inside a dynamic subtest */
> +		if (in_dynamic_subtest) {
> +			/*
> +			 * Don't count skipping dynamic subtests, for
> +			 * the purposes of getting the result of the
> +			 * containing subtest.
> +			 */
> +			_igt_dynamic_tests_executed--;
> +		}
>		exit_subtest("SKIP");
>	} else if (test_with_subtests) {
>		skip_subtests_henceforth = SKIP;
> --
> 2.29.2
>

  parent reply	other threads:[~2021-12-15 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 10:35 [igt-dev] [PATCH i-g-t] lib/igt_core: Ensure subtest result is skip if all dynamic subtests skip Petri Latvala
2021-12-15 11:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-15 13:48 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-12-16  6:35   ` Petri Latvala
2021-12-16  7:27     ` Vudum, Lakshminarayana
2021-12-15 14:31 ` Dixit, Ashutosh [this message]
2021-12-16  6:37   ` [igt-dev] [PATCH i-g-t] " Petri Latvala
2021-12-16  7:20 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

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=878rwm0wj1.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=jari.tahvanainen@intel.com \
    --cc=petri.latvala@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.