Skip to contentSkip to conversation

tests/intel/xe_exec_system_allocator: Limit driver debug logs in CI runs

PATCH In review [email protected] 2 participants 2 messages Nov 19

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/intel/xe_exec_system_allocator: Limit driver debug logs in CI runs

From: Nishit Sharma <[email protected]>

The subtests involved migration generates a DRM_UT_DRIVER debug message for each migrated chunk, exceeding the CI runner's log-size limit on large-VRAM devices.

Call xe_drop_driver_debug_if_ci() from the test fixture so that, under CI, DRM_UT_DRIVER is cleared from the DRM debug mask for the duration of the test. The other debug categories are preserved and the original mask is restored on exit.

---
 tests/intel/xe_exec_system_allocator.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tests/intel/xe_exec_system_allocator.c +14 -0
index e3e8339c4..fb0c0af16 100644
@@ -17,6 +17,7 @@
 #include <time.h>
 
 #include "igt.h"
+#include "igt_sysfs.h"
 #include "intel_pat.h"
 #include "lib/igt_syncobj.h"
 #include "lib/intel_compute.h"
@@ -2668,6 +2669,7 @@ int igt_main()
 
 	igt_fixture() {
 		struct xe_device *xe;
+		int dir;
 
 		fd = drm_open_driver(DRIVER_XE);
 		igt_require(!xe_supports_faults(fd));
@@ -2689,6 +2691,18 @@ int igt_main()
 				  num_pat_entries);
 			num_pat_entries = 0;
 		}
+
+		dir = igt_sysfs_drm_module_params_open();
+		if (dir >= 0) {
+			int debug_mask = igt_drm_debug_mask_get(dir);
+			unsigned int mask_to_set = DRM_UT_DRIVER;
+
+			close(dir);
+			if (debug_mask > 0 && (debug_mask & mask_to_set)) {
+				igt_install_exit_handler(igt_drm_debug_mask_reset_exit_handler);
+				update_debug_mask_if_ci(debug_mask & ~mask_to_set);
+			}
+		}
 	}
 
 	for (const struct section *s = sections; s->name; s++) {
Signature · 1 line
2.43.0
#1 lore raw

Hi nishit.sharma,

Quoted 10 lines · On 2026-11-19 at 13:15:56 +0000, [email protected] wrote:

From: Nishit Sharma <[email protected]>

The subtests involved migration generates a DRM_UT_DRIVER debug message for each migrated chunk, exceeding the CI runner's log-size limit on large-VRAM devices.

Call xe_drop_driver_debug_if_ci() from the test fixture so that, under CI, DRM_UT_DRIVER is cleared from the DRM debug mask for the duration of the test. The other debug categories are preserved and the original mask is restored on exit.

Please drop 2nd paragraph from above, basically, do not write C-code-into-english. imho better:

Under CI run clear DRM_UT_DRIVER bit from the DRM debug mask for the duration of the test.

Quoted 27 lines
---
 tests/intel/xe_exec_system_allocator.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
tests/intel/xe_exec_system_allocator.c +2 -0
index e3e8339c4..fb0c0af16 100644
@@ -17,6 +17,7 @@
 #include <time.h>
 
 #include "igt.h"
+#include "igt_sysfs.h"
 #include "intel_pat.h"
 #include "lib/igt_syncobj.h"
 #include "lib/intel_compute.h"
@@ -2668,6 +2669,7 @@ int igt_main()
 
 	igt_fixture() {
 		struct xe_device *xe;
+		int dir;
 
 		fd = drm_open_driver(DRIVER_XE);
 		igt_require(!xe_supports_faults(fd));

tests/intel/xe_exec_system_allocator.c int igt_main() · line 2698

Quoted 8 lines
tests/intel/xe_exec_system_allocator.c +5 -0
@@ -2689,6 +2691,18 @@ int igt_main()
 				  num_pat_entries);
 			num_pat_entries = 0;
 		}
+
+		dir = igt_sysfs_drm_module_params_open();
+		if (dir >= 0) {
+			int debug_mask = igt_drm_debug_mask_get(dir);
+			unsigned int mask_to_set = DRM_UT_DRIVER;

s/mask_to_set/bit_to_clear/

With that it looks good.

Regards,
Kamil

Quoted 13 lines
tests/intel/xe_exec_system_allocator.c +7 -0
+
+			close(dir);
+			if (debug_mask > 0 && (debug_mask & mask_to_set)) {
+				igt_install_exit_handler(igt_drm_debug_mask_reset_exit_handler);
+				update_debug_mask_if_ci(debug_mask & ~mask_to_set);
+			}
+		}
 	}
 
 	for (const struct section *s = sections; s->name; s++) {
Signature · 1 line
2.43.0