Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
To: "Zbigniew Kempczyński" <zbigniew.kempczynski@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 1/2] tests/gem_sync: Use timeouts definitions instead hardcoded value
Date: Fri, 29 Oct 2021 14:32:48 -0700	[thread overview]
Message-ID: <87h7czsein.wl-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20211028182322.34133-2-zbigniew.kempczynski@intel.com>

On Thu, 28 Oct 2021 11:23:21 -0700, Zbigniew Kempczyński wrote:
>
> Make developer life easier and use definitions which are useful
> to shorten time during work on some subtest.

Hmm, I don't know about this one. If we want to increase 2 to 5 say for
some tests or reduce 20 to 10 for some others, previously we could just
change the numbers and here we need to go and #define some more
short-short, short-medium etc. Can we leave what we have as is? Unless you
have a strong preference. Thanks.

> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
> Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
> ---
>  tests/i915/gem_sync.c | 68 +++++++++++++++++++++++--------------------
>  1 file changed, 37 insertions(+), 31 deletions(-)
>
> diff --git a/tests/i915/gem_sync.c b/tests/i915/gem_sync.c
> index 0093ca25f..3b9f9889c 100644
> --- a/tests/i915/gem_sync.c
> +++ b/tests/i915/gem_sync.c
> @@ -1150,6 +1150,11 @@ preempt(int fd, const intel_ctx_t *ctx, unsigned ring,
>	intel_ctx_destroy(fd, tmp_ctx[0]);
>  }
>
> +/* small / medium / large */
> +#define STIMEOUT 1
> +#define MTIMEOUT 2
> +#define LTIMEOUT 20
> +
>  igt_main
>  {
>	const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
> @@ -1160,31 +1165,31 @@ igt_main
>		int num_children;
>		int timeout;
>	} all[] = {
> -		{ "basic-each", sync_ring, 1, 2 },
> -		{ "basic-store-each", store_ring, 1, 2 },
> -		{ "basic-many-each", store_many, 0, 2 },
> -		{ "switch-each", switch_ring, 1, 20 },
> -		{ "forked-switch-each", switch_ring, ncpus, 20 },
> -		{ "forked-each", sync_ring, ncpus, 20 },
> -		{ "forked-store-each", store_ring, ncpus, 20 },
> -		{ "active-each", active_ring, 0, 20 },
> -		{ "wakeup-each", wakeup_ring, 20, 1 },
> -		{ "active-wakeup-each", active_wakeup_ring, 20, 1 },
> -		{ "double-wakeup-each", wakeup_ring, 20, 2 },
> +		{ "basic-each", sync_ring, 1, MTIMEOUT },
> +		{ "basic-store-each", store_ring, 1, MTIMEOUT },
> +		{ "basic-many-each", store_many, 0, MTIMEOUT },
> +		{ "switch-each", switch_ring, 1, LTIMEOUT },
> +		{ "forked-switch-each", switch_ring, ncpus, LTIMEOUT },
> +		{ "forked-each", sync_ring, ncpus, LTIMEOUT },
> +		{ "forked-store-each", store_ring, ncpus, LTIMEOUT },
> +		{ "active-each", active_ring, 0, LTIMEOUT },
> +		{ "wakeup-each", wakeup_ring, 20, STIMEOUT },
> +		{ "active-wakeup-each", active_wakeup_ring, 20, STIMEOUT },
> +		{ "double-wakeup-each", wakeup_ring, 20, MTIMEOUT },
>		{}
>	}, individual[] = {
> -		{ "default", sync_ring, 1, 20 },
> -		{ "idle", idle_ring, 0, 20 },
> -		{ "active", active_ring, 0, 20 },
> -		{ "wakeup", wakeup_ring, 20, 1 },
> -		{ "active-wakeup", active_wakeup_ring, 20, 1 },
> -		{ "double-wakeup", wakeup_ring, 20, 2 },
> -		{ "store", store_ring, 1, 20 },
> -		{ "switch", switch_ring, 1, 20 },
> -		{ "forked-switch", switch_ring, ncpus, 20 },
> -		{ "many", store_many, 0, 20 },
> -		{ "forked", sync_ring, ncpus, 20 },
> -		{ "forked-store", store_ring, ncpus, 20 },
> +		{ "default", sync_ring, 1, LTIMEOUT },
> +		{ "idle", idle_ring, 0, LTIMEOUT },
> +		{ "active", active_ring, 0, LTIMEOUT },
> +		{ "wakeup", wakeup_ring, 20, STIMEOUT },
> +		{ "active-wakeup", active_wakeup_ring, 20, STIMEOUT },
> +		{ "double-wakeup", wakeup_ring, 20, MTIMEOUT },
> +		{ "store", store_ring, 1, LTIMEOUT },
> +		{ "switch", switch_ring, 1, LTIMEOUT },
> +		{ "forked-switch", switch_ring, ncpus, LTIMEOUT },
> +		{ "many", store_many, 0, LTIMEOUT },
> +		{ "forked", sync_ring, ncpus, LTIMEOUT },
> +		{ "forked-store", store_ring, ncpus, LTIMEOUT },
>		{}
>	};
>  #define for_each_test(t, T) for(typeof(*T) *t = T; t->name; t++)
> @@ -1215,19 +1220,20 @@ igt_main
>		}
>	}
>
> +
>	igt_subtest("basic-all")
> -		sync_all(fd, ctx, 1, 2);
> +		sync_all(fd, ctx, 1, MTIMEOUT);
>	igt_subtest("basic-store-all")
> -		store_all(fd, ctx, 1, 2);
> +		store_all(fd, ctx, 1, MTIMEOUT);
>
>	igt_subtest("all")
> -		sync_all(fd, ctx, 1, 20);
> +		sync_all(fd, ctx, 1, LTIMEOUT);
>	igt_subtest("store-all")
> -		store_all(fd, ctx, 1, 20);
> +		store_all(fd, ctx, 1, LTIMEOUT);
>	igt_subtest("forked-all")
> -		sync_all(fd, ctx, ncpus, 20);
> +		sync_all(fd, ctx, ncpus, LTIMEOUT);
>	igt_subtest("forked-store-all")
> -		store_all(fd, ctx, ncpus, 20);
> +		store_all(fd, ctx, ncpus, LTIMEOUT);
>
>	for_each_test(t, all) {
>		igt_subtest_f("%s", t->name)
> @@ -1254,11 +1260,11 @@ igt_main
>		}
>
>		igt_subtest("preempt-all")
> -			preempt(fd, ctx, ALL_ENGINES, 1, 20);
> +			preempt(fd, ctx, ALL_ENGINES, 1, LTIMEOUT);
>		igt_subtest_with_dynamic("preempt") {
>			for_each_ctx_engine(fd, ctx, e) {
>				igt_dynamic_f("%s", e->name)
> -					preempt(fd, ctx, e->flags, ncpus, 20);
> +					preempt(fd, ctx, e->flags, ncpus, LTIMEOUT);
>			}
>		}
>	}
> --
> 2.26.0
>

  reply	other threads:[~2021-10-29 21:32 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 18:23 [igt-dev] [PATCH i-g-t 0/2] Change gem_sync to no-reloc Zbigniew Kempczyński
2021-10-28 18:23 ` [igt-dev] [PATCH i-g-t 1/2] tests/gem_sync: Use timeouts definitions instead hardcoded value Zbigniew Kempczyński
2021-10-29 21:32   ` Dixit, Ashutosh [this message]
2021-11-02  7:40     ` Zbigniew Kempczyński
2021-10-28 18:23 ` [igt-dev] [PATCH i-g-t 2/2] tests/gem_sync: Use softpin path for no-reloc gens Zbigniew Kempczyński
2021-10-30  3:55   ` Dixit, Ashutosh
2021-11-02  8:23     ` Zbigniew Kempczyński
2021-10-28 21:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for Change gem_sync to no-reloc Patchwork
2021-10-29  5:02   ` Zbigniew Kempczyński
2021-10-29  6:10     ` Vudum, Lakshminarayana
2021-10-29  5:33 ` Patchwork
2021-10-29  5:53 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-10-29 10:27 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-10-29 10:46   ` Zbigniew Kempczyński
2021-10-29 16:47     ` Vudum, Lakshminarayana
2021-10-29 16:17 ` [igt-dev] ✓ Fi.CI.IGT: success " 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=87h7czsein.wl-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=zbigniew.kempczynski@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