[igt-dev] [PATCH i-g-t 2/3] lib/igt_core: Disallow nesting of igt_dynamic inside igt_dynamic

Petri Latvala petri.latvala at intel.com
Tue May 5 06:36:42 UTC 2020


On Mon, May 04, 2020 at 02:26:22PM +0300, Arkadiusz Hiler wrote:
> igt_dynamic is allowed only inside igt_subtest_with_dynamic
> 
> Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler at intel.com>

Reviewed-by: Petri Latvala <petri.latvala at intel.com>


> ---
>  lib/igt_core.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/igt_core.c b/lib/igt_core.c
> index 43f0ba8b..662a0986 100644
> --- a/lib/igt_core.c
> +++ b/lib/igt_core.c
> @@ -1280,6 +1280,8 @@ bool __igt_run_dynamic_subtest(const char *dynamic_subtest_name)
>  {
>  	internal_assert(in_subtest && _igt_dynamic_tests_executed >= 0,
>  			"igt_dynamic is allowed only inside igt_subtest_with_dynamic\n");
> +	internal_assert(!in_dynamic_subtest,
> +			"igt_dynamic is not allowed to be nested in another igt_dynamic\n");
>  
>  	if (!valid_name_for_subtest(dynamic_subtest_name)) {
>  			igt_critical("Invalid dynamic subtest name \"%s\".\n",
> -- 
> 2.25.2
> 
> _______________________________________________
> igt-dev mailing list
> igt-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/igt-dev


More information about the igt-dev mailing list