Skip to content

Improve eudebug test cleanup

Christoph Manszewski igt-dev 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 0 repliesNew
  2. v45 patches 5 repliesSuperseded
  3. v35 patches 0 repliesSuperseded

Changes in v5 from the cover letter

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

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5tests/xe/xe_eudebug: Change pthread_join to pthread_timedjoin_nptests/intel/xe_eudebug.c+10 -30 replies
2/5lib/xe/xe_eudebug: Modify toggle error handlinglib/xe/xe_eudebug.c+19 -160 replies
3/5xe/xe_eudebug: Add reattach function and make plain connect privatelib/xe/xe_eudebug.c lib/xe/xe_eudebug.h tests/intel/xe_eudebug_online.c+48 -340 replies
4/5lib/xe/xe_eudebug: Track active debugger sessions and close when disablinglib/xe/xe_eudebug.c+72 -10 replies
5/5lib/xe/xe_eudebug: Get drm card sysfs pathlib/xe/xe_eudebug.c+36 -40 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchPiotr Rudnicki
1/5R-b
2/5R-b
3/5R-b
4/5R-b
5/5R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH i-g-t v5 0/5] Improve eudebug test cleanup

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(-)
Signature · 1 line
2.47.1