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

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.

Open:
The last commit changes the sysfs path logging from:
'/sys/dev/char/<X>:<Y>' to '/sys/class/drm/card<N>' aligning it closer
to the device identification employed by IGT, but involves some
hand-rolling over using builtin helpers. Please share whether it can be
improved or even is worth including.

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)

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             | 215 +++++++++++++++++++++++++-------
 lib/xe/xe_eudebug.h             |   2 +-
 tests/intel/xe_eudebug.c        |  13 +-
 tests/intel/xe_eudebug_online.c |   6 +-
 4 files changed, 182 insertions(+), 54 deletions(-)

-- 
2.47.1


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

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

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-20 15:37 [PATCH i-g-t v4 0/5] Improve eudebug test cleanup Christoph Manszewski
2026-02-20 15:37 ` [PATCH i-g-t v4 1/5] tests/xe/xe_eudebug: Change pthread_join to pthread_timedjoin_np Christoph Manszewski
2026-03-10 12:57   ` Rudnicki, Piotr
2026-02-20 15:37 ` [PATCH i-g-t v4 2/5] lib/xe/xe_eudebug: Modify toggle error handling Christoph Manszewski
2026-03-10 12:57   ` Rudnicki, Piotr
2026-02-20 15:37 ` [PATCH i-g-t v4 3/5] xe/xe_eudebug: Add reattach function and make plain connect private Christoph Manszewski
2026-03-10 12:58   ` Rudnicki, Piotr
2026-02-20 15:37 ` [PATCH i-g-t v4 4/5] lib/xe/xe_eudebug: Track active debugger sessions and close when disabling Christoph Manszewski
2026-03-10 11:17   ` Rudnicki, Piotr
2026-02-20 15:37 ` [PATCH i-g-t v4 5/5] lib/xe/xe_eudebug: Get drm card sysfs path Christoph Manszewski
2026-03-10 12:59   ` Rudnicki, Piotr
2026-02-20 20:43 ` ✓ Xe.CI.BAT: success for Improve eudebug test cleanup (rev4) Patchwork
2026-02-20 21:30 ` ✓ i915.CI.BAT: " Patchwork
2026-02-21  8:55 ` ✗ i915.CI.Full: failure " Patchwork
2026-02-23  9:58 ` ✗ Xe.CI.FULL: " Patchwork

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