Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/xe_fault_injection: Ignore all errors while injecting fault
@ 2025-05-29 13:31 Satyanarayana K V P
  2025-05-29 14:22 ` Cavitt, Jonathan
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Satyanarayana K V P @ 2025-05-29 13:31 UTC (permalink / raw)
  To: igt-dev
  Cc: Satyanarayana K V P, Michal Wajdeczko, Francois Dugast,
	Jonathan Cavitt, John Harrison

Currently, numerous fault messages have been included in the dmesg ignore list,
and this list continues to expand. Each time a new fault injection point is
introduced or a new feature is activated, additional fault messages appear,
making it cumbersome to manage the dmesg ignore list.

This new patch automatically ignores all error messages from dmesg, eliminating
the need to add or maintain a dmesg ignore message list.

Signed-off-by: Satyanarayana K V P <satyanarayana.k.v.p@intel.com>
---
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Francois Dugast <francois.dugast@intel.com>
Cc: Jonathan Cavitt <jonathan.cavitt@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
---
 tests/intel/xe_fault_injection.c | 35 +++++++-------------------------
 1 file changed, 7 insertions(+), 28 deletions(-)

diff --git a/tests/intel/xe_fault_injection.c b/tests/intel/xe_fault_injection.c
index f9bd5c761..0dffbe5da 100644
--- a/tests/intel/xe_fault_injection.c
+++ b/tests/intel/xe_fault_injection.c
@@ -64,30 +64,9 @@ static int fail_function_open(void)
 	return debugfs_fail_function_dir_fd;
 }
 
-static bool function_is_part_of_guc(const char function_name[])
+static void ignore_faults_in_dmesg(void)
 {
-	return strstr(function_name, "_guc_") != NULL ||
-	       strstr(function_name, "_uc_") != NULL ||
-	       strstr(function_name, "_wopcm_") != NULL;
-}
-
-static void ignore_faults_in_dmesg(const char function_name[])
-{
-	/* Driver probe is expected to fail in all cases, so ignore in igt_runner */
-	char regex[1024] = "probe with driver xe failed with error -12";
-
-	/*
-	 * If GuC module fault is injected, GuC is expected to fail,
-	 * so also ignore GuC init failures in igt_runner.
-	 */
-	if (function_is_part_of_guc(function_name)) {
-		strcat(regex, "|GT[0-9a-fA-F]*: GuC init failed with -ENOMEM");
-		strcat(regex, "|GT[0-9a-fA-F]*: Failed to initialize uC .-ENOMEM");
-		strcat(regex, "|GT[0-9a-fA-F]*: Failed to enable GuC CT	.-ENOMEM");
-		strcat(regex, "|GT[0-9a-fA-F]*: GuC PC query task state failed:	-ENOMEM");
-	}
-
-	igt_emit_ignore_dmesg_regex(regex);
+	igt_emit_ignore_dmesg_regex(".*");
 }
 
 /*
@@ -234,7 +213,7 @@ inject_fault_probe(int fd, char pci_slot[], const char function_name[])
 	igt_info("Injecting error \"%s\" (%d) in function \"%s\"\n",
 		 strerror(-INJECT_ERRNO), INJECT_ERRNO, function_name);
 
-	ignore_faults_in_dmesg(function_name);
+	ignore_faults_in_dmesg();
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
 
@@ -299,7 +278,7 @@ exec_queue_create_fail(int fd, struct drm_xe_engine_class_instance *instance,
 	igt_assert_eq(__xe_exec_queue_create(fd, vm, 1, 1, instance, 0, &exec_queue_id), 0);
 	xe_exec_queue_destroy(fd, exec_queue_id);
 
-	ignore_faults_in_dmesg(function_name);
+	ignore_faults_in_dmesg();
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
 	igt_assert(__xe_exec_queue_create(fd, vm, 1, 1, instance, 0, &exec_queue_id) != 0);
@@ -334,7 +313,7 @@ vm_create_fail(int fd, const char function_name[], unsigned int flags)
 {
 	igt_assert_eq(simple_vm_create(fd, flags), 0);
 
-	ignore_faults_in_dmesg(function_name);
+	ignore_faults_in_dmesg();
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
 	igt_assert(simple_vm_create(fd, flags) != 0);
@@ -397,7 +376,7 @@ vm_bind_fail(int fd, const char function_name[])
 
 	igt_assert_eq(simple_vm_bind(fd, vm), 0);
 
-	ignore_faults_in_dmesg(function_name);
+	ignore_faults_in_dmesg();
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
 	igt_assert(simple_vm_bind(fd, vm) != 0);
@@ -445,7 +424,7 @@ oa_add_config_fail(int fd, int sysfs, int devid, const char function_name[])
 	igt_assert(igt_sysfs_scanf(sysfs, path, "%" PRIu64, &config_id) == 1);
 	igt_assert_eq(intel_xe_perf_ioctl(fd, DRM_XE_OBSERVATION_OP_REMOVE_CONFIG, &config_id), 0);
 
-	ignore_faults_in_dmesg(function_name);
+	ignore_faults_in_dmesg();
 	injection_list_add(function_name);
 	set_retval(function_name, INJECT_ERRNO);
 	igt_assert_lt(intel_xe_perf_ioctl(fd, DRM_XE_OBSERVATION_OP_ADD_CONFIG, &config), 0);
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2025-06-02 21:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-29 13:31 [PATCH i-g-t] tests/intel/xe_fault_injection: Ignore all errors while injecting fault Satyanarayana K V P
2025-05-29 14:22 ` Cavitt, Jonathan
2025-05-29 16:23 ` Daniele Ceraolo Spurio
2025-05-29 20:29   ` Michal Wajdeczko
2025-06-02 18:25     ` Daniele Ceraolo Spurio
2025-06-02 18:30       ` Cavitt, Jonathan
2025-06-02 20:31         ` Daniele Ceraolo Spurio
2025-06-02 21:09           ` Cavitt, Jonathan
2025-06-02 21:31           ` Lucas De Marchi
2025-05-29 18:40 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2025-05-29 20:14 ` [PATCH i-g-t] " Michal Wajdeczko
2025-05-29 21:48   ` Cavitt, Jonathan
2025-05-30 17:39     ` Kamil Konieczny
2025-06-02 13:00     ` Michal Wajdeczko
2025-06-02 15:17       ` Cavitt, Jonathan
2025-05-30 17:38 ` Kamil Konieczny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox