[PATCH] binman: Fill in most of the imx8mimage and imx8mcst tests

Simon Glass sjg at chromium.org
Mon Jan 6 15:38:38 CET 2025


Hi Marek,

On Sun, 5 Jan 2025 at 13:37, Marek Vasut <marex at denx.de> wrote:
>
> Rename the test .dts and tests and include the M suffix to indicate
> those tests are for i.MX8M, not for i.MX8, which is a different SoC.
>
> Update 339_nxp_imx8m.dts, add testNxpImx8MImageMkimageMissing and
> update nxp_imx8mimage.py test to bring nxp_imx8mimage test to 100% .
>
> Add 343..345_nxp_imx8m.dts, add matching tests and update nxp_imx8mcst.py
> to bring CST tests to 97% . It is not clear how to test the CST output
> file to reach 100%.
>
> Signed-off-by: Marek Vasut <marex at denx.de>
> ---
> Cc: Brian Ruley <brian.ruley at gehealthcare.com>
> Cc: Paul HENRYS <paul.henrys_ext at softathome.com>
> Cc: Rasmus Villemoes <ravi at prevas.dk>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Tim Harvey <tharvey at gateworks.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
>  tools/binman/etype/nxp_imx8mcst.py            |  4 --
>  tools/binman/etype/nxp_imx8mimage.py          |  4 --
>  tools/binman/ftest.py                         | 42 +++++++++++++++++--
>  .../{339_nxp_imx8.dts => 339_nxp_imx8m.dts}   |  3 ++
>  tools/binman/test/343_nxp_imx8m.dts           | 26 ++++++++++++
>  tools/binman/test/344_nxp_imx8m.dts           | 28 +++++++++++++
>  tools/binman/test/345_nxp_imx8m.dts           | 19 +++++++++
>  7 files changed, 115 insertions(+), 11 deletions(-)
>  rename tools/binman/test/{339_nxp_imx8.dts => 339_nxp_imx8m.dts} (93%)
>  create mode 100644 tools/binman/test/343_nxp_imx8m.dts
>  create mode 100644 tools/binman/test/344_nxp_imx8m.dts
>  create mode 100644 tools/binman/test/345_nxp_imx8m.dts
>

Thanks for looking at this! For me I get an error when applying to -next:

$binman test
======================== Running binman tests ========================
............................................................................................................................................................................................................................................................................E................................E.................................E.....................................................................................................................E...............................................................................................................................
======================================================================
ERROR: binman.ftest.TestFunctional.testNxpImx8MCSTSPL (subunit.RemotedTestCase)
binman.ftest.TestFunctional.testNxpImx8MCSTSPL
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
ValueError: Error 1 running 'cst -i
/tmp/binman.kv3d4uif/nxp.csf-config-txt.nxp-imx8mcst -o
/tmp/binman.kv3d4uif/nxp.csf-output-blob.nxp-imx8mcst': Install SRK
File not present SRK_1_2_3_4_table.bin


======================================================================
ERROR: binman.ftest.TestFunctional.testNxpImx8MCSTFIT (subunit.RemotedTestCase)
binman.ftest.TestFunctional.testNxpImx8MCSTFIT
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
ValueError: Error 1 running 'cst -i
/tmp/binman.jh5hnl3s/nxp.csf-config-txt.nxp-imx8mcst -o
/tmp/binman.jh5hnl3s/nxp.csf-output-blob.nxp-imx8mcst': Install SRK
File not present SRK_1_2_3_4_table.bin


======================================================================
ERROR: binman.ftest.TestFunctional.testSimpleFitEncryptedData
(subunit.RemotedTestCase)
binman.ftest.TestFunctional.testSimpleFitEncryptedData
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
KeyError: 'iv'


======================================================================
ERROR: binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing
(subunit.RemotedTestCase)
binman.ftest.TestFunctional.testNxpImx8MCSTMkimageMissing
----------------------------------------------------------------------
testtools.testresult.real._StringException: Traceback (most recent call last):
struct.error: unpack requires a buffer of 4 bytes


----------------------------------------------------------------------
Ran 581 tests in 1.784s

FAILED (errors=4)


I wonder if the cst needs to be updated (binman tool -f cst)? At
present it is using apt-get and has:

$ dpkg -l imx-code-signing-tool
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                  Version             Architecture Description
+++-=====================-===================-============-===================================
ii  imx-code-signing-tool 3.3.1+dfsg-2ubuntu1 amd64        code
signing tool for i.MX platform

Regards,
SImon


More information about the U-Boot mailing list