From: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>,
Francois Dugast <francois.dugast@intel.com>,
Lucas De Marchi <lucas.demarchi@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [PATCH i-g-t] tests/intel/xe_fault_injection: Injection list clear at exit
Date: Fri, 21 Mar 2025 10:53:06 +0100 [thread overview]
Message-ID: <20250321095306.798153-1-marcin.bernatowicz@linux.intel.com> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=y, Size: 1297 bytes --]
Reintroduce clearing of the injection list as an exit handler to ensure
fault injections are properly cleaned up.
Fixes: c0b2d9202f78 ("tests/intel/xe_fault_injection: Use igt_sysfs helpers")
Cc: Francois Dugast <francois.dugast@intel.com>
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Marcin Bernatowicz <marcin.bernatowicz@linux.intel.com>
---
tests/intel/xe_fault_injection.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
index 5409d19a6..1bd0f51a3 100644
--- a/tests/intel/xe_fault_injection.c
+++ b/tests/intel/xe_fault_injection.c
@@ -137,6 +137,12 @@ static void setup_injection_fault(void)
close(dir);
}
+static void cleanup_injection_fault(int sig)
+{
+ /* If nothing specified (‘’) injection list is cleared */
+ injection_list_do(INJECTION_LIST_ADD, "");
+}
+
static void set_retval(const char function_name[], long long retval)
{
char path[96];
@@ -371,6 +377,7 @@ igt_main
fd = drm_open_driver(DRIVER_XE);
igt_device_get_pci_slot_name(fd, pci_slot);
setup_injection_fault();
+ igt_install_exit_handler(cleanup_injection_fault);
}
for (const struct section *s = vm_create_fail_functions; s->name; s++)
--
2.31.1
next reply other threads:[~2025-03-21 9:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-21 9:53 Marcin Bernatowicz [this message]
2025-03-21 16:01 ` ✓ Xe.CI.BAT: success for tests/intel/xe_fault_injection: Injection list clear at exit Patchwork
2025-03-21 16:16 ` ✓ i915.CI.BAT: " Patchwork
2025-03-21 17:12 ` ✗ Xe.CI.Full: failure " Patchwork
2025-03-24 13:31 ` Bernatowicz, Marcin
2025-03-24 13:58 ` Bernatowicz, Marcin
2025-03-21 18:57 ` ✗ i915.CI.Full: " Patchwork
2025-03-24 13:32 ` Bernatowicz, Marcin
2025-03-24 14:00 ` [PATCH i-g-t] " Kamil Konieczny
2025-03-24 14:36 ` Kamil Konieczny
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=20250321095306.798153-1-marcin.bernatowicz@linux.intel.com \
--to=marcin.bernatowicz@linux.intel.com \
--cc=francois.dugast@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=lucas.demarchi@intel.com \
--cc=rodrigo.vivi@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