From: Ramalingam C <ramalingam.c@intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: igt-dev <igt-dev@lists.freedesktop.org>
Subject: Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests
Date: Mon, 27 Jan 2020 15:16:46 +0530 [thread overview]
Message-ID: <20200127094147.GA25694@intel.com> (raw)
In-Reply-To: <158011536751.25356.9436764177649025245@skylake-alporthouse-com>
On 2020-01-27 at 08:56:07 +0000, Chris Wilson wrote:
> Quoting Ramalingam C (2020-01-27 08:46:10)
> > Considering that kernel returns the real memory size(page aligned)
> > allocated, nonaligned buffer tests are not valid anymore. Hence removing
> > them.
>
> >
> > Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
> > cc: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > tests/i915/gem_create.c | 46 -----------------------------------------
> > 1 file changed, 46 deletions(-)
> >
> > diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c
> > index 8fc128dae6e2..d80479c757e8 100644
> > --- a/tests/i915/gem_create.c
> > +++ b/tests/i915/gem_create.c
> > @@ -119,46 +119,6 @@ static void invalid_size_test(int fd)
> > igt_assert_eq(create_ioctl(fd, &create), -EINVAL);
> > }
> >
> > -/*
> > - * Creating an object with non-aligned size and trying to access it with an
> > - * offset, which is greater than the requested size but smaller than the
> > - * object's last page boundary. pwrite here must be successful.
> > - */
> > -static void valid_nonaligned_size(int fd)
> > -{
> > - struct drm_i915_gem_create create = {
> > - .size = PAGE_SIZE / 2,
> > - };
> > - char buf[PAGE_SIZE];
> > -
> > - igt_assert_eq(create_ioctl(fd, &create), 0);
> > -
> > - gem_write(fd, create.handle, PAGE_SIZE / 2, buf, PAGE_SIZE / 2);
> > -
> > - gem_close(fd, create.handle);
>
> This is reasonable, just add a igt_assert(create.size >= PAGE_SIZE) as
you mean igt_assert(create.size == PAGE_SIZE) right... ?
I will update this test.
-Ram
> well. We pass in a small request, the kernel pads it to a minimum of
> system page size so that it will work with the usual page aligned
> interfaces. We verify that the extra size returned by the kernel is
> usable.
>
> > -}
> > -
> > -/*
> > - * Creating an object with non-aligned size and trying to access it with an
> > - * offset, which is greater than the requested size and larger than the
> > - * object's last page boundary. pwrite here must fail.
> > - */
> > -static void invalid_nonaligned_size(int fd)
> > -{
> > - struct drm_i915_gem_create create = {
> > - .size = PAGE_SIZE / 2,
> > - };
> > - char buf[PAGE_SIZE];
> > -
> > - igt_assert_eq(create_ioctl(fd, &create), 0);
> > -
> > - /* This should fail. Hence cannot use gem_write. */
> > - igt_assert(__gem_write(fd, create.handle,
> > - PAGE_SIZE / 2, buf, PAGE_SIZE));
>
> This is falling under gem_write testing, since we aren't looking at
> create.size and deliberating trying to write passed the end.
>
> So I wouldn't be upset losing this.
> -Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2020-01-27 9:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-27 8:46 [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests Ramalingam C
2020-01-27 8:56 ` Chris Wilson
2020-01-27 9:46 ` Ramalingam C [this message]
2020-01-27 9:56 ` Chris Wilson
2020-01-27 14:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " 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=20200127094147.GA25694@intel.com \
--to=ramalingam.c@intel.com \
--cc=chris@chris-wilson.co.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.