From: Ander Conselvan De Oliveira <conselvan2@gmail.com>
To: Thomas Wood <thomas.wood@intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t] kms_addfb_basic: Require fb modifiers for unused field tests
Date: Wed, 26 Aug 2015 11:18:43 +0300 [thread overview]
Message-ID: <1440577123.3003.19.camel@gmail.com> (raw)
In-Reply-To: <CANkqdn2aYfDSdF4yuNPpK0sj7vGZ+X2JLAVyAXLDdMjc3tyD3Q@mail.gmail.com>
On Mon, 2015-08-24 at 14:40 +0100, Thomas Wood wrote:
> On 20 August 2015 at 15:43, Ander Conselvan de Oliveira
> <ander.conselvan.de.oliveira@intel.com> wrote:
> > The drm core doesn't check unused fields of ADDFB2 for pre-FB_MODIFIERS
> > userspace, so require that and use the local version of the defines.
> >
> > Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> > ---
> > tests/kms_addfb_basic.c | 19 ++++++++++++++-----
> > 1 file changed, 14 insertions(+), 5 deletions(-)
> >
> > diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> > index f10e12b..732d6dc 100644
> > --- a/tests/kms_addfb_basic.c
> > +++ b/tests/kms_addfb_basic.c
> > @@ -51,6 +51,7 @@ static void invalid_tests(int fd)
> > f.height = 512;
> > f.pixel_format = DRM_FORMAT_XRGB8888;
> > f.pitches[0] = 512*4;
> > + f.flags = LOCAL_DRM_MODE_FB_MODIFIERS;
> >
> > igt_fixture {
> > gem_bo = gem_create(fd, 1024*1024*4);
> > @@ -60,35 +61,43 @@ static void invalid_tests(int fd)
> >
> > f.handles[0] = gem_bo;
> >
> > - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == 0);
> > + igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == 0);
>
> Missing igt_require_fb_modifiers()? Maybe this needs to be placed in a
> separate subtest to prevent unrelated tests failing or skipping?
Looks like I was too trigger-happy with my search and replace. That one doesn't need the LOCAL_
version. I'll re-spin and also update the commit message based on our IRC discussion.
Thanks,
Ander
>
>
> > igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_RMFB, &f.fb_id) == 0);
> > f.fb_id = 0;
> > }
> >
> > igt_subtest("unused-handle") {
> > + igt_require_fb_modifiers(fd);
> > +
> > f.handles[1] = gem_bo_small;
> > - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > + igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > errno == EINVAL);
> > f.handles[1] = 0;
> > }
> >
> > igt_subtest("unused-pitches") {
> > + igt_require_fb_modifiers(fd);
> > +
> > f.pitches[1] = 512;
> > - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > + igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > errno == EINVAL);
> > f.pitches[1] = 0;
> > }
> >
> > igt_subtest("unused-offsets") {
> > + igt_require_fb_modifiers(fd);
> > +
> > f.offsets[1] = 512;
> > - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > + igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > errno == EINVAL);
> > f.offsets[1] = 0;
> > }
> >
> > igt_subtest("unused-modifier") {
> > + igt_require_fb_modifiers(fd);
> > +
> > f.modifier[1] = LOCAL_I915_FORMAT_MOD_X_TILED;
> > - igt_assert(drmIoctl(fd, DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > + igt_assert(drmIoctl(fd, LOCAL_DRM_IOCTL_MODE_ADDFB2, &f) == -1 &&
> > errno == EINVAL);
> > f.modifier[1] = 0;
> > }
> > --
> > 2.4.3
> >
> > _______________________________________________
> > Intel-gfx mailing list
> > Intel-gfx@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-08-26 8:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-20 14:43 [PATCH i-g-t] kms_addfb_basic: Require fb modifiers for unused field tests Ander Conselvan de Oliveira
2015-08-21 13:49 ` [PATCH i-g-t] gem_storedw_loop: Skip test if device doesn't have requested ring Ander Conselvan de Oliveira
2015-08-24 13:40 ` [PATCH i-g-t] kms_addfb_basic: Require fb modifiers for unused field tests Thomas Wood
2015-08-26 8:18 ` Ander Conselvan De Oliveira [this message]
2015-08-26 8:29 ` [PATCH v2 " Ander Conselvan de Oliveira
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=1440577123.3003.19.camel@gmail.com \
--to=conselvan2@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=thomas.wood@intel.com \
/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