Fix empty _report fields and add comprehensive validation for kernel error parsing#24
Open
padovan wants to merge 3 commits into
Open
Fix empty _report fields and add comprehensive validation for kernel error parsing#24padovan wants to merge 3 commits into
padovan wants to merge 3 commits into
Conversation
added 3 commits
August 20, 2025 18:50
When kernel BUG or panic reports don't have standard '---[ end trace' markers, the _report field remained empty even though the error was parsed successfully. This fix adds self._report = text[:report_end] in the fallback logic for both KernelBug and KernelPanic classes when report_end is calculated but no end marker is found. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
This test case covers BUG reports without end trace markers, which is the scenario fixed by the previous commit for empty _report fields. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Implement position-based validation testing for _report field content across all linux_boot log files. This ensures the parser correctly extracts detailed error information for various kernel error types, preventing regressions in _report field extraction and ensures consistent error debugging information across all supported log formats. 🤖 Generated with AI help. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
ba46366 to
0663cb7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a critical issue where _report fields in kernel BUG and panic reports were empty when logs lacked standard end trace markers, and adds comprehensive test coverage to prevent future regressions.
When parsing kernel logs using ./logspec.py --json-full, the _report fields for KernelBug and KernelPanic errors were coming up empty for logs without standard ---[ end trace markers. This meant valuable debugging information (call traces, hardware details, register dumps) was being lost even though the errors were successfully detected.
Fixed empty _report fields in KernelBug and KernelPanic parsers by adding fallback logic when end trace markers are missing.
Also added test coverage for the _report field in all linux_boot files.