Skip to content

fix/highlight log errors - #2082

Open
alanpeixinho wants to merge 4 commits into
kernelci:mainfrom
profusion:fix/highlight-log-errors
Open

alanpeixinho wants to merge 4 commits into
kernelci:mainfrom
profusion:fix/highlight-log-errors

Conversation

@alanpeixinho

@alanpeixinho alanpeixinho commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

fix(log-viewer): reduce highlight false positives and clarify counts (#2065, #2066)

Closes #2065
Closes #2066

What it is

30-day DB analysis (36k test excerpts):

Filter Lines removed
error_mode ~6,300
_0_errors 852
Total ~7,150 → 0 false positives

How to Test

  • PASS test with error_mode or _0_errors in log — no highlight counts
  • Chips show Suspected fail/error with heuristic tooltip
  • kselftest # Totals: lines still highlight when they report real failures

* Match fail with word boundary to exclude pipefail
* Skip error_mode and _0_errors in LAVA test names
* Skip kselftest # Totals: header lines
* Extend highlight tests for filtered cases

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
* Rename chips to Suspected fail, Suspected error, Other matches
* Add tooltip that heuristic counts may not match test status
* Update locale strings

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
Comment on lines +170 to +172
newCode = newCode.replace(/^.*(error|\bfail).*$/gim, match => {
if (/^\s*# Totals:/i.test(match)) {
return match;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't get this. What I see in database is:

# # Totals: pass:1 fail:0 ...

and

[timestamp] # Totals: ...

I don't see what this line wants to match

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. This was incorrect, and to be fair, might not be worth including.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am keeping only the error_mode and _0_errors false positives here.

Signed-off-by: Alan Peixinho <alan.peixinho@profusion.mobi>
@felipebergamin

felipebergamin commented Sep 10, 2026

Copy link
Copy Markdown
Member

not sure if we should highlight this line:

# # Totals: pass:6 fail:0 xfail:0 xpass:0 skip:0 error:0

and

# Check failure of execveat(11, '', 0) with ENOENT... [OK]

maybe we should also try to make clear what the blue logs mean. I think they are the "Other matches", but if this is the case we should use the same color on counter badge below

image image

* Strip `fail:0` / `error:0` in the existing noise-removal step
* Remove "Other matches" chip; only highlight suspected fail/error
* Leave ambiguous keyword lines unhighlighted
* Derive `highlightCount` from `fails + errors`
* Extend tests for kselftest totals, xfail, and interleaved lines

Closes kernelci#2065
Closes kernelci#2066
@alanpeixinho

Copy link
Copy Markdown
Contributor Author

Updated to remove the "other matches" section.
With a regex to deal with skipping lines with fail/error 0.
cc: @felipebergamin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Log viewer: improve wording Log viewer: exclude "pipefail" from the highlight heuristic

2 participants