[PATCH 4/9] test: cmd/bdinfo: consider arch_print_bdinfo() output
Simon Glass
sjg at chromium.org
Fri Nov 14 13:44:52 CET 2025
Hi Heinrich,
On Sun, 9 Nov 2025 at 03:10, Heinrich Schuchardt
<heinrich.schuchardt at canonical.com> wrote:
>
> On x86 commit 9b35dbc93fd4 ("x86: Show the timestamp counter with bdinfo")
> has added another bdinfo output line.
>
> On RISC-V commit 66b5ee9c558e ("riscv: add RISC-V fields to bdinfo
> command") implemented arch_print_bdinfo().
>
> Update the bdinfo test accordingly.
>
> Fixes: 9b35dbc93fd4 ("x86: Show the timestamp counter with bdinfo")
> Fixes: 66b5ee9c558e ("riscv: add RISC-V fields to bdinfo command")
> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
> ---
> test/cmd/bdinfo.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c
> index 214b237152b..28d448a0866 100644
> --- a/test/cmd/bdinfo.c
> +++ b/test/cmd/bdinfo.c
> @@ -215,8 +215,15 @@ static int bdinfo_test_all(struct unit_test_state *uts)
> ut_assertok(test_num_l(uts, "malloc base", gd_malloc_start()));
> }
>
> + /* Check arch_print_bdinfo() output */
> if (IS_ENABLED(CONFIG_X86))
> - ut_check_skip_to_linen(uts, " high end =");
> + ut_check_skip_to_linen(uts, "tsc");
> +
> +#ifdef CONFIG_RISCV
> + ut_check_console_linen(uts, "boot hart");
> + if (gd->arch.firmware_fdt_addr)
> + ut_check_console_linen(uts, "firmware fdt");
> +#endif
How about creating an accessor so the #ifdef is in global_data.h and
you can use if (IS_ENABLED()) here?
>
> return 0;
> }
> --
> 2.51.0
>
Reviewed-by: Simon Glass <sjg at chromium.org>
Regards,
SImon
More information about the U-Boot
mailing list