Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B6C2897B5 for ; Tue, 7 Sep 2021 12:15:28 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id q26so13167233wrc.7 for ; Tue, 07 Sep 2021 05:15:28 -0700 (PDT) References: <20210907075514.492714-1-bhanuprakash.modem@intel.com> From: Juha-Pekka Heikkila Message-ID: <5df66859-7707-07dc-8780-889814ed8bc8@gmail.com> Date: Tue, 7 Sep 2021 15:15:20 +0300 MIME-Version: 1.0 In-Reply-To: <20210907075514.492714-1-bhanuprakash.modem@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [igt-dev] [PATCH i-g-t] tests/kms_cursor_crc: Handle invalid cursor sizes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: juhapekka.heikkila@gmail.com Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: Bhanuprakash Modem , igt-dev@lists.freedesktop.org Cc: Mika Kahola List-ID: 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 > Cc: Mika Kahola > Signed-off-by: Bhanuprakash Modem > --- > 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) >