summaryrefslogtreecommitdiff
path: root/tools/binman/ftest.py
diff options
context:
space:
mode:
authorYannic Moog <y.moog@phytec.de>2025-06-13 14:02:45 +0200
committerTom Rini <trini@konsulko.com>2025-06-26 09:54:05 -0600
commit0dbb0a8d1f2aefb2a7fdd8e627edd955e4fe8d3a (patch)
treeeb767bca9ed5d460b5e4cde82ecb68fe33076a77 /tools/binman/ftest.py
parente749d64b4622806072c56a839cf9a36a5081b575 (diff)
binman: test: assert optional blobs don't cause non-functionality
When external blobs are marked optional, they should not cause a build to fail. Extend the test cases for FitTeeOsOptional and ExtblobOptional. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Yannic Moog <y.moog@phytec.de> Reviewed-by: Bryan Brattlof <bb@ti.com>
Diffstat (limited to 'tools/binman/ftest.py')
-rw-r--r--tools/binman/ftest.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 32e1e0a14c0..bedfcb53c48 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -6518,6 +6518,9 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self.assertRegex(
err,
"Image '.*' is missing optional external blobs but is still functional: tee-os")
+ self.assertNotRegex(
+ err,
+ "Image '.*' has faked external blobs and is non-functional: tee-os")
def testFitTeeOsOptionalFitBad(self):
"""Test an image with a FIT with an optional OP-TEE binary"""
@@ -6551,6 +6554,19 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
self.assertEqual(REFCODE_DATA, data)
self.assertNotIn(MISSING_DATA, data)
+ def testExtblobFakedOptional(self):
+ """Test an image with an external blob that is optional"""
+ with terminal.capture() as (stdout, stderr):
+ data = self._DoReadFile('266_blob_ext_opt.dts')
+ self.assertEqual(REFCODE_DATA, data)
+ err = stderr.getvalue()
+ self.assertRegex(
+ err,
+ "Image '.*' is missing optional external blobs but is still functional: missing")
+ self.assertNotRegex(
+ err,
+ "Image '.*' has faked external blobs and is non-functional: missing")
+
def testSectionInner(self):
"""Test an inner section with a size"""
data = self._DoReadFile('267_section_inner.dts')