Skip to contentSkip to conversation

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

PATCH New [email protected] 2 participants 2 messages Nov 10, 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 | 36 +++++++++++++++++++++++++++-
 1 file changed, 35 insertions(+), 1 deletion(-)
tests/intel/xe_exec_queue_property.c +35 -1
index 4e32aefa5..40546da03 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,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);
Signature · 1 line
2.39.1
#1 lore raw

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

== Series Details ==

== Series Details ==

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

== Summary ==

IGT patchset build failed on latest successful build
453b9df12fbc9fff561bdb4eb97992983e74c3d4 tests/intel/xe_exec_queue_property: Add scheduler exec queue set property

Tail of build.log:
[1610/1657] Linking target tools/intel_gvtg_test.
[1611/1657] Linking target tools/intel_dp_compliance.
[1612/1657] Linking target tools/intel_residency.
[1613/1657] Linking target runner/testdata/skippers.
[1614/1657] Linking target runner/testdata/successtest.
[1615/1657] Linking target tools/intel_reg_checker.
[1616/1657] Linking target tools/amd_hdmi_compliance.
[1617/1657] Linking target tools/intel_watermark.
[1618/1657] Linking target runner/testdata/abort-simple.
[1619/1657] Linking target runner/igt_runner.
[1620/1657] Linking target tools/intel_vbt_decode.
[1621/1657] Linking target runner/testdata/dynamic.
[1622/1657] Linking target tools/intel_reg.
[1623/1657] Linking target runner/igt_results.
[1624/1657] Linking target runner/testdata/abort-fixture.
[1625/1657] Linking target runner/testdata/abort.
[1626/1657] Linking target tools/lsgpu.
[1627/1657] Generating gem_stress.testlist with a meson_exe.py custom command.
[1628/1657] Linking target runner/testdata/no-subtests.
[1629/1657] Linking target runner/runner_json_test.
[1630/1657] Linking target runner/igt_comms_decoder.
[1631/1657] Linking target tools/intel_l3_parity.
[1632/1657] Linking target tools/msm_dp_compliance.
[1633/1657] Linking target runner/igt_resume.
[1634/1657] Linking target runner/testdata/abort-dynamic.
[1635/1657] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt1.c.o'.
[1636/1657] Compiling C object 'runner/527aa9f@@runner_test@exe/runner_tests.c.o'.
[1637/1657] Linking target runner/runner_test.
[1638/1657] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt2.c.o'.
[1639/1657] Compiling C object 'lib/76b5a35@@i915_perf@sha/meson-generated_.._i915_perf_metrics_acmgt3.c.o'.
[1640/1657] Linking target lib/libi915_perf.so.1.5.
[1641/1657] Generating symbol file 'lib/76b5a35@@i915_perf@sha/libi915_perf.so.1.5.symbols'.
[1642/1657] Linking target tools/i915-perf/i915-perf-configs.
[1643/1657] Linking target tools/i915-perf/i915-perf-recorder.
[1644/1657] Linking target tools/i915-perf/i915-perf-reader.
[1645/1657] Linking target tests/gem_barrier_race.
[1646/1657] Linking target tests/perf.
[1647/1657] Linking target tests/core_hotunplug.
[1648/1657] Generating gem_barrier_race.testlist with a meson_exe.py custom command.
[1649/1657] Generating core_hotunplug.testlist with a meson_exe.py custom command.
[1650/1657] Generating perf.testlist with a meson_exe.py custom command.
[1651/1657] Generating xe_tests.rst with a custom command.
FAILED: docs/testplan/xe_tests.rst
/usr/src/igt-gpu-tools/scripts/igt_doc.py --config /usr/src/igt-gpu-tools/tests/intel/xe_test_config.json --rest docs/testplan/xe_tests.rst --check-testlist --igt-build-path /opt/igt/build
Warning: Documented igt@xe_exec_queue_property@Invalid_exec_queue doesn't exist on source files
Warning: Missing documentation for igt@xe_exec_queue_property@Invalid-exec-queue
Please refer: docs/test_documentation.md for more details
[1652/1657] Generating i915_tests.rst with a custom command.
[1653/1657] Generating kms_tests.rst with a custom command.
ninja: build stopped: subcommand failed.