[PATCH] test: lmb: Rework lib_test_lmb_max_regions test to scale
Simon Glass
sjg at chromium.org
Wed Feb 8 20:07:00 CET 2023
On Wed, 8 Feb 2023 at 11:39, Tom Rini <trini at konsulko.com> wrote:
>
> First, this test depends on CONFIG_LMB_USE_MAX_REGIONS, so add that as a
> test before building. Second, instead of using a hard-coded value of 8,
> which is the default of CONFIG_LMB_USE_MAX_REGIONS previously, use that
> directly and update the comments. The only trick here is that one part
> of the test itself also was written with the value of 8 itself in mind.
> Rework the size of the lmb region we allocate to scale with the value of
> CONFIG_LMB_USE_MAX_REGIONS.
>
> Cc: Simon Glass <sjg at chromium.org>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> test/lib/lmb.c | 44 ++++++++++++++++++++++++++------------------
> 1 file changed, 26 insertions(+), 18 deletions(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
nit below
>
> diff --git a/test/lib/lmb.c b/test/lib/lmb.c
> index 157c26394d6f..b24c85d203ae 100644
> --- a/test/lib/lmb.c
> +++ b/test/lib/lmb.c
> @@ -665,10 +665,17 @@ static int lib_test_lmb_get_free_size(struct
unit_test_state *uts)
> DM_TEST(lib_test_lmb_get_free_size,
> UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT);
>
> +#ifdef CONFIG_LMB_USE_MAX_REGIONS
> static int lib_test_lmb_max_regions(struct unit_test_state *uts)
> {
> const phys_addr_t ram = 0x00000000;
> - const phys_size_t ram_size = 0x8000000;
> + /*
> + * All of 32bit memory space will be contain regionns for this
test, so
regions
Should the word 'be' be there?
[..]
Regards,
Simon
More information about the U-Boot
mailing list