All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests
@ 2020-01-27  8:46 Ramalingam C
  2020-01-27  8:56 ` Chris Wilson
  2020-01-27 14:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  0 siblings, 2 replies; 5+ messages in thread
From: Ramalingam C @ 2020-01-27  8:46 UTC (permalink / raw)
  To: igt-dev

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);
-}
-
-/*
- * 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));
-
-	gem_close(fd, create.handle);
-}
-
 static uint64_t atomic_compare_swap_u64(_Atomic(uint64_t) *ptr,
 					uint64_t oldval, uint64_t newval)
 {
@@ -304,12 +264,6 @@ igt_main
 	igt_subtest("create-invalid-size")
 		invalid_size_test(fd);
 
-	igt_subtest("create-valid-nonaligned")
-		valid_nonaligned_size(fd);
-
-	igt_subtest("create-invalid-nonaligned")
-		invalid_nonaligned_size(fd);
-
 	igt_subtest("create-size-update")
 		size_update(fd);
 
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests
  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
  2020-01-27 14:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  1 sibling, 1 reply; 5+ messages in thread
From: Chris Wilson @ 2020-01-27  8:56 UTC (permalink / raw)
  To: Ramalingam C, igt-dev

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
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests
  2020-01-27  8:56 ` Chris Wilson
@ 2020-01-27  9:46   ` Ramalingam C
  2020-01-27  9:56     ` Chris Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Ramalingam C @ 2020-01-27  9:46 UTC (permalink / raw)
  To: Chris Wilson; +Cc: igt-dev

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [igt-dev] [PATCH i-g-t] tests/i915/gem_create: Remove page nonaligned buffer tests
  2020-01-27  9:46   ` Ramalingam C
@ 2020-01-27  9:56     ` Chris Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2020-01-27  9:56 UTC (permalink / raw)
  To: Ramalingam C; +Cc: igt-dev

Quoting Ramalingam C (2020-01-27 09:46:46)
> 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... ?

No, we already do return aligned to mr->min_page_size, so we want some
generality. The minimum we expect is aligned to PAGE_SIZE, so that is
the minimum we need to enforce to ensure consistency with system-page
aligned uAPI (e.g. mmap).
-Chris
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [igt-dev] ✓ Fi.CI.BAT: success for tests/i915/gem_create: Remove page nonaligned buffer tests
  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 14:39 ` Patchwork
  1 sibling, 0 replies; 5+ messages in thread
From: Patchwork @ 2020-01-27 14:39 UTC (permalink / raw)
  To: Ramalingam C; +Cc: igt-dev

== Series Details ==

Series: tests/i915/gem_create: Remove page nonaligned buffer tests
URL   : https://patchwork.freedesktop.org/series/72603/
State : success

== Summary ==

CI Bug Log - changes from IGT_5387 -> IGTPW_3998
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/index.html

Known issues
------------

  Here are the changes found in IGTPW_3998 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@gem_close_race@basic-threads:
    - fi-byt-n2820:       [PASS][1] -> [INCOMPLETE][2] ([i915#45])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-byt-n2820/igt@gem_close_race@basic-threads.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-byt-n2820/igt@gem_close_race@basic-threads.html

  * igt@i915_module_load@reload-with-fault-injection:
    - fi-skl-6700k2:      [PASS][3] -> [DMESG-WARN][4] ([i915#889])
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-skl-6700k2/igt@i915_module_load@reload-with-fault-injection.html
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-skl-6700k2/igt@i915_module_load@reload-with-fault-injection.html

  * igt@i915_selftest@live_blt:
    - fi-bsw-nick:        [PASS][5] -> [DMESG-FAIL][6] ([i915#723])
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-bsw-nick/igt@i915_selftest@live_blt.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-bsw-nick/igt@i915_selftest@live_blt.html

  * igt@i915_selftest@live_gt_heartbeat:
    - fi-bsw-nick:        [PASS][7] -> [DMESG-FAIL][8] ([i915#541])
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-bsw-nick/igt@i915_selftest@live_gt_heartbeat.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-bsw-nick/igt@i915_selftest@live_gt_heartbeat.html

  * igt@kms_frontbuffer_tracking@basic:
    - fi-hsw-peppy:       [PASS][9] -> [DMESG-WARN][10] ([i915#44])
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-hsw-peppy/igt@kms_frontbuffer_tracking@basic.html

  * igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a:
    - fi-icl-dsi:         [PASS][11] -> [DMESG-WARN][12] ([i915#109])
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-icl-dsi/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a.html
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-icl-dsi/igt@kms_pipe_crc_basic@nonblocking-crc-pipe-a.html

  
#### Possible fixes ####

  * igt@i915_selftest@live_blt:
    - fi-hsw-4770r:       [DMESG-FAIL][13] ([i915#553] / [i915#725]) -> [PASS][14]
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-hsw-4770r/igt@i915_selftest@live_blt.html
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-hsw-4770r/igt@i915_selftest@live_blt.html
    - fi-ivb-3770:        [DMESG-FAIL][15] ([i915#725]) -> [PASS][16]
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-ivb-3770/igt@i915_selftest@live_blt.html
   [16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-ivb-3770/igt@i915_selftest@live_blt.html

  * igt@kms_chamelium@hdmi-hpd-fast:
    - fi-kbl-7500u:       [FAIL][17] ([fdo#111407]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_5387/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
   [18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html

  
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [i915#109]: https://gitlab.freedesktop.org/drm/intel/issues/109
  [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44
  [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45
  [i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
  [i915#553]: https://gitlab.freedesktop.org/drm/intel/issues/553
  [i915#723]: https://gitlab.freedesktop.org/drm/intel/issues/723
  [i915#725]: https://gitlab.freedesktop.org/drm/intel/issues/725
  [i915#889]: https://gitlab.freedesktop.org/drm/intel/issues/889


Participating hosts (49 -> 44)
------------------------------

  Additional (1): fi-apl-guc 
  Missing    (6): fi-ilk-m540 fi-hsw-4200u fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus 


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_5387 -> IGTPW_3998

  CI-20190529: 20190529
  CI_DRM_7816: 713d2a22a63ee93c0afea9a83c332f52ef90e91a @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_3998: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/index.html
  IGT_5387: 2e04a36cb5eba1a979bce80b58c35687f324f066 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

-igt@gem_create@create-invalid-nonaligned
-igt@gem_create@create-valid-nonaligned

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_3998/index.html
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-27 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2020-01-27  9:56     ` Chris Wilson
2020-01-27 14:39 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork

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.