[igt-dev] [PATCH 1/2] tests/i915/kms_draw_crc: Convert tests to dynamic

Modem, Bhanuprakash bhanuprakash.modem at intel.com
Tue Aug 2 09:56:46 UTC 2022


On Tue-02-08-2022 12:23 pm, Nidhi Gupta wrote:
> Convert the existing subtests to dynamic subtests.
> 
> Signed-off-by: Nidhi Gupta <nidhi1.gupta at intel.com>
> ---
>   tests/i915/kms_draw_crc.c | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/tests/i915/kms_draw_crc.c b/tests/i915/kms_draw_crc.c
> index 33fefed4..5c9feac9 100644
> --- a/tests/i915/kms_draw_crc.c
> +++ b/tests/i915/kms_draw_crc.c
> @@ -335,18 +335,20 @@ igt_main
>   	igt_fixture
>   		setup_environment();
>   
> -	for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
> -	for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
> -	for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {
> -		igt_describe("This subtest verfies igt_draw library works "
> -			     "with different modifiers, DRM_FORMATS, DRAW_METHODS.");
> -		igt_subtest_f("draw-method-%s-%s-%s",
> +	igt_describe("This subtest verfies igt_draw library works "
> +		     "with different modifiers, DRM_FORMATS, DRAW_METHODS.");
> +	igt_subtest_with_dynamic("draw-method") {
> +		for (format_idx = 0; format_idx < ARRAY_SIZE(formats); format_idx++) {
> +		for (method = 0; method < IGT_DRAW_METHOD_COUNT; method++) {
> +		for (modifier_idx = 0; modifier_idx < ARRAY_SIZE(modifiers); modifier_idx++) {

We must check all per-requisites here itself. Since we need to avoid 
skips in side igt_dynamic()

> +		igt_dynamic_f("draw-method-%s-%s-%s",

Please drop "draw-method" from dynamic subtest name.
Also, please use indentation.

- Bhanu
>   			      format_str(format_idx),
>   			      igt_draw_get_method_name(method),
>   			      modifier_str(modifier_idx))
>   			draw_method_subtest(method, format_idx,
>   					    modifiers[modifier_idx]);
>   	} } }
> +	}
>   
>   	igt_describe("This subtest verifies CRC after filling fb with x-tiling "
>   		     "or none.");



More information about the igt-dev mailing list