From: Peter Senna Tschudin <me@petersenna.com>
To: igt-dev@lists.freedesktop.org, kamil.konieczny@linux.intel.com,
andi.shyti@linux.intel.com
Subject: [PATCH i-g-t v6 2/2] Skip the test when no engines are found
Date: Sat, 30 Mar 2024 15:19:32 +0100 [thread overview]
Message-ID: <20240330141951.84598-2-me@petersenna.com> (raw)
In-Reply-To: <20240330141951.84598-1-me@petersenna.com>
This patch calls igt_skip() when no engines are found by
find_first_available_engine() preventing downstream code from crashing.
Signed-off-by: Peter Senna Tschudin <me@petersenna.com>
---
tests/intel/gem_exec_capture.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/tests/intel/gem_exec_capture.c b/tests/intel/gem_exec_capture.c
index a8348f21b..2afb84283 100644
--- a/tests/intel/gem_exec_capture.c
+++ b/tests/intel/gem_exec_capture.c
@@ -665,10 +665,12 @@ static bool needs_recoverable_ctx(int fd)
ctx = intel_ctx_create_all_physical(fd); \
igt_assert(ctx); \
for_each_ctx_engine(fd, ctx, e) \
- for_each_if(gem_class_can_store_dword(fd, e->class)) { \
+ if(gem_class_can_store_dword(fd, e->class)) { \
igt_assert(e); \
saved = configure_hangs(fd, e, ctx->id); \
break; \
+ } else { \
+ igt_skip("find_first_available_engine(): No engine available\n"); \
} \
e = &saved.engine; \
} while(0)
--
2.44.0
next prev parent reply other threads:[~2024-03-30 14:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-27 6:59 [PATCH i-g-t v4] Fix memory access issue due to variable block scope Peter Senna Tschudin
2024-03-27 7:51 ` ✓ CI.xeBAT: success for Fix memory access issue due to variable block scope (rev4) Patchwork
2024-03-27 7:59 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-03-27 18:43 ` [PATCH i-g-t v4] Fix memory access issue due to variable block scope Kamil Konieczny
2024-03-28 6:55 ` Peter Senna Tschudin
2024-03-28 7:10 ` Peter Senna Tschudin
2024-03-28 6:27 ` ✗ GitLab.Pipeline: warning for Fix memory access issue due to variable block scope (rev5) Patchwork
2024-03-28 7:03 ` ✓ CI.xeBAT: success " Patchwork
2024-03-28 12:42 ` [PATCH i-g-t v5] tests/intel/gem_exec_capture: Fix many-* subtests Peter Senna Tschudin
2024-03-28 15:49 ` Kamil Konieczny
2024-03-30 14:26 ` Peter Senna Tschudin
2024-03-28 18:59 ` ✗ Fi.CI.BAT: failure for Fix memory access issue due to variable block scope (rev6) Patchwork
2024-03-30 14:19 ` [PATCH i-g-t v6 1/2] tests/intel/gem_exec_capture: Fix many-* subtests Peter Senna Tschudin
2024-03-30 14:19 ` Peter Senna Tschudin [this message]
2024-04-02 16:17 ` [PATCH i-g-t v6 2/2] Skip the test when no engines are found Kamil Konieczny
2024-04-03 13:58 ` Peter Senna Tschudin
2024-04-02 16:06 ` [PATCH i-g-t v6 1/2] tests/intel/gem_exec_capture: Fix many-* subtests Kamil Konieczny
2024-03-30 15:02 ` ✓ CI.xeBAT: success for Fix memory access issue due to variable block scope (rev7) Patchwork
2024-03-30 15:03 ` ✗ Fi.CI.BAT: failure " 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=20240330141951.84598-2-me@petersenna.com \
--to=me@petersenna.com \
--cc=andi.shyti@linux.intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=kamil.konieczny@linux.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