[PATCH 5/5] tests/intel: skip multi-LRC tests for engine classes that do not support it

Xin Wang
2026-04-03T01:41:23Z

xe_engine_class_supports_multi_lrc() now queries the kernel-reported
capability via debugfs. Guard the balancer and multi-LRC codepaths in
xe_exec_balancer, xe_exec_reset, xe_exec_threads and xe_drm_fdinfo with
this check so that tests are skipped rather than failing on engine
classes whose hardware does not support multi-LRC submission.

Signed-off-by: Xin Wang <x.wang@intel.com>
---
tests/intel/xe_drm_fdinfo.c | 2 +-
tests/intel/xe_exec_balancer.c | 6 +++---
tests/intel/xe_exec_reset.c | 2 +-
tests/intel/xe_exec_threads.c | 1 +
4 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/intel/xe_drm_fdinfo.c b/tests/intel/xe_drm_fdinfo.c
index 411ca6ec4..3c113ed5d 100644
--- a/tests/intel/xe_drm_fdinfo.c
+++ b/tests/intel/xe_drm_fdinfo.c
@@ -673,7 +673,7 @@ utilization_multi(int fd, int gt, int class, unsigned int flags)
igt_assert(virtual ^ parallel);

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
- if (num_placements < 2)
+ if (num_placements < 2 || !xe_engine_class_supports_multi_lrc(fd, class))
return;

igt_debug("Target class: %s\n", engine_map[class]);
diff --git a/tests/intel/xe_exec_balancer.c b/tests/intel/xe_exec_balancer.c
index 9cd641b4e..3c6ec45f1 100644
--- a/tests/intel/xe_exec_balancer.c
+++ b/tests/intel/xe_exec_balancer.c
@@ -57,7 +57,7 @@ static bool test_all_active(int fd, int gt, int class)
int i, num_placements;

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
- if (num_placements < 2)
+ if (num_placements < 2 || !xe_engine_class_supports_multi_lrc(fd, class))
return false;

vm = xe_vm_create(fd, 0, 0);
@@ -187,7 +187,7 @@ test_exec(int fd, int gt, int class, int n_exec_queues, int n_execs,
igt_assert_lte(n_exec_queues, MAX_N_EXEC_QUEUES);

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
- if (num_placements < 2)
+ if (num_placements < 2 || !xe_engine_class_supports_multi_lrc(fd, class))
return false;

vm = xe_vm_create(fd, 0, 0);
@@ -402,7 +402,7 @@ test_cm(int fd, int gt, int class, int n_exec_queues, int n_execs,
igt_assert_lte(n_exec_queues, MAX_N_EXEC_QUEUES);

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
- if (num_placements < 2)
+ if (num_placements < 2 || !xe_engine_class_supports_multi_lrc(fd, class))
return false;

vm = xe_vm_create(fd, DRM_XE_VM_CREATE_FLAG_LR_MODE, 0);
diff --git a/tests/intel/xe_exec_reset.c b/tests/intel/xe_exec_reset.c
index 7aaee31dd..95191139d 100644
--- a/tests/intel/xe_exec_reset.c
+++ b/tests/intel/xe_exec_reset.c
@@ -184,7 +184,7 @@ test_balancer(int fd, int gt, int class, int n_exec_queues, int n_execs,
fd = drm_open_driver(DRIVER_XE);

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
- if (num_placements < 2)
+ if (num_placements < 2 || !xe_engine_class_supports_multi_lrc(fd, class))
return;

vm = xe_vm_create(fd, 0, 0);
diff --git a/tests/intel/xe_exec_threads.c b/tests/intel/xe_exec_threads.c
index ab9565beb..7b8100c5b 100644
--- a/tests/intel/xe_exec_threads.c
+++ b/tests/intel/xe_exec_threads.c
@@ -85,6 +85,7 @@ test_balancer(int fd, int gt, uint32_t vm, uint64_t addr, uint64_t userptr,

num_placements = xe_gt_fill_engines_by_class(fd, gt, class, eci);
igt_assert_lt(1, num_placements);
+ igt_assert(xe_engine_class_supports_multi_lrc(fd, class));

bo_size = sizeof(*data) * n_execs;
bo_size = xe_bb_size(fd, bo_size);
--
2.43.0