tools: binman: control.py: Delete template nodes after parsing
authorNeha Malcom Francis <n-francis@ti.com>
Mon, 17 Mar 2025 04:54:20 +0000 (10:24 +0530)
committerTom Rini <trini@konsulko.com>
Thu, 3 Apr 2025 17:37:45 +0000 (11:37 -0600)
commit42ce9ed7ffef726640fa234966e8c36d39252422
tree5bcfdfbfea9fe9f3e057ff1a74a487669c97d6f8
parent0e1fc465fea62ebae91f2f56cb823e8b37ee1077
tools: binman: control.py: Delete template nodes after parsing

Dynamically going through the subnode array and deleting leads to
templates being skipped from deletion when templates are consecutive in
the subnode list. Prevent this from happening by first parsing the DT
and then deleting the nodes. Add a testcase as well for this cornercase.

Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
tools/binman/control.py
tools/binman/ftest.py
tools/binman/test/346_remove_template.dts [new file with mode: 0644]