[PATCH v2 3/7] test: cmd: add unit tests for part command
Simon Glass
sjg at chromium.org
Sat Apr 11 01:00:45 CEST 2026
Hi Dario,
On 2026-04-04T15:23:27, Dario Binacchi
<dario.binacchi at amarulasolutions.com> wrote:
> test: cmd: add unit tests for part command
>
> Add unit tests for the 'part' command, specifically for the 'number',
> 'start', and 'size' subcommands.
>
> These tests establish a baseline for the current partition lookup
> functionality by name. This foundation will be used by subsequent
> patches to extend the command, ensuring consistent behavior as new
> features are introduced.
>
> Signed-off-by: Dario Binacchi <dario.binacchi at amarulasolutions.com>
>
> test/cmd/Makefile | 1 +
> test/cmd/part.c | 157 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 158 insertions(+)
> diff --git a/test/cmd/part.c b/test/cmd/part.c
> @@ -0,0 +1,157 @@
> +static char disk_guid[UUID_STR_LEN + 1] = "8d60b397-1bb6-4d33-80ee-b1587d24c2f8";
> +
> +static int setup_gpt_partitions(struct unit_test_state *uts, unsigned int mmc_dev_num)
A few lines exceed 80 columns (disk_guid declaration,
setup_gpt_partitions() signature, blk_get_device_by_str() call).
Please can you wrap these.
Regards,
Simon
More information about the U-Boot
mailing list