public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Nirmoy Das <nirmoy.das@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Chris Wilson <chris.p.wilson@intel.com>,
	Nirmoy Das <nirmoy.das@intel.com>
Subject: [igt-dev] [PATCH i-g-t] i915/gem_exec_params: Cross-check getparam against engine execution
Date: Wed,  1 Feb 2023 15:20:26 +0100	[thread overview]
Message-ID: <20230201142026.14045-1-nirmoy.das@intel.com> (raw)

From: Chris Wilson <chris.p.wilson@intel.com>

Make the no-bsd, no-blt, no-vebox tests also check that if the getparam does report
the engine, the ring selector rather than skipping.

Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Chris Wilson <chris.p.wilson@intel.com>
Signed-off-by: Nirmoy Das <nirmoy.das@intel.com>
---
 tests/i915/gem_exec_params.c | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
index 618635ec3..3e06f2107 100644
--- a/tests/i915/gem_exec_params.c
+++ b/tests/i915/gem_exec_params.c
@@ -411,25 +411,26 @@ igt_main
 	igt_subtest("mmapped")
 		mmapped(fd);
 
-#define RUN_FAIL(expected_errno) do { \
-		igt_assert_eq(__gem_execbuf(fd, &execbuf), -expected_errno); \
-	} while(0)
-
 	igt_subtest("no-bsd") {
-		igt_require(!gem_has_bsd(fd));
 		execbuf.flags = I915_EXEC_BSD;
-		RUN_FAIL(EINVAL);
+		igt_assert_eq(__gem_execbuf(fd, &execbuf),
+			      gem_has_bsd(fd) ? 0 : -EINVAL);
 	}
 	igt_subtest("no-blt") {
-		igt_require(!gem_has_blt(fd));
 		execbuf.flags = I915_EXEC_BLT;
-		RUN_FAIL(EINVAL);
+		igt_assert_eq(__gem_execbuf(fd, &execbuf),
+			      gem_has_blt(fd) ? 0 : -EINVAL);
 	}
 	igt_subtest("no-vebox") {
-		igt_require(!gem_has_vebox(fd));
 		execbuf.flags = I915_EXEC_VEBOX;
-		RUN_FAIL(EINVAL);
+		igt_assert_eq(__gem_execbuf(fd, &execbuf),
+			      gem_has_vebox(fd) ? 0 : -EINVAL);
 	}
+
+#define RUN_FAIL(expected_errno) do { \
+		igt_assert_eq(__gem_execbuf(fd, &execbuf), -expected_errno); \
+	} while(0)
+
 	igt_subtest("invalid-ring") {
 		execbuf.flags = I915_EXEC_RING_MASK;
 		RUN_FAIL(EINVAL);
-- 
2.39.0

             reply	other threads:[~2023-02-01 14:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-01 14:20 Nirmoy Das [this message]
2023-02-01 14:47 ` [igt-dev] ✗ Fi.CI.BAT: failure for i915/gem_exec_params: Cross-check getparam against engine execution Patchwork
2023-02-01 15:56 ` [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_params: Cross-check getparam against engine execution (rev2) Patchwork
2023-02-01 16:56 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-02-02 15:41 ` [igt-dev] [PATCH i-g-t] i915/gem_exec_params: Cross-check getparam against engine execution Kamil Konieczny

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=20230201142026.14045-1-nirmoy.das@intel.com \
    --to=nirmoy.das@intel.com \
    --cc=chris.p.wilson@intel.com \
    --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: 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