All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] i915/gem_exec_params: add test_invalid_batch_start
@ 2020-03-04 20:52 ` Matthew Auld
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Auld @ 2020-03-04 20:52 UTC (permalink / raw
  To: igt-dev; +Cc: intel-gfx

Sanity check that kernel rejects too large batch_start_offset.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_params.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
index cf7ea306..afc8d2c7 100644
--- a/tests/i915/gem_exec_params.c
+++ b/tests/i915/gem_exec_params.c
@@ -268,6 +268,23 @@ static void mmapped(int i915)
 	gem_close(i915, buf);
 }
 
+static void test_invalid_batch_start(int fd)
+{
+	struct drm_i915_gem_exec_object2 exec = {
+		.handle = batch_create(fd),
+	};
+	struct drm_i915_gem_execbuffer2 execbuf = {
+		.buffers_ptr = to_user_pointer(&exec),
+		.buffer_count = 1,
+		.batch_start_offset = 4096, /* space jump */
+	};
+
+	igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
+
+	gem_sync(fd, exec.handle);
+	gem_close(fd, exec.handle);
+}
+
 struct drm_i915_gem_execbuffer2 execbuf;
 struct drm_i915_gem_exec_object2 gem_exec[1];
 uint32_t batch[2] = {MI_BATCH_BUFFER_END};
@@ -507,6 +524,9 @@ igt_main
 	igt_subtest("batch-first")
 		test_batch_first(fd);
 
+	igt_subtest("invalid-batch-start-offset")
+		test_invalid_batch_start(fd);
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* [igt-dev] [PATCH] i915/gem_exec_params: add test_invalid_batch_start
@ 2020-03-04 20:52 ` Matthew Auld
  0 siblings, 0 replies; 7+ messages in thread
From: Matthew Auld @ 2020-03-04 20:52 UTC (permalink / raw
  To: igt-dev; +Cc: intel-gfx

Sanity check that kernel rejects too large batch_start_offset.

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 tests/i915/gem_exec_params.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
index cf7ea306..afc8d2c7 100644
--- a/tests/i915/gem_exec_params.c
+++ b/tests/i915/gem_exec_params.c
@@ -268,6 +268,23 @@ static void mmapped(int i915)
 	gem_close(i915, buf);
 }
 
+static void test_invalid_batch_start(int fd)
+{
+	struct drm_i915_gem_exec_object2 exec = {
+		.handle = batch_create(fd),
+	};
+	struct drm_i915_gem_execbuffer2 execbuf = {
+		.buffers_ptr = to_user_pointer(&exec),
+		.buffer_count = 1,
+		.batch_start_offset = 4096, /* space jump */
+	};
+
+	igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
+
+	gem_sync(fd, exec.handle);
+	gem_close(fd, exec.handle);
+}
+
 struct drm_i915_gem_execbuffer2 execbuf;
 struct drm_i915_gem_exec_object2 gem_exec[1];
 uint32_t batch[2] = {MI_BATCH_BUFFER_END};
@@ -507,6 +524,9 @@ igt_main
 	igt_subtest("batch-first")
 		test_batch_first(fd);
 
+	igt_subtest("invalid-batch-start-offset")
+		test_invalid_batch_start(fd);
+
 #define DIRT(name) \
 	igt_subtest(#name "-dirt") { \
 		execbuf.flags = 0; \
-- 
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] 7+ messages in thread

* [igt-dev] ✗ GitLab.Pipeline: failure for i915/gem_exec_params: add test_invalid_batch_start
  2020-03-04 20:52 ` [igt-dev] " Matthew Auld
  (?)
@ 2020-03-05  9:54 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-03-05  9:54 UTC (permalink / raw
  To: Matthew Auld; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_params: add test_invalid_batch_start
URL   : https://patchwork.freedesktop.org/series/74288/
State : failure

== Summary ==

ERROR! This series introduces new undocumented tests:

gem_exec_params@invalid-batch-start-offset

Can you document them as per the requirement in the [CONTRIBUTING.md]?

[Documentation] has more details on how to do this.

Here are few examples:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/0316695d03aa46108296b27f3982ec93200c7a6e
https://gitlab.freedesktop.org/drm/igt-gpu-tools/commit/443cc658e1e6b492ee17bf4f4d891029eb7a205d

Thanks in advance!

[CONTRIBUTING.md]: https://gitlab.freedesktop.org/drm/igt-gpu-tools/blob/master/CONTRIBUTING.md#L19
[Documentation]: https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#igt-describe

Other than that, pipeline status: SUCCESS.

see https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/116002 for the overview.

== Logs ==

For more details see: https://gitlab.freedesktop.org/gfx-ci/igt-ci-tags/pipelines/116002
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [igt-dev] ✓ Fi.CI.BAT: success for i915/gem_exec_params: add test_invalid_batch_start
  2020-03-04 20:52 ` [igt-dev] " Matthew Auld
  (?)
  (?)
@ 2020-03-05 10:04 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-03-05 10:04 UTC (permalink / raw
  To: Matthew Auld; +Cc: igt-dev

== Series Details ==

Series: i915/gem_exec_params: add test_invalid_batch_start
URL   : https://patchwork.freedesktop.org/series/74288/
State : success

== Summary ==

CI Bug Log - changes from CI_DRM_8068 -> IGTPW_4260
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

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

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

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

### IGT changes ###

#### Issues hit ####

  * igt@kms_chamelium@dp-edid-read:
    - fi-cml-u2:          [PASS][1] -> [FAIL][2] ([i915#217] / [i915#976])
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8068/fi-cml-u2/igt@kms_chamelium@dp-edid-read.html
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4260/fi-cml-u2/igt@kms_chamelium@dp-edid-read.html

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

  * igt@prime_self_import@basic-with_two_bos:
    - fi-tgl-y:           [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8068/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4260/fi-tgl-y/igt@prime_self_import@basic-with_two_bos.html

  
#### Possible fixes ####

  * igt@i915_getparams_basic@basic-eu-total:
    - fi-tgl-y:           [DMESG-WARN][7] ([CI#94] / [i915#402]) -> [PASS][8]
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8068/fi-tgl-y/igt@i915_getparams_basic@basic-eu-total.html
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4260/fi-tgl-y/igt@i915_getparams_basic@basic-eu-total.html

  * igt@i915_selftest@live@gem_contexts:
    - fi-cfl-8700k:       [INCOMPLETE][9] ([i915#424]) -> [PASS][10]
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_8068/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4260/fi-cfl-8700k/igt@i915_selftest@live@gem_contexts.html

  
  [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94
  [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407
  [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217
  [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
  [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424
  [i915#976]: https://gitlab.freedesktop.org/drm/intel/issues/976


Participating hosts (52 -> 41)
------------------------------

  Additional (1): fi-gdg-551 
  Missing    (12): fi-ilk-m540 fi-hsw-4200u fi-skl-guc fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-cfl-8109u fi-bsw-kefka fi-kbl-7560u fi-byt-clapper fi-bdw-samus 


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

  * CI: CI-20190529 -> None
  * IGT: IGT_5492 -> IGTPW_4260

  CI-20190529: 20190529
  CI_DRM_8068: f8e69af5cca45947ebce78f677b75b0ecc4ba744 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_4260: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_4260/index.html
  IGT_5492: 2be153507cdd652843f6ab44cc2a52a7f30206d9 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools



== Testlist changes ==

+igt@gem_exec_params@invalid-batch-start-offset

== Logs ==

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

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

* Re: [Intel-gfx] [igt-dev] [PATCH] i915/gem_exec_params: add test_invalid_batch_start
  2020-03-04 20:52 ` [igt-dev] " Matthew Auld
@ 2020-03-05 12:05   ` Mika Kuoppala
  -1 siblings, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2020-03-05 12:05 UTC (permalink / raw
  To: Matthew Auld, igt-dev; +Cc: intel-gfx

Matthew Auld <matthew.auld@intel.com> writes:

> Sanity check that kernel rejects too large batch_start_offset.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/gem_exec_params.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
> index cf7ea306..afc8d2c7 100644
> --- a/tests/i915/gem_exec_params.c
> +++ b/tests/i915/gem_exec_params.c
> @@ -268,6 +268,23 @@ static void mmapped(int i915)
>  	gem_close(i915, buf);
>  }
>  
> +static void test_invalid_batch_start(int fd)
> +{
> +	struct drm_i915_gem_exec_object2 exec = {
> +		.handle = batch_create(fd),
> +	};
> +	struct drm_i915_gem_execbuffer2 execbuf = {
> +		.buffers_ptr = to_user_pointer(&exec),
> +		.buffer_count = 1,
> +		.batch_start_offset = 4096, /* space jump */

If we could get batch size from the handle would be
more documentative.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> +	};
> +
> +	igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
> +
> +	gem_sync(fd, exec.handle);
> +	gem_close(fd, exec.handle);
> +}
> +
>  struct drm_i915_gem_execbuffer2 execbuf;
>  struct drm_i915_gem_exec_object2 gem_exec[1];
>  uint32_t batch[2] = {MI_BATCH_BUFFER_END};
> @@ -507,6 +524,9 @@ igt_main
>  	igt_subtest("batch-first")
>  		test_batch_first(fd);
>  
> +	igt_subtest("invalid-batch-start-offset")
> +		test_invalid_batch_start(fd);
> +
>  #define DIRT(name) \
>  	igt_subtest(#name "-dirt") { \
>  		execbuf.flags = 0; \
> -- 
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

* Re: [igt-dev] [PATCH] i915/gem_exec_params: add test_invalid_batch_start
@ 2020-03-05 12:05   ` Mika Kuoppala
  0 siblings, 0 replies; 7+ messages in thread
From: Mika Kuoppala @ 2020-03-05 12:05 UTC (permalink / raw
  To: Matthew Auld, igt-dev; +Cc: intel-gfx

Matthew Auld <matthew.auld@intel.com> writes:

> Sanity check that kernel rejects too large batch_start_offset.
>
> Signed-off-by: Matthew Auld <matthew.auld@intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  tests/i915/gem_exec_params.c | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/tests/i915/gem_exec_params.c b/tests/i915/gem_exec_params.c
> index cf7ea306..afc8d2c7 100644
> --- a/tests/i915/gem_exec_params.c
> +++ b/tests/i915/gem_exec_params.c
> @@ -268,6 +268,23 @@ static void mmapped(int i915)
>  	gem_close(i915, buf);
>  }
>  
> +static void test_invalid_batch_start(int fd)
> +{
> +	struct drm_i915_gem_exec_object2 exec = {
> +		.handle = batch_create(fd),
> +	};
> +	struct drm_i915_gem_execbuffer2 execbuf = {
> +		.buffers_ptr = to_user_pointer(&exec),
> +		.buffer_count = 1,
> +		.batch_start_offset = 4096, /* space jump */

If we could get batch size from the handle would be
more documentative.

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> +	};
> +
> +	igt_assert_eq(__gem_execbuf(fd, &execbuf), -EINVAL);
> +
> +	gem_sync(fd, exec.handle);
> +	gem_close(fd, exec.handle);
> +}
> +
>  struct drm_i915_gem_execbuffer2 execbuf;
>  struct drm_i915_gem_exec_object2 gem_exec[1];
>  uint32_t batch[2] = {MI_BATCH_BUFFER_END};
> @@ -507,6 +524,9 @@ igt_main
>  	igt_subtest("batch-first")
>  		test_batch_first(fd);
>  
> +	igt_subtest("invalid-batch-start-offset")
> +		test_invalid_batch_start(fd);
> +
>  #define DIRT(name) \
>  	igt_subtest(#name "-dirt") { \
>  		execbuf.flags = 0; \
> -- 
> 2.20.1
>
> _______________________________________________
> igt-dev mailing list
> igt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

* [Intel-gfx] ✗ Fi.CI.BUILD: failure for i915/gem_exec_params: add test_invalid_batch_start
  2020-03-04 20:52 ` [igt-dev] " Matthew Auld
                   ` (3 preceding siblings ...)
  (?)
@ 2020-03-05 12:15 ` Patchwork
  -1 siblings, 0 replies; 7+ messages in thread
From: Patchwork @ 2020-03-05 12:15 UTC (permalink / raw
  To: Matthew Auld; +Cc: intel-gfx

== Series Details ==

Series: i915/gem_exec_params: add test_invalid_batch_start
URL   : https://patchwork.freedesktop.org/series/74289/
State : failure

== Summary ==

Applying: i915/gem_exec_params: add test_invalid_batch_start
error: sha1 information is lacking or useless (tests/i915/gem_exec_params.c).
error: could not build fake ancestor
hint: Use 'git am --show-current-patch' to see the failed patch
Patch failed at 0001 i915/gem_exec_params: add test_invalid_batch_start
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2020-03-05 12:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-04 20:52 [Intel-gfx] [PATCH] i915/gem_exec_params: add test_invalid_batch_start Matthew Auld
2020-03-04 20:52 ` [igt-dev] " Matthew Auld
2020-03-05  9:54 ` [igt-dev] ✗ GitLab.Pipeline: failure for " Patchwork
2020-03-05 10:04 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2020-03-05 12:05 ` [Intel-gfx] [igt-dev] [PATCH] " Mika Kuoppala
2020-03-05 12:05   ` Mika Kuoppala
2020-03-05 12:15 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure 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.