[igt-dev] [V3 i-g-t 08/23] tests/nouveau_crc: Close the fd before exit

Bhanuprakash Modem bhanuprakash.modem at intel.com
Thu Jun 22 06:54:07 UTC 2023


Close the file descriptor before exiting the test.

Cc: Lyude Paul <lyude at redhat.com>
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
Reviewed-by: Lyude Paul <lyude at redhat.com>
---
 tests/nouveau_crc.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tests/nouveau_crc.c b/tests/nouveau_crc.c
index 785d39bde..d5aa0e650 100644
--- a/tests/nouveau_crc.c
+++ b/tests/nouveau_crc.c
@@ -409,7 +409,9 @@ igt_main
 			close(data.nv_crc_dir);
 		}
 	}
-	igt_fixture
-		igt_display_fini(&data.display);
 
+	igt_fixture {
+		igt_display_fini(&data.display);
+		drm_close_driver(data.drm_fd);
+	}
 }
-- 
2.40.0



More information about the igt-dev mailing list