[PATCH i-g-t] tests/kms_cursor_crc: Handle invalid cursor sizes

Bhanuprakash Modem bhanuprakash.modem at intel.com
Wed Sep 8 04:42:21 UTC 2021


As there are many possibilities to fail the commit, instead
of considering all the failures we must take -EINVAL only into
account.

Cc: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
Cc: Mika Kahola <mika.kahola at intel.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
 tests/kms_cursor_crc.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index f478ae08d..31f86cfbd 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -651,7 +651,11 @@ static void require_cursor_size(data_t *data, int w, int h)
 	igt_remove_fb(data->drm_fd, &primary_fb);
 	igt_output_set_pipe(output, PIPE_NONE);
 
-	igt_skip_on_f(ret, "Cursor size %dx%d not supported by driver\n", w, h);
+	if (ret < 0) {
+		igt_info("ret: %d errno: %d\n", ret, errno);
+		igt_assert_eq(errno, EINVAL);
+		igt_skip("Cursor size %dx%d not supported by driver\n", w, h);
+	}
 }
 
 static void run_test(data_t *data, void (*testfunc)(data_t *), int cursor_w, int cursor_h)
-- 
2.32.0



More information about the Intel-gfx-trybot mailing list