[igt-dev] [PATCH i-g-t v3 2/6] tests/fbcon_fbt: Allow fbcon to bind when running this test

Dhinakaran Pandiyan dhinakaran.pandiyan at intel.com
Fri Apr 12 04:03:55 UTC 2019


On Wed, 2019-04-10 at 15:07 -0700, José Roberto de Souza wrote:
> 9c4114ec5d87 (lib: Always unbind the fbcon around igt) broke
> fbcon_fbt test as fbcon is not allowed to bind when executing any IGT
> test, so lets allow it again just for this test.
> 
> Cc: Paulo Zanoni <paulo.r.zanoni at intel.com>
> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Reviewed-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
> Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
> ---
>  tests/kms_fbcon_fbt.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/tests/kms_fbcon_fbt.c b/tests/kms_fbcon_fbt.c
> index a717e000..a9d91839 100644
> --- a/tests/kms_fbcon_fbt.c
> +++ b/tests/kms_fbcon_fbt.c
> @@ -26,6 +26,7 @@
>  
>  #include "igt.h"
>  #include "igt_psr.h"
> +#include "igt_sysfs.h"
>  #include <sys/types.h>
>  #include <sys/stat.h>
>  #include <fcntl.h>
> @@ -279,6 +280,12 @@ static void setup_environment(void)
>  	drm_fd = drm_open_driver_master(DRIVER_INTEL);
>  	igt_require(drm_fd >= 0);
>  	igt_assert(close(drm_fd) == 0);
> +
> +	/*
> +	 * igt_subtest_init_parse_opts() disable the fbcon bind, so to test it

nit: It is better to refer to the code that's actually called from this file  -
igt_main(). igt_subtest_init_parse_opts() in any case doesn't seem like a good
choice as it does not call bind_fbcon() directly. It'd be great if you can fix
this comment before merging.


> +	 * is necessary enable it again
> +	 */
> +	bind_fbcon(true);
bind_fbcon() fails silently if it cannot find/open the frame buffer device. We
should have a skip somewhere since this test relies on bind_fbcon() succeeding.
Perhaps, something to improve later.

Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>

>  }
>  
>  static void teardown_environment(void)



More information about the igt-dev mailing list