Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] tests/kms_plane: Fix skips/fails vs CRC cleanup
@ 2023-10-11 21:03 Rob Clark
  2023-10-12  0:41 ` Jessica Zhang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Rob Clark @ 2023-10-11 21:03 UTC (permalink / raw)
  To: igt-dev; +Cc: Rob Clark, Helen Koike, Emma Anholt

From: Rob Clark <robdclark@chromium.org>

test_fini() isn't necessarily called if a subtest skips/fails, leaving
the kernel drm_crtc_crc still in the open state, causing further
attempts to open/configure the crc to fail.

Signed-off-by: Rob Clark <robdclark@chromium.org>
---
 tests/kms_plane.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/kms_plane.c b/tests/kms_plane.c
index 9a515559c9b0..b3d6043496b1 100644
--- a/tests/kms_plane.c
+++ b/tests/kms_plane.c
@@ -84,6 +84,8 @@ static color_t blue  = { 0.0f, 0.0f, 1.0f };
 static void test_init(data_t *data, enum pipe pipe)
 {
 	igt_require(data->display.pipes[pipe].n_planes > 0);
+	if (data->pipe_crc)
+		igt_pipe_crc_free(data->pipe_crc);
 	data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe,
 					  IGT_PIPE_CRC_SOURCE_AUTO);
 	igt_display_reset(&data->display);
@@ -92,6 +94,7 @@ static void test_init(data_t *data, enum pipe pipe)
 static void test_fini(data_t *data)
 {
 	igt_pipe_crc_free(data->pipe_crc);
+	data->pipe_crc = NULL;
 }
 
 enum {
-- 
2.41.0

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

end of thread, other threads:[~2023-10-12 19:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-11 21:03 [igt-dev] [PATCH] tests/kms_plane: Fix skips/fails vs CRC cleanup Rob Clark
2023-10-12  0:41 ` Jessica Zhang
2023-10-12  2:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-10-12  2:41 ` [igt-dev] ✓ CI.xeBAT: " Patchwork
2023-10-12 19:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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