[igt-dev] [PATCH i-g-t] tests/kms_getfb: Use fixtures and subtest groups

Daniel Vetter daniel.vetter at ffwll.ch
Thu Apr 5 08:44:49 UTC 2018


On Mon, Apr 2, 2018 at 7:13 PM, Antonio Argenziano
<antonio.argenziano at intel.com> wrote:
>
>
> On 02/04/18 06:02, Daniel Stone wrote:
>>
>> Hi Antonio,
>>
>> On 30 March 2018 at 22:01, Antonio Argenziano
>> <antonio.argenziano at intel.com> wrote:
>>>
>>> Since both test_handle_input and test_duplicate_handles define some
>>> sub-tests and some fixtures, I think it would be better to unwrap those
>>> functions and do all fixtures and subtest definition in igt_main to make
>>> it
>>> more readable. It seems like you would also be able to reuse the same
>>> fixture across the two subtest_groups.
>>
>>
>> To be clear, does this mean that each piece of fixture and igt_subtest
>> definition should live inside main?
>
>
> I don't think there is a rule for that, it looks better that way
> (fixtures/igt_subtest/subtest_group all in the main) IMO :). Also it is what
> I've found in most if not all tests I've looked at.
>
> Still the patch makes sense with or without my suggestion.
> Acked-by: Antonio Argenziano <antonio.argenziano at intel.com>

igt_subtest and igt_fixture in functions, to group stuff, and then
having an overall igt_subtest_group seems a perfectly fine pattern to
me. Especially with simple tests that just check tons of uapi
combinations for input validation on the kernel side igt_main
otherwise gets extermely unwieldy.

I think this here is perfectly fine as-is.

Cheers, Daniel

>
> Thanks,
> Antonio
>
>
>>
>> Cheers,
>> Daniel
>>
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the igt-dev mailing list