From: Lucas De Marchi <lucas.demarchi@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Lucas De Marchi <lucas.demarchi@intel.com>,
Riana Tauro <riana.tauro@intel.com>,
Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Subject: [PATCH i-g-t 3/4] tests/intel/xe_configfs: Install exit handler once
Date: Tue, 19 Aug 2025 13:40:42 -0700 [thread overview]
Message-ID: <20250819-configfs-unbind-v1-3-8359e66e3241@intel.com> (raw)
In-Reply-To: <20250819-configfs-unbind-v1-0-8359e66e3241@intel.com>
All the subtests need to restore the device to a working condition.
Call igt_install_exit_handler() only once, after creating the custom
settings.
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
---
tests/intel/xe_configfs.c | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/tests/intel/xe_configfs.c b/tests/intel/xe_configfs.c
index 1510f25f0..8b2b8e3c4 100644
--- a/tests/intel/xe_configfs.c
+++ b/tests/intel/xe_configfs.c
@@ -26,7 +26,6 @@ static char bus_addr[NAME_MAX];
static void restore(int sig)
{
- /* Restore after survivability mode */
igt_kmod_unbind("xe", bus_addr);
igt_kmod_bind("xe", bus_addr);
}
@@ -147,26 +146,22 @@ igt_main
configfs_fd = igt_configfs_open("xe");
igt_require(configfs_fd != -1);
configfs_device_fd = create_device_configfs_group(configfs_fd);
+ igt_install_exit_handler(restore);
}
igt_describe("Validate survivability mode");
igt_subtest("survivability-mode") {
igt_require(IS_BATTLEMAGE(devid));
- igt_install_exit_handler(restore);
test_survivability_mode(configfs_device_fd);
}
igt_describe("Validate engines_allowed with invalid options");
- igt_subtest("engines-allowed-invalid") {
- igt_install_exit_handler(restore);
+ igt_subtest("engines-allowed-invalid")
test_engines_allowed_invalid(configfs_device_fd);
- }
igt_describe("Validate engines_allowed");
- igt_subtest("engines-allowed") {
- igt_install_exit_handler(restore);
+ igt_subtest("engines-allowed")
test_engines_allowed(configfs_device_fd);
- }
igt_fixture {
igt_fs_remove_dir(configfs_fd, bus_addr);
--
2.50.1
next prev parent reply other threads:[~2025-08-19 20:41 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 20:40 [PATCH i-g-t 0/4] tests/intel/xe_configfs: Unbind before tests Lucas De Marchi
2025-08-19 20:40 ` [PATCH i-g-t 1/4] tests/intel/xe_configfs: Do not execute with open fd Lucas De Marchi
2025-08-22 13:21 ` Kamil Konieczny
2025-08-19 20:40 ` [PATCH i-g-t 2/4] tests/intel/xe_configfs: Unbind before testing engines_allowed Lucas De Marchi
2025-08-25 10:19 ` Riana Tauro
2025-08-19 20:40 ` Lucas De Marchi [this message]
2025-08-22 6:01 ` [PATCH i-g-t 3/4] tests/intel/xe_configfs: Install exit handler once Riana Tauro
2025-08-19 20:40 ` [PATCH i-g-t 4/4] tests/intel/xe_configfs: Reset all custom settings on exit Lucas De Marchi
2025-08-25 11:18 ` Riana Tauro
2025-08-19 21:46 ` ✗ i915.CI.BAT: failure for tests/intel/xe_configfs: Unbind before tests Patchwork
2025-08-19 21:51 ` ✓ Xe.CI.BAT: success " Patchwork
2025-08-20 16:51 ` ✗ Xe.CI.Full: failure " 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=20250819-configfs-unbind-v1-3-8359e66e3241@intel.com \
--to=lucas.demarchi@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=riana.tauro@intel.com \
--cc=vinay.belgaumkar@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).