public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] igt/tests: Fix error checking in kms_atomic_transition
@ 2019-02-13 16:18 Stanislav Lisovskiy via igt-dev
  2019-02-13 17:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Stanislav Lisovskiy via igt-dev @ 2019-02-13 16:18 UTC (permalink / raw)
  To: igt-dev; +Cc: ville.syrjala, martin.peres, juhapekka.heikkila

There is no guarantee that error return value will be
always EINVAL, made a check more general as it can be
ERANGE, ENOSPC, EINVAL and probably others, which all
mean the same in context of this test case: i.e this sprite
size is not valid.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109225
Signed-off-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
---
 tests/kms_atomic_transition.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
index ec5d25de..58bf6280 100644
--- a/tests/kms_atomic_transition.c
+++ b/tests/kms_atomic_transition.c
@@ -282,7 +282,7 @@ retry:
 		wm_setup_plane(display, pipe, (1 << n_planes) - 1, parms, false);
 		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
 
-		if (ret == -EINVAL) {
+		if (ret != 0) {
 			if (cursor_width == sprite_width &&
 			    cursor_height == sprite_height) {
 				igt_assert_f(alpha,
@@ -472,7 +472,7 @@ run_transition_test(igt_display_t *display, enum pipe pipe, igt_output_t *output
 			igt_pipe_request_out_fence(pipe_obj);
 
 		ret = igt_display_try_commit_atomic(display, DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_ALLOW_MODESET, NULL);
-		if (ret != -EINVAL || pipe_obj->n_planes < 3)
+		if (ret == 0 || pipe_obj->n_planes < 3)
 			break;
 
 		ret = 0;
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-02-14 15:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-13 16:18 [igt-dev] [PATCH i-g-t] igt/tests: Fix error checking in kms_atomic_transition Stanislav Lisovskiy via igt-dev
2019-02-13 17:45 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-02-13 20:41 ` [igt-dev] [PATCH i-g-t] " Daniel Vetter
2019-02-14  8:22   ` Lisovskiy, Stanislav via igt-dev
2019-02-14  8:25     ` Daniel Vetter
2019-02-14  8:31       ` Lisovskiy, Stanislav via igt-dev
2019-02-14  8:33         ` Daniel Vetter
2019-02-14 12:14           ` Lisovskiy, Stanislav via igt-dev
2019-02-14 15:30             ` Daniel Vetter
2019-02-14  9:28 ` [igt-dev] ✓ Fi.CI.IGT: success for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox