summaryrefslogtreecommitdiff
path: root/tools/binman/bsection.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2018-07-06 10:27:17 -0600
committerSimon Glass <sjg@chromium.org>2018-07-09 09:11:00 -0600
commit736bb0aec80891891f3f86004e1afa7976585918 (patch)
tree0fc884fa334107d29956bb285eaff536c2c56beb /tools/binman/bsection.py
parentadc5701134f7041d7f767b672b66afb8b64ba5ce (diff)
downloadu-boot-736bb0aec80891891f3f86004e1afa7976585918.tar.gz
binman: Correct operation of ObtainContents()
This method is supposed to return the contents of an entry. However at present there is no check that it actually does. Also some implementations do not return 'True' to indicate success, as required. Add a check for things working as expected, and correct the implementations. This requires some additional test cases to cover things which were missed originally. Add these at the same time. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/binman/bsection.py')
-rw-r--r--tools/binman/bsection.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/binman/bsection.py b/tools/binman/bsection.py
index 3f30f6e4fe..06a6711350 100644
--- a/tools/binman/bsection.py
+++ b/tools/binman/bsection.py
@@ -162,6 +162,10 @@ class Section(object):
todo = next_todo
if not todo:
break
+ if todo:
+ self._Raise('Internal error: Could not complete processing of '
+ 'contents: remaining %s' % todo)
+ return True
def _SetEntryPosSize(self, name, pos, size):
"""Set the position and size of an entry