[igt-dev] [PATCH v2 i-g-t 17/23] tests/kms_dither: Dont assert if debugfs is not present
venkata.sai.patnana at intel.com
venkata.sai.patnana at intel.com
Thu Jun 3 14:40:16 UTC 2021
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);
return status;
}
--
2.25.1
More information about the igt-dev
mailing list