public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH v3] tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture
Date: Fri,  3 Apr 2020 17:26:42 +0300	[thread overview]
Message-ID: <20200403142642.15061-1-imre.deak@intel.com> (raw)
In-Reply-To: <20200403124208.14234-1-imre.deak@intel.com>

On platforms w/o an aperture subtests using fences are not relevant, so
skip them. This also fixes a use-after-free error happening as a
side-effect of running the test on such platforms.

v2: Call igt_require() earlier to speed up runtime. (José)
v3: Fix the condition in igt_require().

Cc: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/kms_flip.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 9ce83c53d..77efb1d28 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -216,6 +216,7 @@ static void emit_fence_stress(struct test_output *o)
 
 	igt_require(bufmgr);
 
+	igt_assert(num_fences);
 	bo = calloc(sizeof(*bo), num_fences);
 	exec = calloc(sizeof(*exec), num_fences+1);
 	for (i = 0; i < num_fences - 1; i++) {
@@ -1339,6 +1340,8 @@ static int run_test(int duration, int flags)
 	int i, n, modes = 0;
 
 	igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
+	igt_require(!(flags & TEST_FENCE_STRESS) ||
+		    gem_available_fences(drm_fd));
 
 	resources = drmModeGetResources(drm_fd);
 	igt_require(resources);
@@ -1396,6 +1399,8 @@ static int run_pair(int duration, int flags)
 	int i, j, m, n, modes = 0;
 
 	igt_require((flags & TEST_HANG) == 0 || !is_wedged(drm_fd));
+	igt_require(!(flags & TEST_FENCE_STRESS) ||
+		    gem_available_fences(drm_fd));
 
 	resources = drmModeGetResources(drm_fd);
 	igt_require(resources);
-- 
2.23.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-04-03 14:26 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 12:29 [igt-dev] [PATCH i-g-t] tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture Imre Deak
2020-04-02 17:04 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-04-02 20:21 ` [igt-dev] [PATCH i-g-t] " Souza, Jose
2020-04-03 12:34   ` Imre Deak
2020-04-03 12:42 ` [igt-dev] [PATCH v2] " Imre Deak
2020-04-03 14:26   ` Imre Deak [this message]
2020-04-03 17:50     ` [igt-dev] [PATCH v3] " Souza, Jose
2020-04-03 13:25 ` [igt-dev] ✗ Fi.CI.IGT: failure for " Patchwork
2020-04-03 13:51   ` Imre Deak
2020-04-03 14:15 ` [igt-dev] ✗ Fi.CI.BAT: failure for tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture (rev2) Patchwork
2020-04-03 14:36 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-04-03 20:54 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-04-03 23:50 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture (rev3) Patchwork
2020-04-04 11:23 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2020-04-06  8:18   ` Imre Deak

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=20200403142642.15061-1-imre.deak@intel.com \
    --to=imre.deak@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