public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Intel graphics driver community testing & development
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH i-g-t 1/2] tests/gem_create: Explicitly check for -EINVAL on create-invalid-size
Date: Tue, 03 Oct 2017 15:38:55 +0300	[thread overview]
Message-ID: <1507034335.4728.55.camel@linux.intel.com> (raw)
In-Reply-To: <150703153237.20052.12920829762045022575@mail.alporthouse.com>

On Tue, 2017-10-03 at 12:52 +0100, Chris Wilson wrote:
> Quoting Joonas Lahtinen (2017-10-03 12:47:33)
> > Merge the remaining testing coverage delta from gem_bad_length and
> > check that creating an object of zero size fails with -EINVAL.
> > 
> > Suggested-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> > Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> > Cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> >  tests/gem_create.c | 14 +++++++++-----
> >  1 file changed, 9 insertions(+), 5 deletions(-)
> > 
> > diff --git a/tests/gem_create.c b/tests/gem_create.c
> > index de7b8209..655f7a4e 100644
> > --- a/tests/gem_create.c
> > +++ b/tests/gem_create.c
> > @@ -70,17 +70,18 @@ struct local_i915_gem_create_v2 {
> >         uint32_t pad;
> >  #define I915_CREATE_PLACEMENT_STOLEN (1<<0)
> >         uint32_t flags;
> > -} create;
> > +};
> >  
> >  #define LOCAL_IOCTL_I915_GEM_CREATE       DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct local_i915_gem_create_v2)
> >  
> >  static void invalid_flag_test(int fd)
> >  {
> > +       struct local_i915_gem_create_v2 create;
> >         int ret;
> >  
> >         gem_require_stolen_support(fd);
> >  
> > -       create.handle = 0;
> > +       CLEAR(create);
> >         create.size = PAGE_SIZE;
> >         create.flags = ~I915_CREATE_PLACEMENT_STOLEN;
> >         ret = drmIoctl(fd, LOCAL_IOCTL_I915_GEM_CREATE, &create);
> > @@ -95,10 +96,13 @@ static void invalid_flag_test(int fd)
> 
> First chunk, 
> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> 
> Second chunk, I think we should fix __gem_create() to follow the
> convention of returning the error code.

That's indeed better, I reviewed it. Please merge it first, I'll rebase
these two patches.

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2017-10-03 12:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 11:47 [PATCH i-g-t 1/2] tests/gem_create: Explicitly check for -EINVAL on create-invalid-size Joonas Lahtinen
2017-10-03 11:47 ` [PATCH i-g-t 2/2] tests: Drop gem_bad_length as redundant Joonas Lahtinen
2017-10-03 13:49   ` Chris Wilson
2017-10-03 11:52 ` [PATCH i-g-t 1/2] tests/gem_create: Explicitly check for -EINVAL on create-invalid-size Chris Wilson
2017-10-03 12:38   ` Joonas Lahtinen [this message]
2017-10-03 12:07 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork

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=1507034335.4728.55.camel@linux.intel.com \
    --to=joonas.lahtinen@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@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