Hi Quentin, On Tue, 30 Aug 2022 at 03:57, Quentin Schulz <quentin.sch...@theobroma-systems.com> wrote: > > Hi Simon, > > On 8/27/22 02:21, Simon Glass wrote: > > Hi Quentin, > > > > On Fri, 26 Aug 2022 at 09:37, Quentin Schulz <foss+ub...@0leil.net> wrote: > >> > >> From: Quentin Schulz <quentin.sch...@theobroma-systems.com> > >> > >> Some image types handled by mkimage require the datafiles to be passed > >> independently (-d data1:data2) for specific handling of each. A > >> concatenation of datafiles prior to passing them to mkimage wouldn't > >> work. > >> > >> That is the case for rkspi for example which requires page alignment > >> and only writing 2KB every 4KB. > >> > >> This adds the ability to tell binman to pass the datafiles without > >> prior concatenation to mkimage, by adding the multiple-data-files > >> boolean property to the mkimage node. > >> > >> Cc: Quentin Schulz <foss+ub...@0leil.net> > >> Reviewed-by: Simon Glass <s...@chromium.org> > >> Signed-off-by: Quentin Schulz <quentin.sch...@theobroma-systems.com> > >> --- > >> > >> v5: > >> - changed to use full path from input dir with tools.get_input_filename > >> to make it possible to run the unit tests, > >> - added unit test, > >> > >> > >> tools/binman/entries.rst | 22 ++++++++++ > >> tools/binman/etype/mkimage.py | 41 +++++++++++++++++-- > >> tools/binman/ftest.py | 16 ++++++++ > > > > Please put the new test at the end. > > > >> .../test/241_mkimage_multiple_data_files.dts | 21 ++++++++++ > >> 4 files changed, 96 insertions(+), 4 deletions(-) > >> create mode 100644 tools/binman/test/241_mkimage_multiple_data_files.dts > > > > This is pretty close but it still missing a line of test coverage. > > Please try 'binman test -T' to see it. I'd also prefer a shorter > > This does not work on Fedora. > 1) there's no python3-coverage binary available, > 2) After replacing python3-coverage with just coverage, the tests are > stuck and never finish, (I have seen the patches to use COVERAGE > environment variable so I guess the required changes might be tackled > soon in master), > > Any tip on how to identify which test is stuck except going through them > one by one?
One way is to add comment blocks '''...''' across the ftest.py file, using a binary chop to identify the problem. Or, since tests are run in series, you could hack test_util to pass verbose parameters when it runs the tests - see 'cmd =' in run_test_coverage(). > > python3-coverage is also not available in the container image built from > tools/docker/Dockerfile. does 'python3 -m coverage' work? or this: https://coverage.readthedocs.io/en/6.3.2/install.html > > > filename for the 241 file. > > > > I've pushed a tree containing a suggested fix (updating this patch). I > > can update it when applying if you like, otherwise please send a new > > version. > > > > Where did you push the tree? Sorry I forgot to mention that: https://github.com/sjg20/u-boot/tree/try-rk4 Regards, SImon