[PATCH i-g-t v2 2/2] /tests/intel/xe_eudebug_online: Remove vm_open_trigger on debugger reattachment.

Jan Sokolowski jan.sokolowski at intel.com
Thu Oct 24 12:08:51 UTC 2024


On debugger detach-and-reattach, discovery worker will replay events
that have occurred, which leads to a vm event being sent and
vm_open_trigger being re-run, which would lead to us trying
to open a removed vm.

On debugger reattach trigger, remove vm open trigger from list of
triggers.

Signed-off-by: Jan Sokolowski <jan.sokolowski at intel.com>
Reviewed-by: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
Signed-off-by: Dominik Grzegorzk <dominik.grzegorzek at intel.com>
---
 tests/intel/xe_eudebug_online.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/intel/xe_eudebug_online.c b/tests/intel/xe_eudebug_online.c
index 01ccf45eb..0ef0d8093 100644
--- a/tests/intel/xe_eudebug_online.c
+++ b/tests/intel/xe_eudebug_online.c
@@ -1785,6 +1785,12 @@ static void eu_attention_debugger_detach_trigger(struct xe_eudebug_debugger *d,
 	d->fd = ret;
 	d->target_pid = c_pid;
 
+	/* Discovery worker will replay events that have occurred, which leads to
+	 * a vm event being sent and vm_open_trigger being re-run, which would lead
+	 * to us trying to open a removed vm. Thus, remove this trigger from list.
+	 */
+	xe_eudebug_debugger_remove_trigger(d, DRM_XE_EUDEBUG_EVENT_VM, vm_open_trigger);
+
 	/* Let the discovery worker discover resources */
 	sleep(2);
 
-- 
2.34.1



More information about the igt-dev mailing list