[igt-dev] [PATCH i-g-t 8/8] i915/gem_exec_basic: Use dynamic subtests

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Mon Nov 11 10:36:06 UTC 2019


On 11/11/2019 10:06, Petri Latvala wrote:
> On Fri, Nov 08, 2019 at 04:33:24PM +0000, Tvrtko Ursulin wrote:
>>
>> On 08/11/2019 16:31, Tvrtko Ursulin wrote:
>>>
>>> On 24/10/2019 12:05, Petri Latvala wrote:
>>>> Instead of generating a subtest for each engine in a static list,
>>>> convert to dynamic subtests, with one dynamic subtest per actually
>>>> present physical engine.
>>>>
>>>> Signed-off-by: Petri Latvala <petri.latvala at intel.com>
>>>> ---
>>>>    tests/i915/gem_exec_basic.c | 26 +++++++++++++++++++-------
>>>>    1 file changed, 19 insertions(+), 7 deletions(-)
>>>>
>>>> diff --git a/tests/i915/gem_exec_basic.c b/tests/i915/gem_exec_basic.c
>>>> index 1287860b..b2d6ddc2 100644
>>>> --- a/tests/i915/gem_exec_basic.c
>>>> +++ b/tests/i915/gem_exec_basic.c
>>>> @@ -159,13 +159,25 @@ igt_main
>>>>        igt_subtest("gtt-all")
>>>>            gtt_all(fd);
>>>> -    __for_each_physical_engine(fd, e) {
>>>> -        igt_subtest_f("basic-%s", e->name)
>>>> -            noop(fd, e->flags);
>>>> -        igt_subtest_f("readonly-%s", e->name)
>>>> -            readonly(fd, e->flags);
>>>> -        igt_subtest_f("gtt-%s", e->name)
>>>> -            gtt(fd, e->flags);
>>>> +    igt_subtest_with_dynamic_subsubtests("basic") {
>>>
>>> Bikeshed on the name maybe, since "subsub" reads a bit funny.
>>>
>>> igt_dynamic_subtest_group ?
>>
>> Assuming at least it can both nest under igt_subtest_group and not nest ie.
>> be at top-level? Do we need a nested version even?
> 
> It's a brother of igt_subtest, not a brother of
> igt_subtest_group. igt_subtest_with_dynamic_subsubtests() is, like
> igt_subtest(),
> 
>   * execution entry with --run-subtest
>   * enumerable with --list-subtests
>   * a block where you can touch the system inside it
>   * nests inside an igt_subtest_group and automatically produces a
>     'SKIP' if a fixture in that group triggered an igt_require
> 
> I'm all for bikeshedding on the name, but I want the closer
> association to igt_subtest to show. I like none of the names discussed
> so far all around the mailing list, I hate this current one the least
> so far. If it's all right, I'd like to land the series and start
> converting tests while the naming bikeshed (again, very welcome
> bikeshed) goes on simultaneously. It's a matter of a quick sed
> magickry later.

Fine with me.

Regards,

Tvrtko



More information about the igt-dev mailing list