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 i-g-t] tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture
Date: Thu,  2 Apr 2020 15:29:43 +0300	[thread overview]
Message-ID: <20200402122943.6583-1-imre.deak@intel.com> (raw)

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.

Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 tests/kms_flip.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 9ce83c53d..506c9c142 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++) {
@@ -1234,8 +1235,10 @@ static void run_test_on_crtc_set(struct test_output *o, int *crtc_idxs,
 		o->fb_width *= 2;
 
 	tiling = LOCAL_DRM_FORMAT_MOD_NONE;
-	if (o->flags & TEST_FENCE_STRESS)
+	if (o->flags & TEST_FENCE_STRESS) {
+		igt_require(gem_available_fences(drm_fd));
 		tiling = LOCAL_I915_FORMAT_MOD_X_TILED;
+	}
 
 	/* 256 MB is usually the maximum mappable aperture,
 	 * (make it 4x times that to ensure failure) */
-- 
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-02 12:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-02 12:29 Imre Deak [this message]
2020-04-02 17:04 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_flip: Skip detiler fences subtest on platforms w/o aperture 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   ` [igt-dev] [PATCH v3] " Imre Deak
2020-04-03 17:50     ` 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=20200402122943.6583-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