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

Bhanuprakash Modem bhanuprakash.modem at intel.com
Tue Sep 7 07:55:14 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 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_crc.c b/tests/kms_cursor_crc.c
index f478ae08d..d53f5d249 100644
--- a/tests/kms_cursor_crc.c
+++ b/tests/kms_cursor_crc.c
@@ -651,7 +651,10 @@ 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_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 igt-dev mailing list