[igt-dev] [PATCH i-g-t] tests/testdisplay: Skip modeset if no display is connected

Karthik B S karthik.b.s at intel.com
Thu Aug 4 09:58:43 UTC 2022


On 8/4/2022 3:17 PM, Swati Sharma wrote:
> Even if no display is connected; test executes and result in
> SUCCESS with no modeset happening.
> Made changes, to SKIP test if there is no display connected.
>
> Signed-off-by: Swati Sharma <swati2.sharma at intel.com>
Reviewed-by: Karthik B S <karthik.b.s at intel.com>
> ---
>   tests/testdisplay.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/tests/testdisplay.c b/tests/testdisplay.c
> index e9fbd2601..c6b819399 100644
> --- a/tests/testdisplay.c
> +++ b/tests/testdisplay.c
> @@ -476,8 +476,12 @@ set_stereo_mode(struct connector *c)
>   int update_display(bool probe)
>   {
>   	struct connector *connectors;
> +	igt_display_t display;
>   	int c;
>   
> +	igt_display_require(&display, drm_fd);
> +	igt_display_require_output(&display);
> +
>   	resources = drmModeGetResources(drm_fd);
>   	igt_require(resources);
>   




More information about the igt-dev mailing list