From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: Intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH i-g-t] gem_watchdog: Skip test if default request expiry is not compiled in Date: Mon, 24 May 2021 15:01:13 +0100 [thread overview] Message-ID: <20210524140113.1782804-1-tvrtko.ursulin@linux.intel.com> (raw) From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> 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. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- 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..89992a3c5099 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!"); + 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; i915 = gem_reopen_driver(i915); /* Apply modparam. */ -- 2.30.2 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> To: igt-dev@lists.freedesktop.org Cc: Intel-gfx@lists.freedesktop.org, Tvrtko Ursulin <tvrtko.ursulin@intel.com> Subject: [igt-dev] [PATCH i-g-t] gem_watchdog: Skip test if default request expiry is not compiled in Date: Mon, 24 May 2021 15:01:13 +0100 [thread overview] Message-ID: <20210524140113.1782804-1-tvrtko.ursulin@linux.intel.com> (raw) From: Tvrtko Ursulin <tvrtko.ursulin@intel.com> 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. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> --- 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..89992a3c5099 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!"); + 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; i915 = gem_reopen_driver(i915); /* Apply modparam. */ -- 2.30.2 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev
next reply other threads:[~2021-05-24 14:01 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-24 14:01 Tvrtko Ursulin [this message] 2021-05-24 14:01 ` [igt-dev] [PATCH i-g-t] gem_watchdog: Skip test if default request expiry is not compiled in Tvrtko Ursulin 2021-05-24 14:19 ` [Intel-gfx] " Petri Latvala 2021-05-24 14:38 ` [Intel-gfx] [PATCH i-g-t v2] " Tvrtko Ursulin 2021-05-24 14:38 ` [igt-dev] " Tvrtko Ursulin 2021-06-29 22:00 ` [Intel-gfx] " Dixit, Ashutosh 2021-06-29 22:00 ` [igt-dev] " Dixit, Ashutosh 2021-05-24 15:23 ` [igt-dev] ✓ Fi.CI.BAT: success for gem_watchdog: Skip test if default request expiry is not compiled in (rev2) Patchwork 2021-05-24 21:21 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20210524140113.1782804-1-tvrtko.ursulin@linux.intel.com \ --to=tvrtko.ursulin@linux.intel.com \ --cc=Intel-gfx@lists.freedesktop.org \ --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: linkBe 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.