[igt-dev] [PATCH i-g-t 3/3] tests/kms_color_helper: Respect --skip-crc-compare

Ville Syrjala ville.syrjala at linux.intel.com
Wed Jul 15 15:05:42 UTC 2020


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Unlike igt_assert_crc_equal() crc_equal() does not respect the
--skip-crc-compare command line argument. Let's remedy that.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_color_helper.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kms_color_helper.c b/tests/kms_color_helper.c
index 2605146ae6c3..ac8e84548b3f 100644
--- a/tests/kms_color_helper.c
+++ b/tests/kms_color_helper.c
@@ -247,7 +247,8 @@ get_blob(data_t *data, igt_pipe_t *pipe, enum igt_atomic_crtc_properties prop)
 
 bool crc_equal(igt_crc_t *a, igt_crc_t *b)
 {
-	return memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0;
+	return igt_skip_crc_compare ||
+		memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0;
 }
 
 int
-- 
2.26.2



More information about the igt-dev mailing list