[PATCH i-g-t] tests/kms_addfb_basic: Split tests into subtest groups

Kamil Konieczny kamil.konieczny at linux.intel.com
Wed Mar 12 20:43:28 UTC 2025


Hi Karthik,
On 2025-03-12 at 16:00:08 +0530, Karthik B S wrote:
> Multiple subtest groups exist in kms_addfb_basic with individual
> igt_fixutre calls. Split these using igt_subtest_group so that any
> failure in the fixture of one of the individual subtest groups don't
> affect the results of subtests in other groups.
> 
> Signed-off-by: Karthik B S <karthik.b.s at intel.com>
> ---
>  tests/kms_addfb_basic.c | 15 ++++++++++-----
>  1 file changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/kms_addfb_basic.c b/tests/kms_addfb_basic.c
> index e5ff9ea32..268e4e0e4 100644
> --- a/tests/kms_addfb_basic.c
> +++ b/tests/kms_addfb_basic.c
> @@ -989,15 +989,20 @@ igt_main
>  		igt_require(has_addfb2_iface(fd));
>  	}
>  
> -	invalid_tests(fd);
> +	igt_subtest_group
> +		invalid_tests(fd);
>  
> -	pitch_tests(fd);
> +	igt_subtest_group
> +		pitch_tests(fd);
>  
> -	prop_tests(fd);
> +	igt_subtest_group
> +		prop_tests(fd);
>  
> -	master_tests(fd);
> +	igt_subtest_group
> +		master_tests(fd);
>  
> -	tiling_tests(fd);
> +	igt_subtest_group
> +		tiling_tests(fd);

I looked into those tests and imho this needs a major refactor,
for example there should not be any igt_assert() in a fixture.
Generally igt tests works ok for one fixture in begin, last one
at igt_main() end. When used in-between it becomes more
complicated to handle cleanup.

Regards,
Kamil

>  
>  	igt_subtest_group {
>  		igt_fixture
> -- 
> 2.43.0
> 


More information about the igt-dev mailing list