[igt-dev] [PATCH i-g-t 1/9] tests/kms_lease: Add invalid planes tests

Lyude Paul lyude at redhat.com
Wed Feb 20 22:26:50 UTC 2019


Alright-minus the few comments I left, this looks good to me. With those
changes:

Reviewed-by: Lyude Paul <lyude at redhat.com>

On Wed, 2019-02-20 at 17:25 +0100, Daniel Vetter wrote:
> Test gap because we're using universal planes by default. Fix that.
> 
> Cc: Keith Packard <keithp at keithp.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  tests/kms_lease.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/tests/kms_lease.c b/tests/kms_lease.c
> index cca424598ea7..70a96362d77a 100644
> --- a/tests/kms_lease.c
> +++ b/tests/kms_lease.c
> @@ -573,6 +573,20 @@ static void lease_invalid_crtc(data_t *data)
>  	igt_assert_eq(ret, -EINVAL);
>  }
>  
> +static void lease_invalid_plane(data_t *data)
> +{
> +	lease_t lease;
> +	uint32_t save_plane_id;
> +	int ret;
> +
> +	/* Create an invalid lease */
> +	save_plane_id = data->plane_id;
> +	data->plane_id = 0xbaadf00d;
> +	ret = make_lease(data, &lease);
> +	data->plane_id = save_plane_id;
> +	igt_assert_eq(ret, -EINVAL);
> +}
> +
>  
>  static void run_test(data_t *data, void (*testfunc)(data_t *))
>  {
> @@ -625,6 +639,7 @@ igt_main
>  		{ "lease_again", lease_again },
>  		{ "lease_invalid_connector", lease_invalid_connector },
>  		{ "lease_invalid_crtc", lease_invalid_crtc },
> +		{ "lease_invalid_plane", lease_invalid_plane },
>  		{ }
>  	}, *f;
>  
-- 
Cheers,
	Lyude Paul



More information about the igt-dev mailing list