Thread (26 messages) 26 messages, 6 authors, 2021-06-10

[igt-dev] [PATCH i-g-t 03/11] tests/kms_dither: Dont assert if debugfs is not present

From: <hidden>
Date: 2021-06-09 12:28:18
Subsystem: the rest · Maintainer: Linus Torvalds

From: Bhanuprakash Modem <redacted>

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 <redacted>
Cc: Nischal Varide <redacted>
Cc: Petri Latvala <redacted>
Signed-off-by: Bhanuprakash Modem <redacted>
---
 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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help