All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_color: fix crc assert condition
@ 2022-08-31 10:11 Melissa Wen
  2022-08-31 11:03 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Melissa Wen @ 2022-08-31 10:11 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

In test_pipe_degamma/gamma/ctm, igt_assert_crc_equal() was replaced by

ret = !igt_skip_crc_compare || igt_check_crc_equal()
and then igt_assert(ret)

where igt_check_crc_equal returns !mismatch, and therefore we can
translate as:

ret = !igt_skip_crc_compare || !mismatch

However, the original igt_assert_crc_equal() assertion does:

igt_assert(!mismatch || igt_skip_crc_compare)

That means, the replacement changes the original assertion. Moreover,
negating `igt_skip_crc_compare` makes the test assertion to be always
true (sucessful) by default and reverses the logic of
--skip-crc-compare.

Fixes: d61e4598142 ("tests/kms_color: Convert tests to dynamic")
Signed-off-by: Melissa Wen <mwen@igalia.com>
---
 tests/kms_color.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/kms_color.c b/tests/kms_color.c
index c202547e..ab285af8 100644
--- a/tests/kms_color.c
+++ b/tests/kms_color.c
@@ -99,7 +99,7 @@ static bool test_pipe_degamma(data_t *data,
 	 * Verify that the CRC of the software computed output is
 	 * equal to the CRC of the degamma LUT transformation output.
 	 */
-	ret = !igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
+	ret = igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
 
 	disable_degamma(primary->pipe);
 	igt_plane_set_fb(primary, NULL);
@@ -188,7 +188,7 @@ static bool test_pipe_gamma(data_t *data,
 	 * Verify that the CRC of the software computed output is
 	 * equal to the CRC of the gamma LUT transformation output.
 	 */
-	ret = !igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
+	ret = igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
 
 	disable_gamma(primary->pipe);
 	igt_plane_set_fb(primary, NULL);
@@ -289,7 +289,7 @@ static bool test_pipe_legacy_gamma(data_t *data,
 	 * Verify that the CRC of the software computed output is
 	 * equal to the CRC of the gamma LUT transformation output.
 	 */
-	ret = !igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
+	ret = igt_skip_crc_compare || igt_check_crc_equal(&crc_fullgamma, &crc_fullcolors);
 
 	/* Reset output. */
 	for (i = 1; i < legacy_lut_size; i++)
@@ -534,7 +534,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.
 	 */
-	ret &= !igt_skip_crc_compare || igt_check_crc_equal(&crc_software, &crc_hardware);
+	ret &= igt_skip_crc_compare || igt_check_crc_equal(&crc_software, &crc_hardware);
 
 	igt_plane_set_fb(primary, NULL);
 	igt_output_set_pipe(output, PIPE_NONE);
-- 
2.35.1

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-09-22  5:31 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 10:11 [igt-dev] [PATCH i-g-t] tests/kms_color: fix crc assert condition Melissa Wen
2022-08-31 11:03 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-31 17:36 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-01  9:15 ` [igt-dev] [PATCH i-g-t] " Modem, Bhanuprakash
2022-09-19 15:54   ` Melissa Wen
2022-09-20 10:02     ` Modem, Bhanuprakash
2022-09-21  7:47       ` Ville Syrjälä
2022-09-21 10:36         ` Melissa Wen
2022-09-21 10:50           ` Ville Syrjälä
2022-09-21 15:54             ` Modem, Bhanuprakash
2022-09-21 16:43               ` Ville Syrjälä
2022-09-21 17:31                 ` Melissa Wen
2022-09-22  5:31                   ` Modem, Bhanuprakash

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.