[igt-dev] [PATCH i-g-t] tests/intel/xe_exec_queue_property: Negative tests for get exec_queue property ioctl.
sai.gowtham.ch at intel.com
sai.gowtham.ch at intel.com
Fri Nov 10 11:07:59 UTC 2023
From: Sai Gowtham Ch <sai.gowtham.ch at intel.com>
Add Negative tests for get exec_queue property ioctl.
Signed-off-by: Sai Gowtham Ch <sai.gowtham.ch at 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
More information about the igt-dev
mailing list