[PATCH v2] test: boot: Add test for bootmeth_rauc
    Tom Rini 
    trini at konsulko.com
       
    Tue Oct 14 16:17:05 CEST 2025
    
    
  
On Tue, Oct 14, 2025 at 08:31:12AM +0000, Martin Schwan wrote:
> Hi Tom,
> 
> On Mon, 2025-10-13 at 15:08 -0600, Tom Rini wrote:
> > On Thu, Oct 09, 2025 at 09:06:12AM +0200, Martin Schwan wrote:
> > 
> > > Add a simple unit test for testing the RAUC bootmethod. Provide
> > > only the
> > > very basic tests for now, running a scan and list, to verify
> > > correct
> > > detection of the RAUC bootmethod. More advanced boot tests of this
> > > bootmethod can be added in a separate patch.
> > > 
> > > This requires another mmc image (mmc9) to contain the following
> > > partitions:
> > > 
> > > 1. boot A: contains a dummy boot.scr
> > > 2. root A: contains an empty root filesystem
> > > 3. boot B: contains a dummy boot.scr
> > > 4. root B: contains an empty root filesystem
> > > 
> > > The bootmeth_rauc scans all four partitions for existence and
> > > expects a
> > > boot script in each boot partition.
> > > 
> > > Also add BOOTMETH_RAUC as a dependency on sandbox so that we can
> > > test
> > > this with:
> > > 
> > > $ ./test/py/test.py -B sandbox --build -k test_ut # build the
> > > mmc9.img
> > > $ ./test/py/test.py -B sandbox --build -k bootflow_rauc
> > > 
> > > Signed-off-by: Martin Schwan <m.schwan at phytec.de>
> > > ---
> > > Changes in v2:
> > > - Use mk_fs() instead of calling fallocate/mkfs/mcopy individually
> > > for
> > >   the boot and root partitions in mmc9.img
> > > - Link to v1:
> > > https://lore.kernel.org/r/20251008-wip-bootmeth-rauc-tests-v1-1-3da21a731524@phytec.de
> > > ---
> > >  arch/sandbox/dts/test.dts |  8 +++++++
> > >  configs/sandbox_defconfig |  1 +
> > >  test/boot/bootflow.c      | 57
> > > +++++++++++++++++++++++++++++++++++++++++++++++
> > >  test/py/tests/test_ut.py  | 44
> > > ++++++++++++++++++++++++++++++++++++
> > >  4 files changed, 110 insertions(+)
> > 
> > This doesn't work now:
> > =================================== FAILURES
> > ===================================
> > ___________________________ test_ut_dm_init_bootstd
> > ____________________________
> > test/py/tests/test_ut.py:604: in test_ut_dm_init_bootstd
> >     setup_rauc_image(ubman)
> > test/py/tests/test_ut.py:581: in setup_rauc_image
> >     fs_helper.mk_fs(ubman.config, fs, 0x800000, fsfile.split('.')[0],
> > bootdir)
> > test/py/tests/fs_helper.py:68: in mk_fs
> >     check_call(f'mcopy -i {fs_img} -vsmpQ {src_dir}/* ::/',
> > shell=True)
> > /usr/lib/python3.10/subprocess.py:369: in check_call
> >     raise CalledProcessError(retcode, cmd)
> > E   subprocess.CalledProcessError: Command 'mcopy -i
> > /tmp/sandbox/persistent-data/rauc_boot.fat32.img -vsmpQ
> > /tmp/sandbox/persistent-data/boot/* ::/' returned non-zero exit
> > status 1.
> > ----------------------------- Captured stdout call ------------------
> > -----------
> 
> That's strange. I cannot reproduce this error on my local machine
> (Archlinux), neither with Python 3.13 nor 3.10. Do you have additional
> output of the process call? Or is the captured stdout empty? Maybe
> there is something in stderr? The exit code 1 seems rather generic. At
> least I see all the required files on my machine for that call.
It's what's seen in CI. One of the full failures is at
https://source.denx.de/u-boot/u-boot/-/jobs/1264772 and you can trigger
CI runs as documented at:
https://docs.u-boot.org/en/latest/develop/ci_testing.html or grab the CI
docker container and run the tests locally inside of that. Thanks.
-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20251014/0f24c495/attachment.sig>
    
    
More information about the U-Boot
mailing list