From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Tue, 29 Jun 2021 15:00:30 -0700 Message-ID: <87o8bobabl.wl-ashutosh.dixit@intel.com> From: "Dixit, Ashutosh" In-Reply-To: <20210524143801.1787579-1-tvrtko.ursulin@linux.intel.com> References: <20210524143801.1787579-1-tvrtko.ursulin@linux.intel.com> MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t v2] gem_watchdog: Skip test if default request expiry is not compiled in List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Tvrtko Ursulin Cc: igt-dev@lists.freedesktop.org, Intel-gfx@lists.freedesktop.org List-ID: On Mon, 24 May 2021 07:38:01 -0700, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin > > Test incorrectly assumes no modparam means default expiry, while in > reality no modparam means old kernel / de-selected feature in which > case test should skip. > > v2: > * New line. (Petri) Reviewed-by: Ashutosh Dixit > Signed-off-by: Tvrtko Ursulin > --- > tests/i915/gem_watchdog.c | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/tests/i915/gem_watchdog.c b/tests/i915/gem_watchdog.c > index 8f9fb17750fb..67fddac74bc1 100644 > --- a/tests/i915/gem_watchdog.c > +++ b/tests/i915/gem_watchdog.c > @@ -630,6 +630,7 @@ igt_main > > igt_fixture { > struct drm_i915_query_item item; > + const unsigned int timeout = 1; > char *tmp; > > i915 = drm_open_driver_master(DRIVER_INTEL); > @@ -639,16 +640,13 @@ igt_main > igt_require_gem(i915); > > tmp = __igt_params_get(i915, "request_timeout_ms"); > - if (tmp) { > - const unsigned int timeout = 1; > + igt_skip_on_f(!tmp || !atoi(tmp), > + "Request expiry not supported!\n"); > + free(tmp); > > - igt_params_save_and_set(i915, "request_timeout_ms", > - "%u", timeout * 1000); > - default_timeout_wait_s = timeout * 5; > - free(tmp); > - } else { > - default_timeout_wait_s = 12; > - } > + igt_params_save_and_set(i915, "request_timeout_ms", "%u", > + timeout * 1000); > + default_timeout_wait_s = timeout * 5; _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev