Skip to content

log_parser: Fix IndexError in parse_resv_mem_map() on ERROR lines - #824

Merged
chetan-rathore merged 1 commit into
ARM-software:mainfrom
Singh-Shubham-qcom:fix/resv-mem-map-parser-indexerror
Oct 29, 2026
Merged

chetan-rathore merged 1 commit into
ARM-software:mainfrom
Singh-Shubham-qcom:fix/resv-mem-map-parser-indexerror

Conversation

@Singh-Shubham-qcom

Copy link
Copy Markdown
Contributor

reserved_memory_map_checker.py prints both INFO (pass) and ERROR (fail) lines containing the substring "fully covered":

INFO: Reserved-memory range ... is fully covered by ...
ERROR: Reserved-memory range ... is not fully covered by ...

parse_resv_mem_map() matched on "fully covered" alone, so ERROR lines also entered the INFO-only branch, where
line.split("INFO:", 1)[1] raised IndexError (no "INFO:" substring to split on). This crashed logs_to_json.py and made the RESERVED_MEMORY_MAP suite get reported as "not run" instead of its actual result.

Restrict the match to lines starting with "INFO:" so only pass-case lines take this path. ERROR lines are unaffected and continue to be captured by the existing line.startswith("ERROR: Reserved-memory") check above.

reserved_memory_map_checker.py prints both INFO (pass) and ERROR
(fail) lines containing the substring "fully covered":

  INFO:  Reserved-memory range ... is fully covered by ...
  ERROR: Reserved-memory range ... is not fully covered by ...

parse_resv_mem_map() matched on "fully covered" alone, so ERROR
lines also entered the INFO-only branch, where
line.split("INFO:", 1)[1] raised IndexError (no "INFO:" substring
to split on). This crashed logs_to_json.py and made the
RESERVED_MEMORY_MAP suite get reported as "not run" instead of its
actual result.

Restrict the match to lines starting with "INFO:" so only pass-case
lines take this path. ERROR lines are unaffected and continue to be
captured by the existing line.startswith("ERROR: Reserved-memory")
check above.

Signed-off-by: Shubham Singh <shubna@qti.qualcomm.com>

@chetan-rathore chetan-rathore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution.

@chetan-rathore chetan-rathore left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the contribution.

@chetan-rathore
chetan-rathore merged commit 13169d0 into ARM-software:main Oct 29, 2026
2 checks passed
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