[igt-dev] [PATCH i-g-t] tests/kms_psr2_su: Add igt_assert when the failing of PSR2 enabling

Souza, Jose jose.souza at intel.com
Fri Jul 10 16:29:06 UTC 2020


On Fri, 2020-07-10 at 17:00 +0300, Gwan-gyeong Mun wrote:
> The psr_print_debugfs() function uses igt_debug() for logging.
> As igt_require() does not raise printing out of IGT_LOG_DEBUG level.
> It changes igt_debug() to igt_assert() for getting debug log on
> skipping test case of kms_psr2_su.
> 
> Cc: José Roberto de Souza <jose.souza at intel.com>
> Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
> ---
>  tests/kms_psr2_su.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/kms_psr2_su.c b/tests/kms_psr2_su.c
> index d549d9a3..e82193cb 100644
> --- a/tests/kms_psr2_su.c
> +++ b/tests/kms_psr2_su.c
> @@ -263,7 +263,7 @@ igt_main
>  		cleanup(&data);
>  		if (!r)
>  			psr_print_debugfs(data.debugfs_fd);
> -		igt_require_f(r, "PSR2 can not be enabled\n");
> +		igt_assert_f(r, "PSR2 can not be enabled\n");

This will cause tests to fail when PSR2 can not be enabled for right reasons, why not change the messages in psr_print_debugfs to igt_info?

>  
>  		/* blocking timerfd */
>  		data.change_screen_timerfd = timerfd_create(CLOCK_MONOTONIC, 0);


More information about the igt-dev mailing list