[igt-dev] [PATCH i-g-t v2 2/4] tests/kms_sysfs_edid_timing: fail if probing a single connector takes too long

Kahola, Mika mika.kahola at intel.com
Fri Jun 17 11:19:43 UTC 2022


> -----Original Message-----
> From: Luca Coelho <luca at coelho.fi>
> Sent: Wednesday, June 15, 2022 3:26 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Latvala, Petri <petri.latvala at intel.com>; Kahola, Mika
> <mika.kahola at intel.com>; luca at coelho.fi
> Subject: [PATCH i-g-t v2 2/4] tests/kms_sysfs_edid_timing: fail if probing a single
> connector takes too long
> 
> From: Luca Coelho <luciano.coelho at intel.com>
> 
> There's no point in just warning if probing a single connector takes too long.  If a
> test finds any issues, it should just fail.
> 
> Convert the warning into an assertion.
> 

Reviewed-by: Mika Kahola <mika.kahola at intel.com>

> Signed-off-by: Luca Coelho <luciano.coelho at intel.com>
> ---
>  tests/kms_sysfs_edid_timing.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/kms_sysfs_edid_timing.c b/tests/kms_sysfs_edid_timing.c
> index 028a5323c0b2..ea0e169e6ed9 100644
> --- a/tests/kms_sysfs_edid_timing.c
> +++ b/tests/kms_sysfs_edid_timing.c
> @@ -81,11 +81,11 @@ igt_simple_main
>  			  mean.max, mean.max / 1e3, mean.max / 1e6,
>  			  mean.mean, mean.mean / 1e3, mean.mean / 1e6);
> 
> -		if (mean.max > (THRESHOLD_PER_CONNECTOR * 1e6)) {
> -			igt_warn("%s: probe time exceed %dms, max=%.2fms,
> avg=%.2fms\n",
> -				 de->d_name, THRESHOLD_PER_CONNECTOR,
> -				 mean.max / 1e6, mean.mean / 1e6);
> -		}
> +		igt_assert_f(mean.max < THRESHOLD_PER_CONNECTOR * 1e6,
> +			     "%s: probe time exceed %dms, max=%.2fms,
> avg=%.2fms\n",
> +			     de->d_name, THRESHOLD_PER_CONNECTOR,
> +			     mean.max / 1e6, mean.mean / 1e6);
> +
>  		igt_assert_f(mean.mean < (THRESHOLD_TOTAL * 1e6),
>  			     "%s: average probe time exceeded %dms,
> max=%.2fms, avg=%.2fms\n",
>  			     de->d_name, THRESHOLD_TOTAL,
> --
> 2.36.1



More information about the igt-dev mailing list