All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuicheng Lin <shuicheng.lin@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Shuicheng Lin <shuicheng.lin@intel.com>
Subject: [PATCH 0/4] Fix dmesg ignore regexes with backslash escapes
Date: Wed,  7 Oct 2026 21:05:59 +0000	[thread overview]
Message-ID: <20261007210603.1350158-1-shuicheng.lin@intel.com> (raw)

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


             reply	other threads:[~2026-10-07 21:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-07 21:05 Shuicheng Lin [this message]
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-07 21:06 ` [PATCH 2/4] tests/intel/xe_wedged: Fix wedged " Shuicheng Lin
2026-10-07 21:06 ` [PATCH 3/4] tests/intel/xe_fault_injection: Avoid backslash escapes in " Shuicheng Lin
2026-10-07 21:06 ` [PATCH 4/4] runner/resultgen: Decode kmsg escapes in ignored dmesg regex Shuicheng Lin
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261007210603.1350158-1-shuicheng.lin@intel.com \
    --to=shuicheng.lin@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.