From: Boris Brezillon <boris.brezillon@collabora.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: IGT development <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t 7/9] tests/kms_lease: Adjust to kernel errno changes
Date: Wed, 27 Mar 2019 09:29:25 +0100 [thread overview]
Message-ID: <20190327092925.1f0dabf6@collabora.com> (raw)
In-Reply-To: <20190228141918.26043-7-daniel.vetter@ffwll.ch>
On Thu, 28 Feb 2019 15:19:16 +0100
Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> I dropped a superfluous check for negative object id (the kernel
> did a cast to s32, despite that object ids are always unsigned).
> Which changes the errno from EINVAL to ENOENT. Allow both.
>
> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
> tests/kms_lease.c | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index 7930d0737ace..7d7576cbb634 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -713,6 +713,10 @@ static void lease_again(data_t *data)
> terminate_lease(&lease_b);
> }
>
> +#define assert_unleased(ret) \
> + igt_assert_f((ret) == -EINVAL || (ret) == -ENOENT, \
> + "wrong return code %i, %s\n", ret, \
> + strerror(ret))
> /* Test leasing an invalid connector */
> static void lease_invalid_connector(data_t *data)
> {
> @@ -725,7 +729,7 @@ static void lease_invalid_connector(data_t *data)
> data->connector_id = 0xbaadf00d;
> ret = make_lease(data, &lease);
> data->connector_id = save_connector_id;
> - igt_assert_eq(ret, -EINVAL);
> + assert_unleased(ret);
> }
>
> /* Test leasing an invalid crtc */
> @@ -740,7 +744,7 @@ static void lease_invalid_crtc(data_t *data)
> data->crtc_id = 0xbaadf00d;
> ret = make_lease(data, &lease);
> data->crtc_id = save_crtc_id;
> - igt_assert_eq(ret, -EINVAL);
> + assert_unleased(ret);
> }
>
> static void lease_invalid_plane(data_t *data)
> @@ -754,7 +758,7 @@ static void lease_invalid_plane(data_t *data)
> data->plane_id = 0xbaadf00d;
> ret = make_lease(data, &lease);
> data->plane_id = save_plane_id;
> - igt_assert_eq(ret, -EINVAL);
> + assert_unleased(ret);
> }
>
>
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-27 8:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-28 14:19 [igt-dev] [PATCH i-g-t 1/9] tests/kms_addfb_basic: Check that only the owner can rmfb Daniel Vetter
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 2/9] tests:core_prop_blob: Drop local_ prefixes Daniel Vetter
2019-02-28 14:29 ` Ville Syrjälä
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 3/9] tests: s/core_prop_blob/kms_prop_blob Daniel Vetter
2019-02-28 14:30 ` Ville Syrjälä
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 4/9] tests/kms_lease: test implicit primary plane usage in page_flip ioctl Daniel Vetter
2019-03-27 8:04 ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 5/9] tests/kms_lease: test implicit primary plane usage in setcrtc ioctl Daniel Vetter
2019-03-27 8:26 ` Boris Brezillon
2019-03-27 9:21 ` Daniel Vetter
2019-03-27 10:10 ` Boris Brezillon
2019-03-27 12:14 ` Daniel Vetter
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 6/9] tests/kms_lease: test implicit cursor plane usage Daniel Vetter
2019-03-27 8:28 ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 7/9] tests/kms_lease: Adjust to kernel errno changes Daniel Vetter
2019-03-27 8:29 ` Boris Brezillon [this message]
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 8/9] tests/kms_lease: Handle new errno from idr/xa double insert Daniel Vetter
2019-03-27 8:30 ` Boris Brezillon
2019-02-28 14:19 ` [igt-dev] [PATCH i-g-t 9/9] tests/kms_lease: Check crtc used in atomic ioctl Daniel Vetter
2019-03-27 8:38 ` Boris Brezillon
2019-03-27 9:23 ` Daniel Vetter
2019-02-28 14:29 ` [igt-dev] [PATCH i-g-t 1/9] tests/kms_addfb_basic: Check that only the owner can rmfb Ville Syrjälä
2019-02-28 14:36 ` Chris Wilson
2019-02-28 15:44 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/9] " Patchwork
2019-02-28 18:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2019-03-28 9:09 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190327092925.1f0dabf6@collabora.com \
--to=boris.brezillon@collabora.com \
--cc=daniel.vetter@ffwll.ch \
--cc=igt-dev@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox