summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-04-10 12:58:53 +0200
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2019-04-10 17:51:43 +0200
commit051ee61cd39a4378eded21e42b6c45e6fdc10d97 (patch)
treed753f1c267f88e1fc6983aa81e420a1287fd49fe /tests
parentf83344b1ce87c6e246e1632b3d62f8dc722286f1 (diff)
tests/kms_flip: Do not request event for flips we expect to fail.
If we unexpectedly pass, we get a cryptic (kms_flip:935) CRITICAL: Test assertion failure function set_flag, file kms_flip.c:271: (kms_flip:935) CRITICAL: Failed assertion: !(*v & flag) (kms_flip:935) CRITICAL: Last errno: 25, Inappropriate ioctl for device Instead of a more descriptive assertion error, clear the request for event to fix this. This will change the error reported in bug #103257. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> References: https://bugs.freedesktop.org/show_bug.cgi?id=103257 [mlankhorst: Replace igt_assert with igt_assert_eq based on ickle's suggestion] Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/kms_flip.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index e50c91ea..6287ce14 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -687,16 +687,15 @@ static unsigned int run_test_step(struct test_output *o)
if (o->flags & TEST_ENOENT) {
/* hope that fb 0xfffffff0 does not exist */
- igt_assert(do_page_flip(o, 0xfffffff0, false) == -ENOENT);
- igt_assert(set_mode(o, 0xfffffff0, 0, 0) == -ENOENT);
+ igt_assert_eq(do_page_flip(o, 0xfffffff0, false), -ENOENT);
+ igt_assert_eq(set_mode(o, 0xfffffff0, 0, 0), -ENOENT);
}
if (do_flip && (o->flags & TEST_EINVAL) && o->flip_state.count > 0)
- igt_assert(do_page_flip(o, new_fb_id, true) == expected_einval);
+ igt_assert_eq(do_page_flip(o, new_fb_id, false), expected_einval);
if (do_vblank && (o->flags & TEST_EINVAL) && o->vblank_state.count > 0)
- igt_assert(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply)
- == -EINVAL);
+ igt_assert_eq(do_wait_for_vblank(o, o->pipe, target_seq, &vbl_reply), -EINVAL);
if (o->flags & TEST_VBLANK_RACE) {
spawn_vblank_wait_thread(o);
@@ -765,7 +764,7 @@ static unsigned int run_test_step(struct test_output *o)
}
if (do_flip && (o->flags & TEST_EBUSY))
- igt_assert(do_page_flip(o, new_fb_id, true) == -EBUSY);
+ igt_assert_eq(do_page_flip(o, new_fb_id, false), -EBUSY);
if (do_flip && (o->flags & TEST_RMFB))
recreate_fb(o);
@@ -806,7 +805,7 @@ static unsigned int run_test_step(struct test_output *o)
== -EINVAL);
if (do_flip && (o->flags & TEST_EINVAL))
- igt_assert(do_page_flip(o, new_fb_id, true) == expected_einval);
+ igt_assert(do_page_flip(o, new_fb_id, false) == expected_einval);
unhang_gpu(drm_fd, hang);