Re: [PATCH 4/5] tests/intel/xe_exec_multi_queue: fix expected error for parallel queue creation

Wang, X
2026-04-03T07:00:24Z

On 4/2/2026 20:22, Niranjana Vishwanathapura wrote:
> On Thu, Apr 02, 2026 at 06:40:39PM -0700, Xin Wang wrote:
>> Multi-LRC capable engine classes (vcs, vecs) are able to process the
>> multi-queue create request and reject it with -EINVAL when
>> num_placements
>> is greater than 1.  Engine classes that do not support multi-LRC cannot
>> form a parallel queue at all and return -EOPNOTSUPP instead.
>>
>> Use xe_engine_class_supports_multi_lrc() to pick the correct expected
>> error code rather than hard-coding -EINVAL for every engine class.
>>
>> Signed-off-by: Xin Wang <x.wang@intel.com>
>> ---
>> tests/intel/xe_exec_multi_queue.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/intel/xe_exec_multi_queue.c
>> b/tests/intel/xe_exec_multi_queue.c
>> index b5ded0633..dca791fb5 100644
>> --- a/tests/intel/xe_exec_multi_queue.c
>> +++ b/tests/intel/xe_exec_multi_queue.c
>> @@ -113,7 +113,8 @@ __test_sanity(int fd, int gt, int class, bool
>> preempt_mode)
>>     /* Multi-Queue can't be a parallel queue */
>>     multi_queue.value = DRM_XE_MULTI_GROUP_CREATE;
>>     if (n > 1)
>> -        igt_assert_eq(__xe_exec_queue_create(fd, vm, 2, 1, eci, ext,
>> &val), -EINVAL);
>> +        igt_assert_eq(__xe_exec_queue_create(fd, vm, 2, 1, eci, ext,
>> &val),
>> +                  xe_engine_class_supports_multi_lrc(fd, class) ?
>> -EINVAL : -EOPNOTSUPP);
>
> We don't want to validate multi-lrc error handling here. We only want
> to validate
> multi-queue error handling. So, I think below would be appropriate.
>
> if (n > 1 && xe_engine_class_supports_multi_lrc(fd, class))
>      igt_assert_eq(__xe_exec_queue_create(fd, vm, 2, 1, eci, ext,
> &val), -EINVAL);
>
Good point. I will merge this change to patch 5 in this series.

Thanks,

Xin

> And change commit text saying that we are ensuring validating with
> parallel
> queues only when the engine class supports it.
>
> Thanks,
> Niranjana
>
>>
>>     /* Specifying multiple MULTI_GROUP property is invalid */
>>     multi_queue.base.next_extension = to_user_pointer(&multi_queue);
>> --
>> 2.43.0
>>