From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTPS id EF9B510E4EC for ; Wed, 5 Oct 2022 07:46:03 +0000 (UTC) Received: from linux.intel.com (maurocar-mobl2.ger.corp.intel.com [10.252.61.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by linux.intel.com (Postfix) with ESMTPS id 660C6580E01 for ; Wed, 5 Oct 2022 00:45:54 -0700 (PDT) Received: from maurocar by linux.intel.com with local (Exim 4.96) (envelope-from ) id 1ofz6F-000Egj-33 for igt-dev@lists.freedesktop.org; Wed, 05 Oct 2022 09:45:51 +0200 From: Mauro Carvalho Chehab To: igt-dev@lists.freedesktop.org Date: Wed, 5 Oct 2022 09:45:43 +0200 Message-Id: <20221005074546.55955-75-mauro.chehab@linux.intel.com> In-Reply-To: <20221005074546.55955-1-mauro.chehab@linux.intel.com> References: <20221005074546.55955-1-mauro.chehab@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v4 74/77] core_auth: Close(master) before exit List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" List-ID: From: Chris Wilson Add a missing close(master) to the subtest group fixture to prevent a leak during later tests. Signed-off-by: Chris Wilson Reviewed-by: Andrzej Hajda Signed-off-by: Mauro Carvalho Chehab --- 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 #include #include @@ -48,6 +47,9 @@ # include #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.3