Re: [igt-dev] [PATCH i-g-t 1/8] lib: Introduce dynamic subsubtests

Arkadiusz Hiler
2019-10-25T07:49:44Z

On Thu, Oct 24, 2019 at 02:05:39PM +0300, Petri Latvala wrote:
> Dynamic subsubtests, or subtests of subtests, are individual pieces of
> tests that are not statically available all the time.
>
> A good example of a need for a dynamic subsubtest is i915 engine
> listing: A normal subtest for each engine class ("bsd"), and a dynamic
> subsubtest for each instance ("bsd0", "bsd2", etc). Or a normal
> subtest for an operation with a dynamic subsubtest for every engine
> there is.
>
> Another example is dynamic subsubtests for pipes: Instead of using
> foreach_pipe_static, make one subtest and use foreach_pipe with
> dynamic subsubtests for each pipe.
>
> v2: Rebase and adapt to igt_describe changes
>
> v3: Rename to igt_subtest_with_dynamic_subsubtests &
> igt_dynamic_subsubtest, better docs, make igt_describe fail loudly
> if it's used in an impossible context.
>
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> ---
> lib/igt_core.c | 148 ++++++++++++++++++++++++++++++++++++++++++-------
> lib/igt_core.h | 123 ++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 250 insertions(+), 21 deletions(-)
>
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 7bd5afa5..9c5c698f 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c

The section documentation in this file mentions magic control blocks
giving a cautionary tale about how they are implemented and what not to
do:

"This applies to #igt_fixture and #igt_subtest blocks and all the..."

https://drm.pages.freedesktop.org/igt-gpu-tools/igt-gpu-tools-Core.html#id-1.2.7.6.6

We can mention the new dynamic subsubtests by name there too.

With that:

Reviewed-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>