public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v5 0/5] Improve eudebug test cleanup
@ 2026-03-11 11:06 Christoph Manszewski
  2026-03-11 11:06 ` [PATCH i-g-t v5 1/5] tests/xe/xe_eudebug: Change pthread_join to pthread_timedjoin_np Christoph Manszewski
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Christoph Manszewski @ 2026-03-11 11:06 UTC (permalink / raw)
  To: igt-dev; +Cc: Piotr Rudnicki, Dominik Karol Piątkowski, Jan Sokolowski

When there is a debugger fd open and an assert fails, there is a problem
with environment cleanup. If enable_eudebug toggle was previously off,
it is impossible to turn it off in case there is _any_ open debugger fd.

Keep track of all opened debugger fds in lib/xe_eudebug and close any
leftover ones before attempting to restore enable_eudebug state.

Change pthread_join to pthread_timedjoin_np in discovery-race* and
discoery-empty* tests to avoid hang before reaching cleanup.

Add retry mechanism in xe_eudebug_enable to allow the postclose handler
to finish. Abort on unsuccessful cleanup to not leave the environment
in potentially dirty state.

v2:
- Preserve skip behavior in xe_eudebug_enable

v3:
- Improve xe_eudebug_enable logging
- Move session tracking to lib/xe_eudebug
- Use timedjoin in discovery-empty*

v4:
- fix commit msg typo (Dominik)
- remove wrong 'debugger reconnected' log that was printed also for
  initial connection and change code reuse/organization for
  attach/reattach functions (Dominik)

v5:
- move assertion and list entry creation out of critical section (Piotr)

Christoph Manszewski (3):
  xe/xe_eudebug: Add reattach function and make plain connect private
  lib/xe/xe_eudebug: Track active debugger sessions and close when
    disabling
  lib/xe/xe_eudebug: Get drm card sysfs path

Dominik Karol Piątkowski (2):
  tests/xe/xe_eudebug: Change pthread_join to pthread_timedjoin_np
  lib/xe/xe_eudebug: Modify toggle error handling

 lib/xe/xe_eudebug.c             | 214 +++++++++++++++++++++++++-------
 lib/xe/xe_eudebug.h             |   2 +-
 tests/intel/xe_eudebug.c        |  13 +-
 tests/intel/xe_eudebug_online.c |   6 +-
 4 files changed, 181 insertions(+), 54 deletions(-)

-- 
2.47.1


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

end of thread, other threads:[~2026-03-12 19:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 11:06 [PATCH i-g-t v5 0/5] Improve eudebug test cleanup Christoph Manszewski
2026-03-11 11:06 ` [PATCH i-g-t v5 1/5] tests/xe/xe_eudebug: Change pthread_join to pthread_timedjoin_np Christoph Manszewski
2026-03-11 11:06 ` [PATCH i-g-t v5 2/5] lib/xe/xe_eudebug: Modify toggle error handling Christoph Manszewski
2026-03-11 11:06 ` [PATCH i-g-t v5 3/5] xe/xe_eudebug: Add reattach function and make plain connect private Christoph Manszewski
2026-03-11 11:06 ` [PATCH i-g-t v5 4/5] lib/xe/xe_eudebug: Track active debugger sessions and close when disabling Christoph Manszewski
2026-03-11 11:06 ` [PATCH i-g-t v5 5/5] lib/xe/xe_eudebug: Get drm card sysfs path Christoph Manszewski
2026-03-12  0:04 ` ✓ Xe.CI.BAT: success for Improve eudebug test cleanup (rev5) Patchwork
2026-03-12  0:07 ` ✓ i915.CI.BAT: " Patchwork
2026-03-12 19:08 ` ✓ i915.CI.Full: " Patchwork
2026-03-12 19:10 ` ✗ Xe.CI.FULL: failure " Patchwork

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