[igt-dev] [RFC, i-g-t v3] Added dynamic Subtest

Petri Latvala petri.latvala at intel.com
Tue Nov 24 06:37:57 UTC 2020


On Tue, Nov 24, 2020 at 11:54:06AM +0530, nidhi1.gupta at intel.com wrote:
> From: Nidhi Gupta <nidhi1.gupta at intel.com>
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
>  tests/kms_atomic_transition.c | 25 +++++++++++++++----------
>  1 file changed, 15 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/kms_atomic_transition.c b/tests/kms_atomic_transition.c
> index a71bbe10..c3108d8e 100644
> --- a/tests/kms_atomic_transition.c
> +++ b/tests/kms_atomic_transition.c
> @@ -918,7 +918,7 @@ igt_main
>  	igt_display_t display;
>  	igt_output_t *output;
>  	enum pipe pipe;
> -	int i;
> +	int i, count = 0;
>  
>  	igt_fixture {
>  		display.drm_fd = drm_open_driver_master(DRIVER_ANY);
> @@ -1024,18 +1024,23 @@ igt_main
>  		for_each_pipe_with_valid_output(&display, pipe, output)
>  			run_transition_test(&display, pipe, output, TRANSITION_MODESET_DISABLE, false, false);
>  
> -	for (i = 1; i <= IGT_MAX_PIPES; i++) {
> -		igt_subtest_f("%ix-modeset-transitions", i)
> -			run_modeset_transition(&display, i, false, false);
> +	igt_subtest_with_dynamic("modeset-transitions") {
> +		for_each_pipe_with_single_output(&display, pipe, output) {
> +			count++;
> +		}
> +		for (i = 1; i <= count; i++) {
> +			igt_subtest_with_dynamic_f("%ix-modeset-transitions", i)
> +				run_modeset_transition(&display, i, false, false);

Still wrong. igt_dynamic() inside an igt_subtest_with_dynamic.

Commit message needs to explain why this change is done.


-- 
Petri Latvala



>  
> -		igt_subtest_f("%ix-modeset-transitions-nonblocking", i)
> -			run_modeset_transition(&display, i, true, false);
> +			igt_subtest_with_dynamic_f("%ix-modeset-transitions-nonblocking", i)
> +				run_modeset_transition(&display, i, true, false);
>  
> -		igt_subtest_f("%ix-modeset-transitions-fencing", i)
> -			run_modeset_transition(&display, i, false, true);
> +			igt_subtest_with_dynamic_f("%ix-modeset-transitions-fencing", i)
> +				run_modeset_transition(&display, i, false, true);
>  
> -		igt_subtest_f("%ix-modeset-transitions-nonblocking-fencing", i)
> -			run_modeset_transition(&display, i, true, true);
> +			igt_subtest_with_dynamic_f("%ix-modeset-transitions-nonblocking-fencing", i)
> +				run_modeset_transition(&display, i, true, true);
> +		}
>  	}
>  
>  	igt_fixture {
> -- 
> 2.26.2
> 


More information about the igt-dev mailing list