public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t 1/2] tests/kms_plane: Keep testing pixel formats even if one fails
@ 2019-03-11 13:32 Arkadiusz Hiler
  2019-03-11 13:32 ` [igt-dev] [PATCH i-g-t 2/2] Revert "tests: kms_plane: Disable XBGR8888" Arkadiusz Hiler
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Arkadiusz Hiler @ 2019-03-11 13:32 UTC (permalink / raw)
  To: igt-dev; +Cc: Daniel Vetter

In the pixel-format-pipe-*-planes* family of subtests currently we exit
early if there is any CRC mismatch, leaving all the remaining formats
untested.

Let's fix that by moving the assert till after all the iterations.

Also log each mismatch with its context in a single line so that it's
easy to look for.

Cc: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
---
 tests/kms_plane.c | 25 ++++++++++++++++++++-----
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 91de4694..4cd0b565 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -462,7 +462,7 @@ static void test_format_plane_color(data_t *data, enum pipe pipe,
 	igt_remove_fb(data->drm_fd, &old_fb);
 }
 
-static void test_format_plane(data_t *data, enum pipe pipe,
+static bool test_format_plane(data_t *data, enum pipe pipe,
 			      igt_output_t *output, igt_plane_t *plane)
 {
 	igt_plane_t *primary;
@@ -472,12 +472,13 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	uint32_t format, ref_format;
 	uint64_t width, height;
 	igt_crc_t ref_crc[ARRAY_SIZE(colors)];
+	bool result = true;
 
 	/*
 	 * No clamping test for cursor plane
 	 */
 	if (data->crop != 0 && plane->type == DRM_PLANE_TYPE_CURSOR)
-		return;
+		return true;
 
 	mode = igt_output_get_mode(output);
 	if (plane->type != DRM_PLANE_TYPE_CURSOR) {
@@ -487,7 +488,7 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 	} else {
 		if (!plane->drm_plane) {
 			igt_debug("Only legacy cursor ioctl supported, skipping cursor plane\n");
-			return;
+			return true;
 		}
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_WIDTH, &width));
 		do_or_die(drmGetCap(data->drm_fd, DRM_CAP_CURSOR_HEIGHT, &height));
@@ -548,11 +549,19 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 			 kmstest_pipe_name(pipe), plane->index);
 
 		for (int j = 0; j < ARRAY_SIZE(colors); j++) {
+			bool crc_equal;
+
 			test_format_plane_color(data, pipe, plane,
 						format, width, height,
 						j, &crc, &fb);
 
-			igt_assert_crc_equal(&crc, &ref_crc[j]);
+			crc_equal = igt_check_crc_equal(&crc, &ref_crc[j]);
+			result &= crc_equal;
+
+			if (!crc_equal)
+				igt_warn("CRC mismatch with format " IGT_FORMAT_FMT " on %s.%u\n",
+					 IGT_FORMAT_ARGS(format),
+					 kmstest_pipe_name(pipe), plane->index);
 		}
 	}
 
@@ -567,6 +576,8 @@ static void test_format_plane(data_t *data, enum pipe pipe,
 
 	igt_remove_fb(data->drm_fd, &fb);
 	igt_remove_fb(data->drm_fd, &primary_fb);
+
+	return result;
 }
 
 static void
@@ -577,10 +588,14 @@ test_pixel_formats(data_t *data, enum pipe pipe)
 	igt_display_require_output_on_pipe(&data->display, pipe);
 
 	for_each_valid_output_on_pipe(&data->display, pipe, output) {
+		bool result = true;
 		igt_plane_t *plane;
 
 		for_each_plane_on_pipe(&data->display, pipe, plane)
-			test_format_plane(data, pipe, output, plane);
+			result &= test_format_plane(data, pipe, output, plane);
+
+		igt_assert_f(result, "At least one CRC mismatch happened\n");
+
 
 		igt_output_set_pipe(output, PIPE_ANY);
 	}
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2019-03-12 13:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-11 13:32 [igt-dev] [PATCH i-g-t 1/2] tests/kms_plane: Keep testing pixel formats even if one fails Arkadiusz Hiler
2019-03-11 13:32 ` [igt-dev] [PATCH i-g-t 2/2] Revert "tests: kms_plane: Disable XBGR8888" Arkadiusz Hiler
2019-03-11 14:13   ` Daniel Vetter
2019-03-11 14:55 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_plane: Keep testing pixel formats even if one fails Patchwork
2019-03-11 16:11 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2019-03-12 11:26 ` [igt-dev] ✓ Fi.CI.BAT: success for series starting with [i-g-t,1/2] tests/kms_plane: Keep testing pixel formats even if one fails (rev2) Patchwork
2019-03-12 13:23 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox