From e588f6dfa6f022120d5a55ef96994dbbc33d0dc9 Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Fri, 27 Feb 2015 20:37:29 +0100 Subject: lib/debugfs: Add igt_assert_crc_equal Because of hash collisions tests should only ever compare crc checksums for equality. Checking for inequality can result in random failures. To ensure this only expose and igt_assert function and use that. Follow-up patches will rework the code for tests which don't follow this requirement and try to compare for CRC inequality. v2: Rebase on top of Matt's kms_plane changes. Signed-off-by: Daniel Vetter --- tests/kms_plane.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/kms_plane.c') diff --git a/tests/kms_plane.c b/tests/kms_plane.c index ffd31e01..f71045eb 100644 --- a/tests/kms_plane.c +++ b/tests/kms_plane.c @@ -207,11 +207,11 @@ test_plane_position_with_output(data_t *data, igt_pipe_crc_collect_crc(data->pipe_crc, &crc2); if (flags & TEST_POSITION_FULLY_COVERED) - igt_assert(igt_crc_equal(&test.reference_crc, &crc)); + igt_assert_crc_equal(&test.reference_crc, &crc); else igt_assert(!igt_crc_equal(&test.reference_crc, &crc)); - igt_assert(igt_crc_equal(&crc, &crc2)); + igt_assert_crc_equal(&crc, &crc2); igt_plane_set_fb(primary, NULL); igt_plane_set_fb(sprite, NULL); @@ -333,9 +333,9 @@ test_plane_panning_with_output(data_t *data, igt_debug_wait_for_keypress("crc"); if (flags & TEST_PANNING_TOP_LEFT) - igt_assert(igt_crc_equal(&test.red_crc, &crc)); + igt_assert_crc_equal(&test.red_crc, &crc); else - igt_assert(igt_crc_equal(&test.blue_crc, &crc)); + igt_assert_crc_equal(&test.blue_crc, &crc); igt_plane_set_fb(primary, NULL); -- cgit v1.2.3