Skip to content

json2logs: fix warn status treated as failure and sanitize FQN filename - #106

Closed
AshWizard wants to merge 1 commit into
linux-test-project:masterfrom
AshWizard:suggest-fix-json2logs
Closed

json2logs: fix warn status treated as failure and sanitize FQN filename#106
AshWizard wants to merge 1 commit into
linux-test-project:masterfrom
AshWizard:suggest-fix-json2logs

Conversation

@AshWizard

Copy link
Copy Markdown

The condition status not in ("pass", "conf") treated warn tests as
failures, writing them to fails.log and generating .fail.log files.
Changed to status in ("fail", "brok") so only actual failures and
broken tests are reported.

Also replace "/" in test FQN before using it as a filename to avoid
creating unintended subdirectories.

Signed-off-by: Michael Menasherov mmenashe@redhat.com

  The condition `status not in ("pass", "conf")` treated warn tests as
  failures, writing them to fails.log and generating .fail.log files.
  Changed to `status in ("fail", "brok")` so only actual failures and
  broken tests are reported.

  Also replace "/" in test FQN before using it as a filename to avoid
  creating unintended subdirectories.

  Signed-off-by: Michael Menasherov <mmenashe@redhat.com>
@metan-ucw

Copy link
Copy Markdown
Member

This tooling merely follows exactly same logic the old ltp-pan had. I.e. any process that exists with non-zero either goes into toconfcmdfile if the test did exit only with TCONF in it mask and otherwise it goes to failcmdfile.

Since this is compatibility layer that is supposed to exactly mimic the old runltp + ltp-pan we do not want to change this.

Also warnings in LTP are usually produced for serious enough errors, e.g. cleanup failed to restore the system, and tests that produce warnings shouldn't be considered as passed. Hiding them is not a good idea overall.

@metan-ucw metan-ucw closed this Aug 20, 2026
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.

2 participants