Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [V3 i-g-t 06/23] tests/i915: Close the fd before exit
Date: Thu, 22 Jun 2023 12:24:05 +0530	[thread overview]
Message-ID: <20230622065422.2235134-7-bhanuprakash.modem@intel.com> (raw)
In-Reply-To: <20230622065422.2235134-1-bhanuprakash.modem@intel.com>

Close the file descriptor before exiting the test.

V2: - Drop tests those are initializing the fd with igt_fd_t

Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
---
 tests/dmabuf_sync_file.c        | 3 +++
 tests/i915/gem_barrier_race.c   | 3 +++
 tests/i915/gem_concurrent_all.c | 5 +++++
 tests/i915/gem_ctx_exec.c       | 3 +++
 tests/i915/gem_ctx_freq.c       | 3 +++
 tests/i915/gem_eio.c            | 3 +++
 tests/i915/i915_pm_rps.c        | 3 +++
 7 files changed, 23 insertions(+)

diff --git a/tests/dmabuf_sync_file.c b/tests/dmabuf_sync_file.c
index 25bb6ad75..cfa73117b 100644
--- a/tests/dmabuf_sync_file.c
+++ b/tests/dmabuf_sync_file.c
@@ -380,4 +380,7 @@ igt_main
 		     "operations.");
 	igt_subtest("import-multiple-read-write")
 		test_import_multiple(fd, true);
+
+	igt_fixture
+		drm_close_driver(fd);
 }
diff --git a/tests/i915/gem_barrier_race.c b/tests/i915/gem_barrier_race.c
index be71d20e7..0ac1da3a4 100644
--- a/tests/i915/gem_barrier_race.c
+++ b/tests/i915/gem_barrier_race.c
@@ -165,4 +165,7 @@ igt_main
 			break;
 		}
 	}
+
+	igt_fixture
+		drm_close_driver(fd);
 }
diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
index fb3b5f5d8..0bf46c0a2 100644
--- a/tests/i915/gem_concurrent_all.c
+++ b/tests/i915/gem_concurrent_all.c
@@ -2015,4 +2015,9 @@ igt_main
 			}
 		}
 	}
+
+	igt_fixture {
+		drm_close_driver(fd);
+		drm_close_driver(vgem_drv);
+	}
 }
diff --git a/tests/i915/gem_ctx_exec.c b/tests/i915/gem_ctx_exec.c
index bd6671ec8..f3939df86 100644
--- a/tests/i915/gem_ctx_exec.c
+++ b/tests/i915/gem_ctx_exec.c
@@ -605,4 +605,7 @@ igt_main
 		gem_context_destroy(fd, ctx_id);
 		put_ahnd(ahnd);
 	}
+
+	igt_fixture
+		drm_close_driver(fd);
 }
diff --git a/tests/i915/gem_ctx_freq.c b/tests/i915/gem_ctx_freq.c
index d15f83600..8c0d7db3c 100644
--- a/tests/i915/gem_ctx_freq.c
+++ b/tests/i915/gem_ctx_freq.c
@@ -261,4 +261,7 @@ igt_main
 			igt_dynamic_f("gt%u", gt)
 				sysfs_range(dirfd, gt);
 	}
+
+	igt_fixture
+		drm_close_driver(i915);
 }
diff --git a/tests/i915/gem_eio.c b/tests/i915/gem_eio.c
index a5ebe6d2d..38fd19e89 100644
--- a/tests/i915/gem_eio.c
+++ b/tests/i915/gem_eio.c
@@ -1321,4 +1321,7 @@ igt_main
 			intel_allocator_multiprocess_stop();
 		}
 	}
+
+	igt_fixture
+		drm_close_driver(fd);
 }
diff --git a/tests/i915/i915_pm_rps.c b/tests/i915/i915_pm_rps.c
index eaacc7c90..238d39240 100644
--- a/tests/i915/i915_pm_rps.c
+++ b/tests/i915/i915_pm_rps.c
@@ -999,4 +999,7 @@ igt_main
 		waitboost(drm_fd, true);
 		igt_disallow_hang(drm_fd, hang);
 	}
+
+	igt_fixture
+		drm_close_driver(drm_fd);
 }
-- 
2.40.0

  parent reply	other threads:[~2023-06-22  7:00 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-22  6:53 [igt-dev] [V3 i-g-t 00/23] XE test cleanup to handle xe_device Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 01/23] lib: Interface to close the drm fd Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 02/23] lib: Cache xe_device at driver open/close level Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 03/23] lib/xe/xe_query: Add xe_config() interface Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 04/23] lib/igt_msm: Use drm_close_driver() to close the drm fd Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 05/23] tests/amdgpu: Close the fd before exit Bhanuprakash Modem
2023-06-22  7:22   ` Christian König
2023-06-22  6:54 ` Bhanuprakash Modem [this message]
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 07/23] tests/kms: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 08/23] tests/nouveau_crc: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 09/23] tests/xe/xe_gpgpu_fill: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 10/23] tests/i915/kms_mmap_write_crc: Avoid closing the closed fd Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 11/23] tests: Use drm_close_driver() to close the drm fd Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 12/23] tests/amdgpu: " Bhanuprakash Modem
2023-06-22  7:22   ` Christian König
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 13/23] tests/chamelium: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 14/23] tests/panfrost: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 15/23] tests/v3d: " Bhanuprakash Modem
2023-06-22 11:55   ` Maira Canal
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 16/23] tests/vc4: " Bhanuprakash Modem
2023-06-22 11:56   ` Maira Canal
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 17/23] tests/vmwgfx: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 18/23] tests/kms: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 19/23] tests/xe: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 20/23] tests/i915: " Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 21/23] tests/xe/xe_debugfs: Use xe_config() helper to get the config Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 22/23] tests: Drop xe_device get/put from test level Bhanuprakash Modem
2023-06-22  6:54 ` [igt-dev] [V3 i-g-t 23/23] Revert "lib/igt_kms: Cache xe_device info for kms tests" Bhanuprakash Modem
2023-06-22  8:02 ` [igt-dev] ✗ Fi.CI.BAT: failure for XE test cleanup to handle xe_device (rev6) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230622065422.2235134-7-bhanuprakash.modem@intel.com \
    --to=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox