[igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Handle invalid cursor sizes
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Tue Sep 7 12:15:20 UTC 2021
Hi,
On 7.9.2021 10.55, Bhanuprakash Modem wrote:
> As there are many possibilities to fail the commit, instead
> of considering all the failures we must take -EINVAL only into
> account.
>
you have some special failure case in mind? I quickly looking noticed
only -EINVAL and -ENOMEM possibilities for this commit which -ENOMEM I
think could never really happen as here's just set the new size fb in place.
> 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)
>
More information about the igt-dev
mailing list