Re: [igt-dev] [PATCH i-g-t 03/10] lib/tests: Test that igt_describe works with dynamic subtests

Petri Latvala
2019-08-28T12:39:36Z

On Wed, Aug 28, 2019 at 03:33:09PM +0300, Arkadiusz Hiler wrote:
> On Fri, Aug 16, 2019 at 12:34:19PM +0300, Petri Latvala wrote:
> > Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> > ---
> > lib/tests/igt_describe.c | 12 +++++++++++-
> > 1 file changed, 11 insertions(+), 1 deletion(-)
> >
> > diff --git a/lib/tests/igt_describe.c b/lib/tests/igt_describe.c
> > index 2ea47e9d..70ec055e 100644
> > --- a/lib/tests/igt_describe.c
> > +++ b/lib/tests/igt_describe.c
> > @@ -87,6 +87,13 @@ static void fake_main(int argc, char **argv) {
> > igt_subtest("F")
> > ;
> >
> > + igt_describe("Dynamic container");
> > + igt_dynamic_subtest_container("G") {
> > + printf("should not be executed!\n");
>
> > + igt_dynamic_subtest("should-not-list")
>
> Have you tested this for:
> igt_describe("Dynamic subtest");
> igt_dynamic_subtest("should-not-list") {}
>
>
> I think this has potential to mess up few things and should be
> disallowed with a loud error message.

You mean someone accidentally calling igt_describe for a dynamic
subtest, expecting it to appear in docs somewhere? Yeah that should be
easy, coming up in next revision.

--
Petri Latvala