[PATCH RFC v2 8/8] binman: test: assert optional blobs don't cause non-functionality
Yannic Moog
y.moog at phytec.de
Tue May 27 15:24:16 CEST 2025
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 at chromium.org>
Signed-off-by: Yannic Moog <y.moog at phytec.de>
---
tools/binman/ftest.py | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index d7deb3e68ce69c9c1a132f8f29cb71638646277a..31083c22bbf9e5898840505b0ffbd4512c61ae80 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -6506,6 +6506,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"""
@@ -6543,6 +6546,19 @@ fdt fdtmap Extract the devicetree blob from the fdtmap
err,
"Image '.*' is missing optional external blobs but is still functional: missing")
+ def testExtblobFakedOptional(self):
+ """Test an image with an external blob that is optional"""
+ with test_util.capture_sys_output() 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')
--
2.43.0
More information about the U-Boot
mailing list