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

Petri Latvala petri.latvala at intel.com
Tue Dec 1 13:44:52 UTC 2020


On Tue, Dec 01, 2020 at 08:02:58AM +0530, nidhi1.gupta at intel.com wrote:
> From: Nidhi Gupta <nidhi1.gupta at intel.com>
> 
> In kms_plane_scaling have a subtest with 2 pipe it
> will execute it weather 2 pipes are available or not.
> Later it has to be analysed and discard it as valid skip.
> To save this time updated in test to first check the available
> outputs and then execute the test
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
>  tests/kms_plane_scaling.c | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_plane_scaling.c b/tests/kms_plane_scaling.c
> index 89b82416..95be07cc 100644
> --- a/tests/kms_plane_scaling.c
> +++ b/tests/kms_plane_scaling.c
> @@ -682,6 +682,7 @@ static data_t data;
>  igt_main_args("", long_opts, help_str, opt_handler, &data)
>  {
>  	enum pipe pipe;
> +	int count = 0;
>  
>  	igt_fixture {
>  		data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_AMDGPU);
> @@ -717,10 +718,17 @@ igt_main_args("", long_opts, help_str, opt_handler, &data)
>  				igt_dynamic_f("pipe-%s-scaler-with-clipping-clamping", kmstest_pipe_name(pipe))
>  					test_scaler_with_clipping_clamping_scenario(&data, pipe, output);
>  		}
> -	}
>  
> -	igt_subtest_f("2x-scaler-multi-pipe")
> -		test_scaler_with_multi_pipe_plane(&data);
> +		igt_subtest_with_dynamic("scaler-multi-pipe") {
> +			for_each_pipe_with_single_output(&data.display, pipe, output) {
> +				++count;
> +			}
> +			if (count >= 2) {
> +				igt_dynamic_f("2x-scaler-multi-pipe")
> +					test_scaler_with_multi_pipe_plane(&data);
> +			}
> +		}
> +	}

NAK. This will make the test still skip on less than 2 outputs, but
the skip is now harder to filter. (The skip will be for
"scaler-multi-pipe" with the message "no dynamic subtests entered")

To save human time in cibuglog analysis, rather make the
less-than-required-outputs skip messages consistent so one filter can
cover them all.


-- 
Petri Latvala


More information about the igt-dev mailing list