diff options
author | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2016-09-19 11:25:26 -0400 |
---|---|---|
committer | Lionel Landwerlin <lionel.g.landwerlin@intel.com> | 2016-11-09 15:46:38 +0000 |
commit | d0795466cdc983c6bf0af257af081b5f12d58c6e (patch) | |
tree | 6d2b621b7a774fbb490d256afb9ccaecc8fc3270 | |
parent | 7f7530df3d84559d3cac33ff831fcf442a264206 (diff) |
tests: kms_pipe_color: fix ctm tests
Some of the Intel platforms have odd numbers of LUT entries and we
need to tests a couple of values around the expected result. Bring
back the CRC equal function we need that doesn't trigger an assert
right away, while we still assert if we can't find a correct result in
the outter loop.
v2: update Fixes field (Jani)
v3: Use memcmp (Ville)
v4: missing signed-off
bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97691
Fixes: 582ce4cd19c6 ("lib/debugs: nuke igt_crc_equal again")
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
-rw-r--r-- | tests/kms_pipe_color.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/kms_pipe_color.c b/tests/kms_pipe_color.c index b0a2f07e..f120e263 100644 --- a/tests/kms_pipe_color.c +++ b/tests/kms_pipe_color.c @@ -652,6 +652,13 @@ static void test_pipe_legacy_gamma_reset(data_t *data, free(gamma_zero); } +static bool crc_equal(igt_crc_t *a, igt_crc_t *b) +{ + int i; + + return memcmp(a->crc, b->crc, sizeof(a->crc[0]) * a->n_words) == 0; +} + /* * Draw 3 rectangles using before colors with the ctm matrix apply and verify * the CRC is equal to using after colors with an identify ctm matrix. @@ -724,7 +731,7 @@ static bool test_pipe_ctm(data_t *data, /* Verify that the CRC of the software computed output is * equal to the CRC of the CTM matrix transformation output. */ - igt_assert_crc_equal(&crc_software, &crc_hardware); + ret &= crc_equal(&crc_software, &crc_hardware); igt_output_set_pipe(output, PIPE_ANY); } |