Skip to contentSkip to conversation

tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl

PATCH In review [email protected] 4 participants 5 messages Nov 14, 2023 – Nov 15, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl

From: Sai Gowtham Ch <[email protected]>

Add Negative tests for get exec_queue property ioctl.

---
 tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)
tests/intel/xe_exec_queue_property.c +76 -1
index 4e32aefa5..5278304be 100644
@@ -4,7 +4,7 @@
  */
 
 /**
- * TEST: Basic tests to check exec_queue set property functionality
+ * TEST: Basic tests to check exec_queue set/get property functionality
  * Category: Software building block
  * Sub-category: exec queue property
  * Functionality: exec queue set property
@@ -108,6 +108,72 @@ static void test_property_min_max(int xe, int engine, const char **property)
 	test_set_property(xe, property_name, min - 1, -EINVAL);
 }
 
+/**
+ * SUBTEST: Invalid-exec-queue
+ * Description: Negative test to check the expected behaviour with invalid exec_queue_id.
+ * Test category: functionality test
+ */
+static void Invalid_exec_queue_id(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.exec_queue_id = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, ENOENT);
+}
+
+/**
+ * SUBTEST: non-zero-reserved
+ * Description: Negative test to check the expected behaviour with non-zero reserved.
+ * Test category: functionality test
+ */
+static void non_zero_reserved(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.reserved[0] = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+	uint32_t vm;
+	uint32_t exec_queue;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm, DRM_XE_ENGINE_CLASS_COPY);
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, EINVAL);
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
+/**
+ * SUBTEST: invalid-value
+ * Description: Check if get property value works fine.
+ * Test category: functionality test
+ */
+static void invalid_value(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.value = -1,
+		.reserved[0] = 0,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	uint32_t exec_queue;
+	uint32_t vm;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm, DRM_XE_ENGINE_CLASS_COPY);
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args);
+	igt_assert(args.value == 0);
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
 igt_main
 {
 	static const struct {
@@ -182,6 +248,15 @@ igt_main
 		}
 	}
 
+	igt_subtest("Invalid-exec-queue")
+		Invalid_exec_queue_id(xe);
+
+	igt_subtest("non-zero-reserved")
+		non_zero_reserved(xe);
+
+	igt_subtest("invalid-value")
+		invalid_value(xe);
+
 	igt_fixture {
 		xe_device_put(xe);
 		drm_close_driver(xe);
Signature · 1 line
2.39.1
#1 lore raw

[igt-dev] ✗ Fi.CI.BAT: failure for tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl (rev2)

== Series Details ==

== Series Details ==

Series: tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl (rev2)
URL : https://patchwork.freedesktop.org/series/126374/
State : failure

== Summary ==

CI Bug Log - changes from CI_DRM_13873 -> IGTPW_10184
====================================================

Summary
-------

**FAILURE**

Serious unknown changes coming with IGTPW_10184 absolutely need to be verified manually.

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10184, please notify your bug team ([email protected]) to allow them to document this new failure mode, which will reduce false positives in CI.

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

Participating hosts (37 -> 36)
------------------------------

Additional (3): bat-rpls-1 bat-kbl-2 bat-dg2-9
Missing (4): fi-hsw-4770 fi-bsw-n3050 bat-adlp-6 fi-snb-2520m

Possible new issues
-------------------

Here are the unknown changes that may have been introduced in IGTPW_10184:

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@gt_mocs:
- bat-mtlp-6: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13873/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-mtlp-6/igt@i915_selftest@live@gt_mocs.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@debugfs_test@basic-hwmon:
- bat-rpls-1: NOTRUN -> [SKIP][3] ([i915#9318])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@fbdev@info:
- bat-rpls-1: NOTRUN -> [SKIP][4] ([i915#1849] / [i915#2582])
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]
- bat-kbl-2: NOTRUN -> [SKIP][5] ([fdo#109271] / [i915#1849])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-kbl-2/igt@[email protected]

* igt@fbdev@write:
- bat-rpls-1: NOTRUN -> [SKIP][6] ([i915#2582]) +3 other tests skip
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2: NOTRUN -> [SKIP][7] ([fdo#109271]) +24 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-kbl-2/igt@[email protected]

* igt@gem_lmem_swapping@random-engines:
- bat-rpls-1: NOTRUN -> [SKIP][8] ([i915#4613]) +3 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@gem_mmap@basic:
- bat-dg2-9: NOTRUN -> [SKIP][9] ([i915#4083])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@gem_mmap_gtt@basic:
- bat-dg2-9: NOTRUN -> [SKIP][10] ([i915#4077]) +2 other tests skip
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@gem_render_tiled_blits@basic:
- bat-dg2-9: NOTRUN -> [SKIP][11] ([i915#4079]) +1 other test skip
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@gem_tiled_pread_basic:
- bat-rpls-1: NOTRUN -> [SKIP][12] ([i915#3282])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@gem_tiled_pread_basic.html

* igt@i915_pm_rps@basic-api:
- bat-dg2-9: NOTRUN -> [SKIP][13] ([i915#6621])
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][14] ([i915#6621])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@i915_selftest@live@execlists:
- fi-bsw-nick: [PASS][15] -> [ABORT][16] ([i915#7911])
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13873/fi-bsw-nick/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/fi-bsw-nick/igt@i915_selftest@[email protected]

* igt@kms_addfb_basic@addfb25-y-tiled-small-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][17] ([i915#5190])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_addfb_basic@basic-y-tiled-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][18] ([i915#4215] / [i915#5190])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_addfb_basic@framebuffer-vs-set-tiling:
- bat-dg2-9: NOTRUN -> [SKIP][19] ([i915#4212]) +6 other tests skip
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_addfb_basic@tile-pitch-mismatch:
- bat-dg2-9: NOTRUN -> [SKIP][20] ([i915#4212] / [i915#5608])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy:
- bat-dg2-9: NOTRUN -> [SKIP][21] ([i915#4103] / [i915#4213] / [i915#5608]) +1 other test skip
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_cursor_legacy@basic-flip-after-cursor-legacy:
- bat-rpls-1: NOTRUN -> [SKIP][22] ([i915#1845]) +17 other tests skip
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@kms_flip@basic-flip-vs-modeset:
- bat-rpls-1: NOTRUN -> [SKIP][23] ([i915#3637]) +3 other tests skip
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@kms_force_connector_basic@force-load-detect:
- bat-dg2-9: NOTRUN -> [SKIP][24] ([fdo#109285])
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][25] ([fdo#109285])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@kms_force_connector_basic@prune-stale-modes:
- bat-dg2-9: NOTRUN -> [SKIP][26] ([i915#5274])
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@kms_frontbuffer_tracking@basic:
- bat-rpls-1: NOTRUN -> [SKIP][27] ([i915#1849])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- bat-kbl-2: NOTRUN -> [SKIP][28] ([fdo#109271] / [i915#1845]) +14 other tests skip
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-kbl-2/igt@[email protected]

* igt@kms_pipe_crc_basic@read-crc-frame-sequence@pipe-d-edp-1:
- bat-rplp-1: [PASS][29] -> [ABORT][30] ([i915#8668])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_13873/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rplp-1/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@cursor_plane_move:
- bat-rpls-1: NOTRUN -> [SKIP][31] ([i915#1072]) +3 other tests skip
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@kms_psr@cursor_plane_move.html

* igt@kms_psr@sprite_plane_onoff:
- bat-dg2-9: NOTRUN -> [SKIP][32] ([i915#1072]) +3 other tests skip
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@kms_psr@sprite_plane_onoff.html

* igt@kms_setmode@basic-clone-single-crtc:
- bat-dg2-9: NOTRUN -> [SKIP][33] ([i915#3555] / [i915#4098])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][34] ([i915#3555])
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@prime_vgem@basic-fence-flip:
- bat-dg2-9: NOTRUN -> [SKIP][35] ([i915#3708])
[35]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][36] ([fdo#109295] / [i915#1845] / [i915#3708])
[36]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

* igt@prime_vgem@basic-fence-mmap:
- bat-dg2-9: NOTRUN -> [SKIP][37] ([i915#3708] / [i915#4077]) +1 other test skip
[37]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]

* igt@prime_vgem@basic-write:
- bat-dg2-9: NOTRUN -> [SKIP][38] ([i915#3291] / [i915#3708]) +2 other tests skip
[38]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-dg2-9/igt@[email protected]
- bat-rpls-1: NOTRUN -> [SKIP][39] ([fdo#109295] / [i915#3708]) +2 other tests skip
[39]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/bat-rpls-1/igt@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285
[fdo#109295]: https://bugs.freedesktop.org/show_bug.cgi?id=109295
[i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#2582]: https://gitlab.freedesktop.org/drm/intel/issues/2582
[i915#3282]: https://gitlab.freedesktop.org/drm/intel/issues/3282
[i915#3291]: https://gitlab.freedesktop.org/drm/intel/issues/3291
[i915#3555]: https://gitlab.freedesktop.org/drm/intel/issues/3555
[i915#3637]: https://gitlab.freedesktop.org/drm/intel/issues/3637
[i915#3708]: https://gitlab.freedesktop.org/drm/intel/issues/3708
[i915#4077]: https://gitlab.freedesktop.org/drm/intel/issues/4077
[i915#4079]: https://gitlab.freedesktop.org/drm/intel/issues/4079
[i915#4083]: https://gitlab.freedesktop.org/drm/intel/issues/4083
[i915#4098]: https://gitlab.freedesktop.org/drm/intel/issues/4098
[i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103
[i915#4212]: https://gitlab.freedesktop.org/drm/intel/issues/4212
[i915#4213]: https://gitlab.freedesktop.org/drm/intel/issues/4213
[i915#4215]: https://gitlab.freedesktop.org/drm/intel/issues/4215
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
[i915#5190]: https://gitlab.freedesktop.org/drm/intel/issues/5190
[i915#5274]: https://gitlab.freedesktop.org/drm/intel/issues/5274
[i915#5354]: https://gitlab.freedesktop.org/drm/intel/issues/5354
[i915#5608]: https://gitlab.freedesktop.org/drm/intel/issues/5608
[i915#6621]: https://gitlab.freedesktop.org/drm/intel/issues/6621
[i915#7911]: https://gitlab.freedesktop.org/drm/intel/issues/7911
[i915#8668]: https://gitlab.freedesktop.org/drm/intel/issues/8668
[i915#9318]: https://gitlab.freedesktop.org/drm/intel/issues/9318

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

* CI: CI-20190529 -> None
* IGT: IGT_7587 -> IGTPW_10184

CI-20190529: 20190529
CI_DRM_13873: 2b0a5e9915c131825481a9cc2aecb89088f51c00 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10184: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/index.html
IGT_7587: bec435c24d23524d55f419a02af375e84c9be9d3 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

Testlist changes
----------------

+igt@kms_psr@basic
+igt@kms_psr@cursor_blt
+igt@kms_psr@cursor_mmap_cpu
+igt@kms_psr@cursor_mmap_gtt
+igt@kms_psr@cursor_plane_move
+igt@kms_psr@cursor_plane_onoff
+igt@kms_psr@cursor_render
+igt@kms_psr@dpms
+igt@kms_psr@no_drrs
+igt@kms_psr@primary_blt
+igt@kms_psr@primary_mmap_cpu
+igt@kms_psr@primary_mmap_gtt
+igt@kms_psr@primary_page_flip
+igt@kms_psr@primary_render
+igt@kms_psr@sprite_blt
+igt@kms_psr@sprite_mmap_cpu
+igt@kms_psr@sprite_mmap_gtt
+igt@kms_psr@sprite_plane_move
+igt@kms_psr@sprite_plane_onoff
+igt@kms_psr@sprite_render
+igt@kms_psr@suspend
+igt@xe_exec_queue_property@invalid-exec-queue
+igt@xe_exec_queue_property@invalid-value
+igt@xe_exec_queue_property@non-zero-reserved
-igt@kms_psr@pr_basic
-igt@kms_psr@pr_cursor_blt
-igt@kms_psr@pr_cursor_mmap_cpu
-igt@kms_psr@pr_cursor_mmap_gtt
-igt@kms_psr@pr_cursor_plane_move
-igt@kms_psr@pr_cursor_plane_onoff
-igt@kms_psr@pr_cursor_render
-igt@kms_psr@pr_dpms
-igt@kms_psr@pr_no_drrs
-igt@kms_psr@pr_primary_blt
-igt@kms_psr@pr_primary_mmap_cpu
-igt@kms_psr@pr_primary_mmap_gtt
-igt@kms_psr@pr_primary_page_flip
-igt@kms_psr@pr_primary_render
-igt@kms_psr@pr_sprite_blt
-igt@kms_psr@pr_sprite_mmap_cpu
-igt@kms_psr@pr_sprite_mmap_gtt
-igt@kms_psr@pr_sprite_plane_move
-igt@kms_psr@pr_sprite_plane_onoff
-igt@kms_psr@pr_sprite_render
-igt@kms_psr@pr_suspend
-igt@kms_psr@psr_basic
-igt@kms_psr@psr_cursor_blt
-igt@kms_psr@psr_cursor_mmap_cpu
-igt@kms_psr@psr_cursor_mmap_gtt
-igt@kms_psr@psr_cursor_plane_move
-igt@kms_psr@psr_cursor_plane_onoff
-igt@kms_psr@psr_cursor_render
-igt@kms_psr@psr_dpms
-igt@kms_psr@psr_no_drrs
-igt@kms_psr@psr_primary_blt
-igt@kms_psr@psr_primary_mmap_cpu
-igt@kms_psr@psr_primary_mmap_gtt
-igt@kms_psr@psr_primary_page_flip
-igt@kms_psr@psr_primary_render
-igt@kms_psr@psr_sprite_blt
-igt@kms_psr@psr_sprite_mmap_cpu
-igt@kms_psr@psr_sprite_mmap_gtt
-igt@kms_psr@psr_sprite_plane_move
-igt@kms_psr@psr_sprite_plane_onoff
-igt@kms_psr@psr_sprite_render
-igt@kms_psr@psr_suspend

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/index.html

Reviewed-by on v1 1/1
#2 lore raw
In reply to [email protected]
Quoted 75 lines

-----Original Message-----
From: igt-dev <[email protected]> On Behalf Of [email protected]
Sent: Tuesday, November 14, 2023 5:58 PM
To: [email protected]; Ch, Sai Gowtham <[email protected]>
Subject: [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl

From: Sai Gowtham Ch <[email protected]>

Add Negative tests for get exec_queue property ioctl.

---
 tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)
tests/intel/xe_exec_queue_property.c +1 -1
index 4e32aefa5..5278304be 100644
@@ -4,7 +4,7 @@
  */
 
 /**
- * TEST: Basic tests to check exec_queue set property functionality
+ * TEST: Basic tests to check exec_queue set/get property functionality
  * Category: Software building block
  * Sub-category: exec queue property
  * Functionality: exec queue set property @@ -108,6 +108,72 @@ static void

test_property_min_max(int xe, int engine, const char **property)

tests/intel/xe_exec_queue_property.c +3 -0
 	test_set_property(xe, property_name, min - 1, -EINVAL);  }
 
+/**
+ * SUBTEST: Invalid-exec-queue
+ * Description: Negative test to check the expected behaviour with invalid

exec_queue_id.
+ * Test category: functionality test
+ */

tests/intel/xe_exec_queue_property.c +7 -0
+static void Invalid_exec_queue_id(int xe) {
+	struct drm_xe_exec_queue_get_property args = {
+		.exec_queue_id = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY,

&args, ENOENT);

tests/intel/xe_exec_queue_property.c +5 -0
+}
+
+/**
+ * SUBTEST: non-zero-reserved
+ * Description: Negative test to check the expected behaviour with non-zero

reserved.
+ * Test category: functionality test
+ */

tests/intel/xe_exec_queue_property.c +11 -0
+static void non_zero_reserved(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.reserved[0] = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+	uint32_t vm;
+	uint32_t exec_queue;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm,

DRM_XE_ENGINE_CLASS_COPY);

tests/intel/xe_exec_queue_property.c +3 -0
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY,

&args, EINVAL);

tests/intel/xe_exec_queue_property.c static void test_property_min_max(int xe, int engine, const char **property) · line 151

Quoted 7 lines
tests/intel/xe_exec_queue_property.c +7 -0
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
+/**
+ * SUBTEST: invalid-value

This looks like a basic test more than a negative test. Pls update the test name wherever required. With that change,

Quoted 47 lines

+ * Description: Check if get property value works fine.
+ * Test category: functionality test
+ */

tests/intel/xe_exec_queue_property.c +13 -0
+static void invalid_value(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.value = -1,
+		.reserved[0] = 0,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	uint32_t exec_queue;
+	uint32_t vm;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm,

DRM_XE_ENGINE_CLASS_COPY);

tests/intel/xe_exec_queue_property.c +18 -1
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args);
+	igt_assert(args.value == 0);
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
 igt_main
 {
 	static const struct {
@@ -182,6 +248,15 @@ igt_main
 		}
 	}
 
+	igt_subtest("Invalid-exec-queue")
+		Invalid_exec_queue_id(xe);
+
+	igt_subtest("non-zero-reserved")
+		non_zero_reserved(xe);
+
+	igt_subtest("invalid-value")
+		invalid_value(xe);
+
 	igt_fixture {
 		xe_device_put(xe);
 		drm_close_driver(xe);
--

2.39.1

#3 lore raw

[igt-dev] ✓ CI.xeBAT: success for tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl (rev2)

In reply to [email protected]
== Series Details ==

== Series Details ==

Series: tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl (rev2)
URL : https://patchwork.freedesktop.org/series/126374/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_7587_BAT -> XEIGTPW_10184_BAT
====================================================

Summary
-------

**SUCCESS**

No regressions found.

Participating hosts (4 -> 4)
------------------------------

No changes in participating hosts

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

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

### IGT changes ###

#### Issues hit ####

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-d-dp-3:
- bat-dg2-oem2: NOTRUN -> [FAIL][1] ([Intel XE#400] / [Intel XE#616])
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]

* igt@kms_psr@primary_page_flip:
- bat-dg2-oem2: NOTRUN -> [SKIP][2] ([Intel XE#535]) +2 other tests skip
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@kms_psr@primary_page_flip.html

* igt@xe_exec_fault_mode@many-basic:
- bat-dg2-oem2: NOTRUN -> [SKIP][3] ([Intel XE#288]) +17 other tests skip
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@[email protected]

#### Possible fixes ####

* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- bat-adlp-7: [FAIL][4] ([Intel XE#480]) -> [PASS][5] +1 other test pass
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-adlp-7/igt@kms_flip@[email protected]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-adlp-7/igt@kms_flip@[email protected]

* igt@kms_pipe_crc_basic@hang-read-crc:
- bat-dg2-oem2: [INCOMPLETE][6] ([Intel XE#282] / [Intel XE#749]) -> [PASS][7]
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-dg2-oem2/igt@[email protected]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@[email protected]

* igt@kms_pipe_crc_basic@hang-read-crc@pipe-a-dp-3:
- bat-dg2-oem2: [INCOMPLETE][8] ([Intel XE#282] / [Intel XE#545]) -> [PASS][9]
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]

#### Warnings ####

* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [DMESG-FAIL][10] ([Intel XE#282] / [i915#2017]) -> [FAIL][11] ([Intel XE#616] / [Intel XE#750])
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-adlp-7/igt@[email protected]
[11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-adlp-7/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12:
- bat-dg2-oem2: [TIMEOUT][12] ([Intel XE#430] / [Intel XE#530]) -> [FAIL][13] ([Intel XE#400] / [Intel XE#616])
[12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-dg2-oem2/igt@[email protected]
[13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@[email protected]

* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-nv12@pipe-b-dp-3:
- bat-dg2-oem2: [TIMEOUT][14] ([Intel XE#530]) -> [FAIL][15] ([Intel XE#400] / [Intel XE#616])
[14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7587/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]
[15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/bat-dg2-oem2/igt@kms_pipe_crc_basic@[email protected]

{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).

[Intel XE#282]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/282
[Intel XE#288]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/288
[Intel XE#400]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/400
[Intel XE#430]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/430
[Intel XE#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#530]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/530
[Intel XE#535]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/535
[Intel XE#545]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/545
[Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
[Intel XE#749]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/749
[Intel XE#750]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/750
[i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017

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

* IGT: IGT_7587 -> IGTPW_10184

IGTPW_10184: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10184/index.html
IGT_7587: bec435c24d23524d55f419a02af375e84c9be9d3 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
xe-488-7dc3dda9b2df5a5c8949532f254a0689de70f093: 7dc3dda9b2df5a5c8949532f254a0689de70f093

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10184/index.html

#4 lore raw
In reply to [email protected]

Hi sai.gowtham.ch,

Quoted 5 lines · On 2023-11-14 at 17:58:10 +0530, [email protected] wrote:

From: Sai Gowtham Ch <[email protected]>

Add Negative tests for get exec_queue property ioctl.

Thank you for patch, did you address Rahul comment?

Regards,
Kamil

Quoted 109 lines
---
 tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
 1 file changed, 76 insertions(+), 1 deletion(-)
tests/intel/xe_exec_queue_property.c +76 -1
index 4e32aefa5..5278304be 100644
@@ -4,7 +4,7 @@
  */
 
 /**
- * TEST: Basic tests to check exec_queue set property functionality
+ * TEST: Basic tests to check exec_queue set/get property functionality
  * Category: Software building block
  * Sub-category: exec queue property
  * Functionality: exec queue set property
@@ -108,6 +108,72 @@ static void test_property_min_max(int xe, int engine, const char **property)
 	test_set_property(xe, property_name, min - 1, -EINVAL);
 }
 
+/**
+ * SUBTEST: Invalid-exec-queue
+ * Description: Negative test to check the expected behaviour with invalid exec_queue_id.
+ * Test category: functionality test
+ */
+static void Invalid_exec_queue_id(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.exec_queue_id = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, ENOENT);
+}
+
+/**
+ * SUBTEST: non-zero-reserved
+ * Description: Negative test to check the expected behaviour with non-zero reserved.
+ * Test category: functionality test
+ */
+static void non_zero_reserved(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.reserved[0] = 0xffff,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+	uint32_t vm;
+	uint32_t exec_queue;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm, DRM_XE_ENGINE_CLASS_COPY);
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, EINVAL);
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
+/**
+ * SUBTEST: invalid-value
+ * Description: Check if get property value works fine.
+ * Test category: functionality test
+ */
+static void invalid_value(int xe)
+{
+	struct drm_xe_exec_queue_get_property args = {
+		.value = -1,
+		.reserved[0] = 0,
+		.property = XE_EXEC_QUEUE_GET_PROPERTY_BAN,
+	};
+
+	uint32_t exec_queue;
+	uint32_t vm;
+
+	vm = xe_vm_create(xe, 0, 0);
+	exec_queue = xe_exec_queue_create_class(xe, vm, DRM_XE_ENGINE_CLASS_COPY);
+	args.exec_queue_id = exec_queue;
+
+	do_ioctl(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args);
+	igt_assert(args.value == 0);
+
+	xe_exec_queue_destroy(xe, exec_queue);
+	xe_vm_destroy(xe, vm);
+}
+
 igt_main
 {
 	static const struct {
@@ -182,6 +248,15 @@ igt_main
 		}
 	}
 
+	igt_subtest("Invalid-exec-queue")
+		Invalid_exec_queue_id(xe);
+
+	igt_subtest("non-zero-reserved")
+		non_zero_reserved(xe);
+
+	igt_subtest("invalid-value")
+		invalid_value(xe);
+
 	igt_fixture {
 		xe_device_put(xe);
 		drm_close_driver(xe);
Signature · 1 line
2.39.1