[PATCH i-g-t v5] tests/intel/xe_fault_injection: Suppress Guc CT dumps during fault injection

Satyanarayana K V P satyanarayana.k.v.p at intel.com
Thu Jun 12 08:15:24 UTC 2025


When injecting fault to xe_guc_ct_send_recv() & xe_guc_mmio_send_recv()
functions, the CI test systems are going out of space and crashing. To
avoid this issue, a new helper function is created and when fault is
injected into this xe_should_fail_ct_dead_capture() helper function,
ct dead capture is avoided which suppresses ct dumps in the log.

Inject fault into xe_should_fail_ct_dead_capture() function along with
xe_guc_ct_send_recv() & xe_guc_mmio_send_recv() to suppress GUC ct dumps.

Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p at intel.com>
Suggested-by: John Harrison <John.C.Harrison at Intel.com>
Cc: Jonathan Cavitt <jonathan.cavitt at intel.com>
Cc: Francois Dugast <francois.dugast at intel.com>
---
Same as https://patchwork.freedesktop.org/series/148416/ which was
reverted due to change from XE was still in review.

V4 -> V5:
- Fixed review comments (Jonathan).

Test-with: 20250612080402.22011-1-satyanarayana.k.v.p at intel.com
---
 tests/intel/xe_fault_injection.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
index aa3a3a7c2..8245c558c 100644
--- a/tests/intel/xe_fault_injection.c
+++ b/tests/intel/xe_fault_injection.c
@@ -113,6 +113,22 @@ static void injection_list_add(const char function_name[])
 	close(dir);
 }
 
+static void injection_list_append(const char function_name[])
+{
+	int dir, fd, ret;
+
+	dir = fail_function_open();
+	igt_assert_lte(0, dir);
+
+	fd = openat(dir, "inject", O_WRONLY | O_APPEND);
+	igt_assert_lte(0, fd);
+	ret = write(fd, function_name, strlen(function_name));
+	igt_assert_lte(0, ret);
+
+	close(fd);
+	close(dir);
+}
+
 static void injection_list_remove(const char function_name[])
 {
 	int dir;
@@ -192,6 +208,18 @@ static void set_retval(const char function_name[], long long retval)
 	close(dir);
 }
 
+static void ignore_fail_dump_in_dmesg(const char function_name[], bool enable)
+{
+	if (strstr(function_name, "send_recv")) {
+		if (enable) {
+			injection_list_append("xe_is_injection_active");
+			set_retval("xe_is_injection_active", INJECT_ERRNO);
+		} else {
+			injection_list_remove("xe_is_injection_active");
+		}
+	}
+}
+
 /**
  * SUBTEST: inject-fault-probe-function-%s
  * Description: inject an error in the injectable function %arg[1] then
@@ -227,11 +255,13 @@ inject_fault_probe(int fd, const char pci_slot[], const char function_name[])
 	ignore_dmesg_errors_from_dut(pci_slot);
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
+	ignore_fail_dump_in_dmesg(function_name, true);
 
 	igt_kmod_bind("xe", pci_slot);
 
 	err = -errno;
 	injection_list_remove(function_name);
+	ignore_fail_dump_in_dmesg(function_name, false);
 
 	return err;
 }
-- 
2.43.0



More information about the igt-dev mailing list