[igt-dev] [PATCH v2 75/77] core_auth: Close(master) before exit
Mauro Carvalho Chehab
mauro.chehab at linux.intel.com
Mon Sep 5 05:53:49 UTC 2022
From: Chris Wilson <chris.p.wilson at intel.com>
Add a missing close(master) to the subtest group fixture to prevent a
leak during later tests.
Signed-off-by: Chris Wilson <chris.p.wilson at intel.com>
Reviewed-by: Andrzej Hajda <andrzej.hajda at intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab at kernel.org>
---
To avoid mailbombing on a large number of people, only mailing lists were C/C on the cover.
See [PATCH v2 00/77] at: https://lore.kernel.org/all/cover.1662357022.git.mchehab@kernel.org/
tests/core_auth.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/tests/core_auth.c b/tests/core_auth.c
index c9ad3fb9c875..257f124820a4 100644
--- a/tests/core_auth.c
+++ b/tests/core_auth.c
@@ -25,7 +25,6 @@
* Testcase: drmGetMagic() and drmAuthMagic()
*/
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -48,6 +47,9 @@
# include <pthread.h>
#endif
+#include "igt.h"
+#include "igt_types.h"
+
IGT_TEST_DESCRIPTION("Call drmGetMagic() and drmAuthMagic() and see if it behaves.");
static bool
@@ -192,8 +194,6 @@ static void test_basic_auth(int master)
igt_main
{
- int master;
-
/* root (which we run igt as) should always be authenticated */
igt_describe("Check drm client is always authenticated.");
igt_subtest("getclient-simple") {
@@ -220,6 +220,8 @@ igt_main
/* above tests require that no drm fd is open */
igt_subtest_group {
+ igt_fd_t(master);
+
igt_fixture
master = drm_open_driver_master(DRIVER_ANY);
--
2.37.2
More information about the igt-dev
mailing list