On Wed, 18 Feb 2026 at 06:35, Martin Schwan <[email protected]> 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 <[email protected]>
> ---
> 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/[email protected]
>
> 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/[email protected]
> ---
>  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 <[email protected]>

Thanks for doing this.

Reply via email to