Skip to contentSkip to conversation

tests/xe_eudebug: refactor exec-queue-placements test

PATCH Superseded Jan Sokolowski 2 participants 2 messages Jan 16, 2025

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/xe_eudebug: refactor exec-queue-placements test

In some cases, ccs_mode_all_engines can fail, which will cause test fixture to not execute properly and put the rest of the tests in an unstable state. Also, ccs_mode_all_engines changes the state of the card for other tests as well, thus it should clean after itself too, which until now it didn't do.

Move the test to the end in the execution list and add a proper cleanup method, ccs_mode_restore;

---
 tests/intel/xe_eudebug.c | 46 ++++++++++++++++++++++++++++++----------
 1 file changed, 35 insertions(+), 11 deletions(-)
tests/intel/xe_eudebug.c +35 -11
index 91e9ae885..c93b55857 100644
@@ -2805,6 +2805,25 @@ static void ccs_mode_all_engines(int num_gt)
 	igt_require(num_gts_with_ccs_mode > 0);
 }
 
+static void ccs_mode_restore(int num_gt)
+{
+	int fd, gt, gt_fd, ccs_mode, num_slices;
+
+	for (gt = 0; gt < num_gt; gt++) {
+		fd = drm_open_driver(DRIVER_XE);
+		gt_fd = xe_sysfs_gt_open(fd, gt);
+		close(fd);
+
+		if (igt_sysfs_scanf(gt_fd, "num_cslices", "%u", &num_slices) <= 0)
+			continue;
+
+		igt_assert(igt_sysfs_printf(gt_fd, "ccs_mode", "%u", 1) > 0);
+		igt_assert(igt_sysfs_scanf(gt_fd, "ccs_mode", "%u", &ccs_mode) > 0);
+		igt_assert(ccs_mode == 1);
+		close(gt_fd);
+	}
+}
+
 igt_main
 {
 	bool was_enabled;
@@ -2919,17 +2938,6 @@ igt_main
 	igt_subtest("discovery-empty-clients")
 		test_empty_discovery(fd, DISCOVERY_DESTROY_RESOURCES, 16);
 
-	igt_subtest_group {
-		igt_fixture {
-			drm_close_driver(fd);
-			ccs_mode_all_engines(gt_count);
-			fd = drm_open_driver(DRIVER_XE);
-		}
-
-		igt_subtest("exec-queue-placements")
-			test_basic_sessions(fd, EXEC_QUEUES_PLACEMENTS, 1, true);
-	}
-
 	igt_fixture {
 		xe_eudebug_enable(fd, was_enabled);
 		drm_close_driver(fd);
@@ -2984,4 +2992,20 @@ igt_main
 			free(multigpu_was_enabled);
 		}
 	}
+
+	igt_subtest_group {
+		igt_fixture {
+			ccs_mode_all_engines(gt_count);
+		}
+
+		igt_subtest("exec-queue-placements") {
+			fd = drm_open_driver(DRIVER_XE);
+
+			test_basic_sessions(fd, EXEC_QUEUES_PLACEMENTS, 1, true);
+
+			ccs_mode_restore(gt_count);
+			drm_close_driver(fd);
+		}
+	}
+
 }
Signature · 1 line
2.34.1
#1 lore raw

✗ i915.CI.BAT: failure for series starting with [i-g-t,v1,1/1] tests/xe_eudebug: refactor exec-queue-placements test

== Series Details ==

== Series Details ==

Series: series starting with [i-g-t,v1,1/1] tests/xe_eudebug: refactor exec-queue-placements test
URL : https://patchwork.freedesktop.org/series/143606/
State : failure

== Summary ==

CI Bug Log - changes from IGT_8195 -> IGTPW_12448
====================================================

Summary
-------

**FAILURE**

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

If you think the reported changes have nothing to do with the changes
introduced in IGTPW_12448, 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_12448/index.html

Participating hosts (42 -> 40)
------------------------------

Missing (2): bat-atsm-1 fi-snb-2520m

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

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

### IGT changes ###

#### Possible regressions ####

* igt@i915_selftest@live@guc_hang:
- bat-arlh-2: [PASS][1] -> [INCOMPLETE][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-arlh-2/igt@i915_selftest@live@guc_hang.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-arlh-2/igt@i915_selftest@live@guc_hang.html

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

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

### IGT changes ###

#### Issues hit ####

* igt@dmabuf@all-tests:
- bat-apl-1: [PASS][3] -> [INCOMPLETE][4] ([i915#12904]) +1 other test incomplete
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-apl-1/igt@[email protected]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-apl-1/igt@[email protected]

* igt@i915_selftest@live:
- bat-mtlp-8: [PASS][5] -> [DMESG-FAIL][6] ([i915#12061]) +1 other test dmesg-fail
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-mtlp-8/igt@[email protected]
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-mtlp-8/igt@[email protected]
- bat-arlh-2: [PASS][7] -> [INCOMPLETE][8] ([i915#12445])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-arlh-2/igt@[email protected]
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-arlh-2/igt@[email protected]

* igt@i915_selftest@live@gt_lrc:
- bat-adlp-6: [PASS][9] -> [INCOMPLETE][10] ([i915#9413])
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-adlp-6/igt@i915_selftest@live@gt_lrc.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-adlp-6/igt@i915_selftest@live@gt_lrc.html

* igt@i915_selftest@live@workarounds:
- bat-arlh-3: [PASS][11] -> [DMESG-FAIL][12] ([i915#12061]) +1 other test dmesg-fail
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-arlh-3/igt@i915_selftest@[email protected]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-arlh-3/igt@i915_selftest@[email protected]
- bat-arls-5: [PASS][13] -> [DMESG-FAIL][14] ([i915#12061]) +1 other test dmesg-fail
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-arls-5/igt@i915_selftest@[email protected]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-arls-5/igt@i915_selftest@[email protected]

#### Possible fixes ####

* igt@i915_selftest@live@workarounds:
- bat-mtlp-6: [DMESG-FAIL][15] ([i915#12061]) -> [PASS][16] +1 other test pass
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-mtlp-6/igt@i915_selftest@[email protected]
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-mtlp-6/igt@i915_selftest@[email protected]

#### Warnings ####

* igt@i915_selftest@live:
- bat-adlp-6: [ABORT][17] ([i915#13399]) -> [INCOMPLETE][18] ([i915#9413])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8195/bat-adlp-6/igt@[email protected]
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_12448/bat-adlp-6/igt@[email protected]

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

[i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
[i915#12445]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12445
[i915#12904]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12904
[i915#13399]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13399
[i915#13494]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/13494
[i915#9413]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/9413

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

* CI: CI-20190529 -> None
* IGT: IGT_8195 -> IGTPW_12448
* Linux: CI_DRM_15966 -> CI_DRM_15967

CI-20190529: 20190529
CI_DRM_15966: 2334d1179d652eb4032fcb0d8e6f53cbc6a1011c @ git://anongit.freedesktop.org/gfx-ci/linux
CI_DRM_15967: 50d15a728295807727a2642284d639fc71ecaa15 @ git://anongit.freedesktop.org/gfx-ci/linux
IGTPW_12448: 2fd03025a2eca2200fa611c818989a6f6b77295a @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
IGT_8195: 8195

== Logs ==

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