From b0a7e84ab20e23c1cbdc24e2b4deef9205626a46 Mon Sep 17 00:00:00 2001 From: Shubham Singh Date: Tue, 27 Oct 2026 16:47:11 +0530 Subject: [PATCH] log_parser: fix IndexError in parse_resv_mem_map() on ERROR lines 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 --- common/log_parser/standalone_tests/logs_to_json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/log_parser/standalone_tests/logs_to_json.py b/common/log_parser/standalone_tests/logs_to_json.py index 5102f427..cf0a8381 100755 --- a/common/log_parser/standalone_tests/logs_to_json.py +++ b/common/log_parser/standalone_tests/logs_to_json.py @@ -1123,7 +1123,7 @@ def parse_resv_mem_map(log_data): if line.startswith("ERROR: Memory Reservation Block"): reason_lines_mrb.append(line) - if "fully covered" in line: + if line.startswith("INFO:") and "fully covered" in line: if "Reserved-memory range" in line: pass_reasons_resv.append(line.split("INFO:", 1)[1].strip()) if "Memory Reservation Block" in line: