[PATCH v3] test: boot: Add test for bootmeth_rauc

Simon Glass sjg at chromium.org
Thu Feb 19 14:09:18 CET 2026


On Wed, 18 Feb 2026 at 06:35, Martin Schwan <m.schwan at phytec.de> 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 v3:
> - Use ext4 filesystem for rootfs instead of fat32
> - Explicitly create an empty directory for the root filesystem, instead
>   of passing "None". This fixes a usage error when calling "mcopy".
> - Rebase onto current master
> - Link to v2: https://lore.kernel.org/r/20251009-wip-bootmeth-rauc-tests-v2-1-08fbd3738e0a@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  | 47 ++++++++++++++++++++++++++++++++++++++
>  4 files changed, 113 insertions(+)

Reviewed-by: Simon Glass <simon.glass at canonical.com>

Thanks for doing this.


More information about the U-Boot mailing list