* [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl.
@ 2023-11-10 11:07 sai.gowtham.ch
0 siblings, 0 replies; 7+ messages in thread
From: sai.gowtham.ch @ 2023-11-10 11:07 UTC (permalink / raw)
To: igt-dev, sai.gowtham.ch
From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
Add Negative tests for get exec_queue property ioctl.
Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
---
tests/intel/xe_exec_queue_property.c | 36 +++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
index 4e32aefa5..40546da03 100644
--- a/tests/intel/xe_exec_queue_property.c
+++ b/tests/intel/xe_exec_queue_property.c
@@ -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,34 @@ 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,
+ };
+
+ 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,
+ };
+
+ do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, EINVAL);
+}
+
igt_main
{
static const struct {
@@ -182,6 +210,12 @@ igt_main
}
}
+ igt_subtest("Invalid-exec-queue")
+ Invalid_exec_queue_id(xe);
+
+ igt_subtest("non-zero-reserved")
+ non_zero_reserved(xe);
+
igt_fixture {
xe_device_put(xe);
drm_close_driver(xe);
--
2.39.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
@ 2023-11-14 6:15 sai.gowtham.ch
2023-11-14 7:08 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-11-14 7:33 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
0 siblings, 2 replies; 7+ messages in thread
From: sai.gowtham.ch @ 2023-11-14 6:15 UTC (permalink / raw)
To: igt-dev, sai.gowtham.ch
From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
Add Negative tests for get exec_queue property ioctl.
Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
---
tests/intel/xe_exec_queue_property.c | 36 +++++++++++++++++++++++++++-
1 file changed, 35 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
index 4e32aefa5..bdd0648b9 100644
--- a/tests/intel/xe_exec_queue_property.c
+++ b/tests/intel/xe_exec_queue_property.c
@@ -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,34 @@ 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,
+ };
+
+ 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,
+ };
+
+ do_ioctl_err(xe, DRM_IOCTL_XE_EXEC_QUEUE_GET_PROPERTY, &args, EINVAL);
+}
+
igt_main
{
static const struct {
@@ -182,6 +210,12 @@ igt_main
}
}
+ igt_subtest("Invalid-exec-queue")
+ Invalid_exec_queue_id(xe);
+
+ igt_subtest("non-zero-reserved")
+ non_zero_reserved(xe);
+
igt_fixture {
xe_device_put(xe);
drm_close_driver(xe);
--
2.39.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [igt-dev] ✗ Fi.CI.BAT: failure for tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
2023-11-14 6:15 [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl sai.gowtham.ch
@ 2023-11-14 7:08 ` Patchwork
2023-11-14 7:33 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-11-14 7:08 UTC (permalink / raw)
To: sai.gowtham.ch; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 4470 bytes --]
== Series Details ==
Series: tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
URL : https://patchwork.freedesktop.org/series/126374/
State : failure
== Summary ==
CI Bug Log - changes from IGT_7585 -> IGTPW_10179
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with IGTPW_10179 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in IGTPW_10179, please notify your bug team (lgci.bug.filing@intel.com) 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_10179/index.html
Participating hosts (34 -> 34)
------------------------------
Additional (2): fi-kbl-soraka bat-kbl-2
Missing (2): fi-hsw-4770 fi-snb-2520m
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in IGTPW_10179:
### IGT changes ###
#### Possible regressions ####
* igt@i915_selftest@live@perf:
- fi-kbl-soraka: NOTRUN -> [ABORT][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/fi-kbl-soraka/igt@i915_selftest@live@perf.html
Known issues
------------
Here are the changes found in IGTPW_10179 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@fbdev@info:
- bat-kbl-2: NOTRUN -> [SKIP][2] ([fdo#109271] / [i915#1849])
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/bat-kbl-2/igt@fbdev@info.html
* igt@gem_huc_copy@huc-copy:
- fi-kbl-soraka: NOTRUN -> [SKIP][3] ([fdo#109271] / [i915#2190])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/fi-kbl-soraka/igt@gem_huc_copy@huc-copy.html
* igt@gem_lmem_swapping@basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][4] ([fdo#109271] / [i915#4613]) +3 other tests skip
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/fi-kbl-soraka/igt@gem_lmem_swapping@basic.html
* igt@gem_lmem_swapping@parallel-random-engines:
- bat-kbl-2: NOTRUN -> [SKIP][5] ([fdo#109271]) +24 other tests skip
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/bat-kbl-2/igt@gem_lmem_swapping@parallel-random-engines.html
* igt@i915_selftest@live@gt_pm:
- fi-kbl-soraka: NOTRUN -> [DMESG-FAIL][6] ([i915#1886])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/fi-kbl-soraka/igt@i915_selftest@live@gt_pm.html
* igt@kms_dsc@dsc-basic:
- fi-kbl-soraka: NOTRUN -> [SKIP][7] ([fdo#109271]) +9 other tests skip
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/fi-kbl-soraka/igt@kms_dsc@dsc-basic.html
* igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence:
- bat-adlp-9: NOTRUN -> [SKIP][8] ([i915#1845] / [i915#3546]) +2 other tests skip
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/bat-adlp-9/igt@kms_pipe_crc_basic@nonblocking-crc-frame-sequence.html
* igt@kms_pipe_crc_basic@read-crc-frame-sequence:
- bat-kbl-2: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#1845]) +14 other tests skip
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/bat-kbl-2/igt@kms_pipe_crc_basic@read-crc-frame-sequence.html
{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
[i915#1845]: https://gitlab.freedesktop.org/drm/intel/issues/1845
[i915#1849]: https://gitlab.freedesktop.org/drm/intel/issues/1849
[i915#1886]: https://gitlab.freedesktop.org/drm/intel/issues/1886
[i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190
[i915#3546]: https://gitlab.freedesktop.org/drm/intel/issues/3546
[i915#4613]: https://gitlab.freedesktop.org/drm/intel/issues/4613
Build changes
-------------
* CI: CI-20190529 -> None
* IGT: IGT_7585 -> IGTPW_10179
CI-20190529: 20190529
CI_DRM_13871: 811507c09ec3722450601b3642c47ab63830112b @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_10179: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/index.html
IGT_7585: 7585
Testlist changes
----------------
+igt@xe_exec_queue_property@invalid-exec-queue
+igt@xe_exec_queue_property@non-zero-reserved
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/index.html
[-- Attachment #2: Type: text/html, Size: 5706 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] ✓ CI.xeBAT: success for tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
2023-11-14 6:15 [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl sai.gowtham.ch
2023-11-14 7:08 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
@ 2023-11-14 7:33 ` Patchwork
1 sibling, 0 replies; 7+ messages in thread
From: Patchwork @ 2023-11-14 7:33 UTC (permalink / raw)
To: sai.gowtham.ch; +Cc: igt-dev
[-- Attachment #1: Type: text/plain, Size: 3562 bytes --]
== Series Details ==
Series: tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
URL : https://patchwork.freedesktop.org/series/126374/
State : success
== Summary ==
CI Bug Log - changes from XEIGT_7585_BAT -> XEIGTPW_10179_BAT
====================================================
Summary
-------
**SUCCESS**
No regressions found.
Participating hosts (3 -> 3)
------------------------------
No changes in participating hosts
Known issues
------------
Here are the changes found in XEIGTPW_10179_BAT that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1:
- bat-adlp-7: [PASS][1] -> [FAIL][2] ([Intel XE#480]) +1 other test fail
[1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
[2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@c-edp1.html
#### Possible fixes ####
* igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size:
- bat-dg2-oem2: [FAIL][3] ([i915#2346]) -> [PASS][4]
[3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html
[4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/bat-dg2-oem2/igt@kms_cursor_legacy@basic-flip-before-cursor-varying-size.html
* igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1:
- bat-adlp-7: [FAIL][5] ([Intel XE#480]) -> [PASS][6]
[5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1.html
[6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/bat-adlp-7/igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1.html
* {igt@xe_create@create-execqueues-noleak}:
- bat-adlp-7: [FAIL][7] ([Intel XE#524]) -> [PASS][8]
[7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@xe_create@create-execqueues-noleak.html
[8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/bat-adlp-7/igt@xe_create@create-execqueues-noleak.html
#### Warnings ####
* igt@kms_frontbuffer_tracking@basic:
- bat-adlp-7: [FAIL][9] ([Intel XE#616] / [Intel XE#750]) -> [DMESG-FAIL][10] ([Intel XE#282] / [i915#2017])
[9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_7585/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html
[10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/bat-adlp-7/igt@kms_frontbuffer_tracking@basic.html
{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#480]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/480
[Intel XE#524]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/524
[Intel XE#616]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/616
[Intel XE#750]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/750
[i915#2017]: https://gitlab.freedesktop.org/drm/intel/issues/2017
[i915#2346]: https://gitlab.freedesktop.org/drm/intel/issues/2346
Build changes
-------------
* IGT: IGT_7585 -> IGTPW_10179
IGTPW_10179: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_10179/index.html
IGT_7585: 7585
xe-488-7dc3dda9b2df5a5c8949532f254a0689de70f093: 7dc3dda9b2df5a5c8949532f254a0689de70f093
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_10179/index.html
[-- Attachment #2: Type: text/html, Size: 4302 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
@ 2023-11-14 12:28 sai.gowtham.ch
2023-11-14 15:50 ` Kumar, Janga Rahul
2023-11-15 10:24 ` Kamil Konieczny
0 siblings, 2 replies; 7+ messages in thread
From: sai.gowtham.ch @ 2023-11-14 12:28 UTC (permalink / raw)
To: igt-dev, sai.gowtham.ch
From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
Add Negative tests for get exec_queue property ioctl.
Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
---
tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
1 file changed, 76 insertions(+), 1 deletion(-)
diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
index 4e32aefa5..5278304be 100644
--- a/tests/intel/xe_exec_queue_property.c
+++ b/tests/intel/xe_exec_queue_property.c
@@ -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);
--
2.39.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
2023-11-14 12:28 [igt-dev] [PATCH i-g-t] " sai.gowtham.ch
@ 2023-11-14 15:50 ` Kumar, Janga Rahul
2023-11-15 10:24 ` Kamil Konieczny
1 sibling, 0 replies; 7+ messages in thread
From: Kumar, Janga Rahul @ 2023-11-14 15:50 UTC (permalink / raw)
To: Ch, Sai Gowtham, igt-dev@lists.freedesktop.org, Ch, Sai Gowtham
> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of
> sai.gowtham.ch@intel.com
> Sent: Tuesday, November 14, 2023 5:58 PM
> To: igt-dev@lists.freedesktop.org; Ch, Sai Gowtham
> <sai.gowtham.ch@intel.com>
> 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 <sai.gowtham.ch@intel.com>
>
> Add Negative tests for get exec_queue property ioctl.
>
> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
> ---
> tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
> 1 file changed, 76 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_exec_queue_property.c
> b/tests/intel/xe_exec_queue_property.c
> index 4e32aefa5..5278304be 100644
> --- a/tests/intel/xe_exec_queue_property.c
> +++ b/tests/intel/xe_exec_queue_property.c
> @@ -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
This looks like a basic test more than a negative test. Pls update the test name wherever required.
With that change,
Reviewed-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
> + * 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);
> --
> 2.39.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl
2023-11-14 12:28 [igt-dev] [PATCH i-g-t] " sai.gowtham.ch
2023-11-14 15:50 ` Kumar, Janga Rahul
@ 2023-11-15 10:24 ` Kamil Konieczny
1 sibling, 0 replies; 7+ messages in thread
From: Kamil Konieczny @ 2023-11-15 10:24 UTC (permalink / raw)
To: igt-dev
Hi sai.gowtham.ch,
On 2023-11-14 at 17:58:10 +0530, sai.gowtham.ch@intel.com wrote:
> From: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
>
> Add Negative tests for get exec_queue property ioctl.
>
> Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch@intel.com>
Thank you for patch, did you address Rahul comment?
Regards,
Kamil
> ---
> tests/intel/xe_exec_queue_property.c | 77 +++++++++++++++++++++++++++-
> 1 file changed, 76 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/xe_exec_queue_property.c b/tests/intel/xe_exec_queue_property.c
> index 4e32aefa5..5278304be 100644
> --- a/tests/intel/xe_exec_queue_property.c
> +++ b/tests/intel/xe_exec_queue_property.c
> @@ -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);
> --
> 2.39.1
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-11-15 10:24 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-14 6:15 [igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl sai.gowtham.ch
2023-11-14 7:08 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2023-11-14 7:33 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2023-11-14 12:28 [igt-dev] [PATCH i-g-t] " sai.gowtham.ch
2023-11-14 15:50 ` Kumar, Janga Rahul
2023-11-15 10:24 ` Kamil Konieczny
2023-11-10 11:07 sai.gowtham.ch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox