[igt-dev] [PATCH i-g-t] i915/gem_ringfill: Create dynamic subtest
Das, Nirmoy
nirmoy.das at intel.com
Thu Sep 29 16:57:13 UTC 2022
Hi Zbigniew,
On 9/29/2022 6:36 PM, Zbigniew Kempczyński wrote:
> On Thu, Sep 29, 2022 at 01:12:23PM +0200, Nirmoy Das wrote:
>> This will print engine name for each subtest which
>> might be useful for debugging a failure.
>>
>> Signed-off-by: Nirmoy Das <nirmoy.das at intel.com>
>> ---
>> tests/i915/gem_ringfill.c | 11 ++++++-----
>> 1 file changed, 6 insertions(+), 5 deletions(-)
>>
>> diff --git a/tests/i915/gem_ringfill.c b/tests/i915/gem_ringfill.c
>> index b68c5ae615..1e98ac8bb7 100644
>> --- a/tests/i915/gem_ringfill.c
>> +++ b/tests/i915/gem_ringfill.c
>> @@ -383,19 +383,20 @@ igt_main
>> }
>>
>> igt_describe("Basic check to fill the ring upto maximum on all engines simultaneously.");
>> - igt_subtest("basic-all") {
>> + igt_subtest_with_dynamic("basic-all") {
>> const struct intel_execution_engine2 *e;
>> intel_allocator_multiprocess_start();
>>
>> for_each_ctx_engine(fd, ctx, e) {
>> if (!gem_class_can_store_dword(fd, e->class))
>> continue;
>> -
>> - igt_fork(child, 1)
>> - run_test(fd, ctx, e->flags, 0, 1);
>> + igt_dynamic_f("%s", e->name) {
>> + igt_fork(child, 1)
>> + run_test(fd, ctx, e->flags, 0, 1);
>> + igt_waitchildren();
>> + }
>> }
>>
>> - igt_waitchildren();
>> intel_allocator_multiprocess_stop();
>> }
>>
>> --
>> 2.37.3
>>
> As you've already started changing code here please also add additional
> patch in which migrate intel_allocator_multiprocess_start() to first
> fixture and intel_allocator_multiprocess_stop() to the last one.
Chris pointed out that the change will make the test run serially each
engine and we don't want that.
I will make a patch to move intel_allocator_multiprocess_*().
Thanks,
Nirmoy
>
> With above change added:
>
> Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
>
> --
> Zbigniew
More information about the igt-dev
mailing list