Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests
@ 2023-11-08  9:16 janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 1/3] tests/intel/xe_waitfence: Add invalid-flag subtest janga.rahul.kumar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: janga.rahul.kumar @ 2023-11-08  9:16 UTC (permalink / raw)
  To: igt-dev, ramadevi.gandi, janga.rahul.kumar

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Negative tests to check XE_WAIT_USER_FENCE ioctl.

Janga Rahul Kumar (3):
  tests/intel/xe_waitfence: Add invalid-flag subtest
  tests/intel/xe_waitfence: Add invalid-ops subtest
  tests/intel/xe_waitfence: Add invalid-engine subtest

 tests/intel/xe_waitfence.c | 114 +++++++++++++++++++++++++++++++++++++
 1 file changed, 114 insertions(+)

-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 1/3] tests/intel/xe_waitfence: Add invalid-flag subtest
  2023-11-08  9:16 [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests janga.rahul.kumar
@ 2023-11-08  9:16 ` janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/intel/xe_waitfence: Add invalid-ops subtest janga.rahul.kumar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: janga.rahul.kumar @ 2023-11-08  9:16 UTC (permalink / raw)
  To: igt-dev, ramadevi.gandi, janga.rahul.kumar

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Negative test to check ioctl returns expected error when invalid
flag param is used.

Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
 tests/intel/xe_waitfence.c | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/tests/intel/xe_waitfence.c b/tests/intel/xe_waitfence.c
index e0116f181..32ffc6eca 100644
--- a/tests/intel/xe_waitfence.c
+++ b/tests/intel/xe_waitfence.c
@@ -98,6 +98,43 @@ waitfence(int fd, enum waittype wt)
 	}
 }
 
+/**
+ * TEST: Negative test for wait ufence ioctl
+ * Category: Software building block
+ * Sub-category: waitfence
+ * Functionality: waitfence
+ * Run type: FULL
+ * Test category: negative test
+ *
+ * SUBTEST: invalid-flag
+ * Description: Check query with invalid flag returns expected error code
+ */
+
+static void
+invalid_flag(int fd)
+{
+	uint32_t bo;
+
+	struct drm_xe_wait_user_fence wait = {
+		.addr = to_user_pointer(&wait_fence),
+		.op = DRM_XE_UFENCE_WAIT_EQ,
+		.flags = -1,
+		.value = 1,
+		.mask = DRM_XE_UFENCE_WAIT_U64,
+		.timeout = -1,
+		.num_engines = 0,
+		.instances = 0,
+	};
+
+	uint32_t vm = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_DEFAULT, 0);
+
+	bo = xe_bo_create_flags(fd, vm, 0x40000, MY_FLAG);
+
+	do_bind(fd, vm, bo, 0, 0x200000, 0x40000, 1);
+
+	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EINVAL);
+}
+
 igt_main
 {
 	int fd;
@@ -111,6 +148,9 @@ igt_main
 	igt_subtest("abstime")
 		waitfence(fd, ABSTIME);
 
+	igt_subtest("invalid-flag")
+		invalid_flag(fd);
+
 	igt_fixture
 		drm_close_driver(fd);
 }
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 2/3] tests/intel/xe_waitfence: Add invalid-ops subtest
  2023-11-08  9:16 [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 1/3] tests/intel/xe_waitfence: Add invalid-flag subtest janga.rahul.kumar
@ 2023-11-08  9:16 ` janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/intel/xe_waitfence: Add invalid-engine subtest janga.rahul.kumar
  2023-11-08  9:44 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add wait fence Negative tests Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: janga.rahul.kumar @ 2023-11-08  9:16 UTC (permalink / raw)
  To: igt-dev, ramadevi.gandi, janga.rahul.kumar

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Negative test to check ioctl returns expected error when
invalid ops param is used.

Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
 tests/intel/xe_waitfence.c | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/tests/intel/xe_waitfence.c b/tests/intel/xe_waitfence.c
index 32ffc6eca..87e7b2284 100644
--- a/tests/intel/xe_waitfence.c
+++ b/tests/intel/xe_waitfence.c
@@ -108,6 +108,9 @@ waitfence(int fd, enum waittype wt)
  *
  * SUBTEST: invalid-flag
  * Description: Check query with invalid flag returns expected error code
+ *
+ * SUBTEST: invalid-ops
+ * Description: Check query with invalid engine info returns expected error code
  */
 
 static void
@@ -135,6 +138,32 @@ invalid_flag(int fd)
 	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EINVAL);
 }
 
+static void
+invalid_ops(int fd)
+{
+	uint32_t bo;
+
+	struct drm_xe_wait_user_fence wait = {
+		.addr = to_user_pointer(&wait_fence),
+		.op = -1,
+		.flags = 0,
+		.value = 1,
+		.mask = DRM_XE_UFENCE_WAIT_U64,
+		.timeout = 1,
+		.num_engines = 0,
+		.instances = 0,
+	};
+
+	uint32_t vm = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_DEFAULT, 0);
+
+	bo = xe_bo_create_flags(fd, vm, 0x40000, MY_FLAG);
+
+	do_bind(fd, vm, bo, 0, 0x200000, 0x40000, 1);
+
+	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EINVAL);
+}
+
+
 igt_main
 {
 	int fd;
@@ -151,6 +180,9 @@ igt_main
 	igt_subtest("invalid-flag")
 		invalid_flag(fd);
 
+	igt_subtest("invalid-ops")
+		invalid_ops(fd);
+
 	igt_fixture
 		drm_close_driver(fd);
 }
-- 
2.25.1

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

* [igt-dev] [PATCH i-g-t 3/3] tests/intel/xe_waitfence: Add invalid-engine subtest
  2023-11-08  9:16 [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 1/3] tests/intel/xe_waitfence: Add invalid-flag subtest janga.rahul.kumar
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/intel/xe_waitfence: Add invalid-ops subtest janga.rahul.kumar
@ 2023-11-08  9:16 ` janga.rahul.kumar
  2023-11-08  9:44 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add wait fence Negative tests Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: janga.rahul.kumar @ 2023-11-08  9:16 UTC (permalink / raw)
  To: igt-dev, ramadevi.gandi, janga.rahul.kumar

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Negative test to check ioctl returns expected error when
invalid enigne is used.

Signed-off-by: Janga Rahul Kumar <janga.rahul.kumar@intel.com>
---
 tests/intel/xe_waitfence.c | 42 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/tests/intel/xe_waitfence.c b/tests/intel/xe_waitfence.c
index 87e7b2284..71616c7ef 100644
--- a/tests/intel/xe_waitfence.c
+++ b/tests/intel/xe_waitfence.c
@@ -111,6 +111,9 @@ waitfence(int fd, enum waittype wt)
  *
  * SUBTEST: invalid-ops
  * Description: Check query with invalid engine info returns expected error code
+ *
+ * SUBTEST: invalid-engine
+ * Description: Check query with invalid engine info returns expected error code
  */
 
 static void
@@ -163,6 +166,42 @@ invalid_ops(int fd)
 	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EINVAL);
 }
 
+static void
+invalid_engine(int fd)
+{
+	uint32_t bo;
+
+	struct drm_xe_wait_user_fence wait = {
+		.addr = to_user_pointer(&wait_fence),
+		.op = DRM_XE_UFENCE_WAIT_EQ,
+		.flags = 0,
+		.value = 1,
+		.mask = DRM_XE_UFENCE_WAIT_U64,
+		.timeout = -1,
+		.num_engines = 1,
+		.instances = 0,
+	};
+
+	uint32_t vm = xe_vm_create(fd, DRM_XE_VM_CREATE_ASYNC_DEFAULT, 0);
+
+	bo = xe_bo_create_flags(fd, vm, 0x40000, MY_FLAG);
+
+	do_bind(fd, vm, bo, 0, 0x200000, 0x40000, 1);
+
+	struct drm_xe_wait_user_fence wait = {
+		.addr = to_user_pointer(&wait_fence),
+		.op = DRM_XE_UFENCE_WAIT_EQ,
+		.flags = 0,
+		.value = 1,
+		.mask = DRM_XE_UFENCE_WAIT_U64,
+		.timeout = 1,
+		.num_engines = 1,
+		.instances = 0,
+	};
+
+	do_ioctl_err(fd, DRM_IOCTL_XE_WAIT_USER_FENCE, &wait, EFAULT);
+}
+
 
 igt_main
 {
@@ -183,6 +222,9 @@ igt_main
 	igt_subtest("invalid-ops")
 		invalid_ops(fd);
 
+	igt_subtest("invalid-engine")
+		invalid_engine(fd);
+
 	igt_fixture
 		drm_close_driver(fd);
 }
-- 
2.25.1

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

* [igt-dev] ✗ Fi.CI.BUILD: failure for Add wait fence Negative tests
  2023-11-08  9:16 [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests janga.rahul.kumar
                   ` (2 preceding siblings ...)
  2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/intel/xe_waitfence: Add invalid-engine subtest janga.rahul.kumar
@ 2023-11-08  9:44 ` Patchwork
  3 siblings, 0 replies; 6+ messages in thread
From: Patchwork @ 2023-11-08  9:44 UTC (permalink / raw)
  To: janga.rahul.kumar; +Cc: igt-dev

== Series Details ==

Series: Add wait fence Negative tests
URL   : https://patchwork.freedesktop.org/series/126126/
State : failure

== Summary ==

IGT patchset build failed on latest successful build
d529fa7368a622634a9842a99df155cd10570446 tests/kms_frontbuffer_tracking: Extend the test to enable FBC for each plane

Tail of build.log:
[633/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_label_bo@exe/vc4_label_bo.c.o'.
[634/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_mmap@exe/vc4_mmap.c.o'.
[635/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_dmabuf_poll@exe/vc4_dmabuf_poll.c.o'.
[636/1654] Compiling C object 'tests/59830eb@@kms_chamelium_frames@exe/chamelium_kms_chamelium_helper.c.o'.
[637/1654] Compiling C object 'tests/59830eb@@xe_exec_balancer@exe/intel_xe_exec_balancer.c.o'.
[638/1654] Compiling C object 'tests/v3d/cad21b8@@v3d_perfmon@exe/v3d_perfmon.c.o'.
[639/1654] Compiling C object 'tests/v3d/cad21b8@@v3d_job_submission@exe/v3d_job_submission.c.o'.
[640/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_create_bo@exe/vc4_create_bo.c.o'.
[641/1654] Compiling C object 'tests/59830eb@@xe_pm@exe/intel_xe_pm.c.o'.
[642/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_perfmon@exe/vc4_perfmon.c.o'.
[643/1654] Compiling C object 'tests/59830eb@@xe_query@exe/intel_xe_query.c.o'.
[644/1654] Compiling C object 'tests/v3d/cad21b8@@v3d_wait_bo@exe/v3d_wait_bo.c.o'.
[645/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_wait_bo@exe/vc4_wait_bo.c.o'.
[646/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_purgeable_bo@exe/vc4_purgeable_bo.c.o'.
[647/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_wait_seqno@exe/vc4_wait_seqno.c.o'.
[648/1654] Compiling C object 'tests/vc4/e4667e8@@vc4_tiling@exe/vc4_tiling.c.o'.
[649/1654] Compiling C object 'tests/59830eb@@xe_evict@exe/intel_xe_evict.c.o'.
[650/1654] Compiling C object 'tests/v3d/cad21b8@@v3d_submit_csd@exe/v3d_submit_csd.c.o'.
[651/1654] Compiling C object 'tests/59830eb@@xe_exec_reset@exe/intel_xe_exec_reset.c.o'.
[652/1654] Compiling C object 'tests/vmwgfx/776e741@@vmw_mob_stress@exe/vmw_mob_stress.c.o'.
[653/1654] Compiling C object 'tests/vmwgfx/776e741@@vmw_tri@exe/vmw_tri.c.o'.
[654/1654] Compiling C object 'tests/vmwgfx/776e741@@vmw_execution_buffer@exe/vmw_execution_buffer.c.o'.
[655/1654] Compiling C object 'tests/59830eb@@kms_chamelium_hpd@exe/chamelium_kms_chamelium_hpd.c.o'.
[656/1654] Compiling C object 'tests/59830eb@@i915_query@exe/intel_i915_query.c.o'.
[657/1654] Compiling C object 'tests/vmwgfx/776e741@@vmw_surface_copy@exe/vmw_surface_copy.c.o'.
[658/1654] Compiling C object 'tests/vmwgfx/776e741@@vmw_ref_count@exe/vmw_ref_count.c.o'.
[659/1654] Compiling C object 'benchmarks/cb1d2fd@@gem_busy@exe/gem_busy.c.o'.
[660/1654] Compiling C object 'tests/59830eb@@kms_chamelium_audio@exe/chamelium_kms_chamelium_audio.c.o'.
[661/1654] Compiling C object 'benchmarks/cb1d2fd@@gem_blt@exe/gem_blt.c.o'.
[662/1654] Compiling C object 'tests/v3d/cad21b8@@v3d_submit_cl@exe/v3d_submit_cl.c.o'.
[663/1654] Compiling C object 'tests/59830eb@@kms_chamelium_color@exe/chamelium_kms_chamelium_color.c.o'.
[664/1654] Compiling C object 'tests/59830eb@@kms_chamelium_edid@exe/chamelium_kms_chamelium_edid.c.o'.
[665/1654] Compiling C object 'tests/59830eb@@kms_psr2_sf@exe/intel_kms_psr2_sf.c.o'.
[666/1654] Compiling C object 'tests/59830eb@@kms_pm_rpm@exe/intel_kms_pm_rpm.c.o'.
[667/1654] Compiling C object 'tests/59830eb@@xe_intel_bb@exe/intel_xe_intel_bb.c.o'.
[668/1654] Compiling C object 'tests/59830eb@@kms_chamelium_frames@exe/chamelium_kms_chamelium_frames.c.o'.
[669/1654] Generating i915-perf-equations with a custom command.
[670/1654] Compiling C object 'tests/59830eb@@xe_exec_threads@exe/intel_xe_exec_threads.c.o'.
[671/1654] Compiling C object 'tests/59830eb@@gem_exec_balancer@exe/intel_gem_exec_balancer.c.o'.
[672/1654] Compiling C object 'tests/59830eb@@gem_stress@exe/intel_gem_stress.c.o'.
[673/1654] Compiling C object 'tests/59830eb@@xe_vm@exe/intel_xe_vm.c.o'.
[674/1654] Compiling C object 'tests/59830eb@@gem_exec_fence@exe/intel_gem_exec_fence.c.o'.
[675/1654] Compiling C object 'tests/59830eb@@gem_userptr_blits@exe/intel_gem_userptr_blits.c.o'.
[676/1654] Compiling C object 'tests/59830eb@@kms_frontbuffer_tracking@exe/intel_kms_frontbuffer_tracking.c.o'.
[677/1654] Compiling C object 'tests/59830eb@@gem_concurrent_all@exe/intel_gem_concurrent_all.c.o'.
[678/1654] Compiling C object 'tests/59830eb@@perf_pmu@exe/intel_perf_pmu.c.o'.
[679/1654] Compiling C object 'tests/59830eb@@perf@exe/intel_perf.c.o'.
[680/1654] Compiling C object 'tests/59830eb@@gem_exec_schedule@exe/intel_gem_exec_schedule.c.o'.
[681/1654] Linking target lib/libigt.so.0.
ninja: build stopped: subcommand failed.


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

* [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests
@ 2023-11-08 11:22 janga.rahul.kumar
  0 siblings, 0 replies; 6+ messages in thread
From: janga.rahul.kumar @ 2023-11-08 11:22 UTC (permalink / raw)
  To: igt-dev, ramadevi.gandi, janga.rahul.kumar

From: Janga Rahul Kumar <janga.rahul.kumar@intel.com>

Negative tests to check XE_WAIT_USER_FENCE ioctl.

Janga Rahul Kumar (3):
  tests/intel/xe_waitfence: Add invalid-flag subtest
  tests/intel/xe_waitfence: Add invalid-ops subtest
  tests/intel/xe_waitfence: Add invalid-engine subtest

 tests/intel/xe_waitfence.c | 103 +++++++++++++++++++++++++++++++++++++
 1 file changed, 103 insertions(+)

-- 
2.25.1

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

end of thread, other threads:[~2023-11-08 11:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-08  9:16 [igt-dev] [PATCH i-g-t 0/3] Add wait fence Negative tests janga.rahul.kumar
2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 1/3] tests/intel/xe_waitfence: Add invalid-flag subtest janga.rahul.kumar
2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 2/3] tests/intel/xe_waitfence: Add invalid-ops subtest janga.rahul.kumar
2023-11-08  9:16 ` [igt-dev] [PATCH i-g-t 3/3] tests/intel/xe_waitfence: Add invalid-engine subtest janga.rahul.kumar
2023-11-08  9:44 ` [igt-dev] ✗ Fi.CI.BUILD: failure for Add wait fence Negative tests Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2023-11-08 11:22 [igt-dev] [PATCH i-g-t 0/3] " janga.rahul.kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox