All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix dmesg ignore regexes with backslash escapes
@ 2026-10-07 21:05 Shuicheng Lin
  2026-10-07 21:06 ` [PATCH 1/4] tests/intel/xe_exec_reset: Fix gt reset fault dmesg ignore regex Shuicheng Lin
                   ` (7 more replies)
  0 siblings, 8 replies; 16+ messages in thread
From: Shuicheng Lin @ 2026-10-07 21:05 UTC (permalink / raw)
  To: igt-dev; +Cc: Shuicheng Lin

igt_emit_ignore_dmesg_regex() passes the regex to igt_runner through
/dev/kmsg, and the kernel escapes '\' as "\x5c" in kmsg records. Since
resultgen compiles the ignore regex from the escaped record, any regex
using a backslash escape, such as "\(-ECANCELED\)", silently never
matches. As a result, the expected errors in
xe_exec_reset@gt-reset-fault-injection are reported as dmesg-warn.

Patches 1-3 fix the affected tests by using bracket expressions instead
of backslash escapes, so they work with the current igt_runner:
 - xe_exec_reset: "\(" never matches, the expected GT reset failure and
   wedge errors leak.
 - xe_wedged: besides the CAT error escapes (and a missing space), the
   patterns no longer match the SIGID-based messages that newer kernels
   use for the GT reset failure and wedge.
 - xe_fault_injection: "\*ERROR\*" only matches by accident, as it
   degrades to "ERROR" with optional backslashes around it.

Patch 4 fixes igt_runner itself by decoding the kmsg escapes before
compiling the ignore regex, so future regexes can use backslash escapes
as written.

Tested on BMG with drm-tip: the expected errors are no longer reported
for xe_exec_reset@gt-reset-fault-injection and
xe_wedged@{basic-wedged,wedged-at-any-timeout}, and
the new igt_runner also ignores them with the unfixed xe_exec_reset.

Shuicheng Lin (4):
  tests/intel/xe_exec_reset: Fix gt reset fault dmesg ignore regex
  tests/intel/xe_wedged: Fix wedged dmesg ignore regex
  tests/intel/xe_fault_injection: Avoid backslash escapes in dmesg
    ignore regex
  runner/resultgen: Decode kmsg escapes in ignored dmesg regex

 .../json_tests_data/dmesg-escapes/0/dmesg.txt |  2 +
 .../json_tests_data/dmesg-escapes/README.txt  |  4 ++
 .../dmesg-escapes/reference.json              |  2 +-
 runner/resultgen.c                            | 48 ++++++++++++-------
 tests/intel/xe_exec_reset.c                   | 11 +++--
 tests/intel/xe_fault_injection.c              |  2 +-
 tests/intel/xe_wedged.c                       |  6 ++-
 7 files changed, 52 insertions(+), 23 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-10-08 22:50 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-07 21:05 [PATCH 0/4] Fix dmesg ignore regexes with backslash escapes Shuicheng Lin
2026-10-07 21:06 ` [PATCH 1/4] tests/intel/xe_exec_reset: Fix gt reset fault dmesg ignore regex Shuicheng Lin
2026-10-07 21:11   ` Cavitt, Jonathan
2026-10-08 15:07   ` Kamil Konieczny
2026-10-08 22:19     ` Lin, Shuicheng
2026-10-07 21:06 ` [PATCH 2/4] tests/intel/xe_wedged: Fix wedged " Shuicheng Lin
2026-10-08 14:33   ` Kamil Konieczny
2026-10-08 22:49     ` Lin, Shuicheng
2026-10-07 21:06 ` [PATCH 3/4] tests/intel/xe_fault_injection: Avoid backslash escapes in " Shuicheng Lin
2026-10-08 14:36   ` Kamil Konieczny
2026-10-07 21:06 ` [PATCH 4/4] runner/resultgen: Decode kmsg escapes in ignored dmesg regex Shuicheng Lin
2026-10-08 15:02   ` Kamil Konieczny
2026-10-07 21:56 ` ✓ i915.CI.BAT: success for Fix dmesg ignore regexes with backslash escapes Patchwork
2026-10-07 22:23 ` ✓ Xe.CI.BAT: " Patchwork
2026-10-08  2:12 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-10-08  6:19 ` ✓ i915.CI.Full: success " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.