Hi Anders,

On 2026-09-30T09:59:48, Anders Roxell <[email protected]> wrote:
> test: ut: run every suite in a comma separated list
>
> "ut lib,mem" only runs lib. The loop sets name to NULL after strsep(),
> but strsep() has already moved it past the comma.
>
> Loop on strsep() until it returns NULL.
>
> Fixes: fa0b68d22add ("test: Allow running a selection of suites")
> Signed-off-by: Anders Roxell <[email protected]>
>
> test/cmd_ut.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/test/cmd_ut.c b/test/cmd_ut.c
> @@ -301,7 +301,7 @@ static int do_ut(struct cmd_tbl *cmdtp, int flag, int 
> argc, char *const argv[])
> -             for (; p = strsep(&name, ","), p; name = NULL) {
> +             while ((p = strsep(&name, ","))) {

Thanks for fixing this.

BTW, test_suite.py already checks this with 'ut bloblist,setexpr,mem'
and expects 'Suites run: 3', but the test is disabled because it is
named xtest_suite(), which probably explains why nobody noticed. It
would be nice to re-enable it, perhaps in a follow-up.

Reviewed-by: Simon Glass <[email protected]>

Regards,
Simon

Reply via email to