[igt-dev] [PATCH i-g-t 03/11] tests/kms_dither: Dont assert if debugfs is not present
Petri Latvala
petri.latvala at intel.com
Thu Jun 10 07:41:55 UTC 2021
On Wed, Jun 09, 2021 at 05:47:25PM +0530, venkata.sai.patnana at intel.com wrote:
> From: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
>
> As Dither_CC1 debugfs changes are not preset on older platforms, we need
> not to abort the test. So if the debugfs is not present, just consider
> the value as zero.
>
> Cc: Uma Shankar <uma.shankar at intel.com>
> Cc: Nischal Varide <nischal.varide at intel.com>
> Cc: Petri Latvala <petri.latvala at intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
> ---
> tests/kms_dither.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_dither.c b/tests/kms_dither.c
> index 1ff07914f4..b1f0503a6c 100644
> --- a/tests/kms_dither.c
> +++ b/tests/kms_dither.c
> @@ -107,8 +107,11 @@ static dither_status_t get_dither_state(data_t *data)
> igt_assert(start_loc = strstr(buf, "Dither: "));
> igt_assert_eq(sscanf(start_loc, "Dither: %u", &status.legacy), 1);
>
> - igt_assert(start_loc = strstr(buf, "Dither_CC1: "));
> - igt_assert_eq(sscanf(start_loc, "Dither_CC1: %u", &status.cc1), 1);
> + start_loc = strstr(buf, "Dither_CC1: ");
> + if (!start_loc)
> + status.cc1 = 0;
> + else
> + igt_assert_eq(sscanf(start_loc, "Dither_CC1: %u", &status.cc1), 1);
Squash this in the earlier patch that introduces the code changed here.
--
Petri Latvala
>
> return status;
> }
> --
> 2.25.1
>
More information about the igt-dev
mailing list