[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bdb4cb00-f245-d98f-a49d-9371eff0a127@redhat.com>
Date: Tue, 23 Aug 2022 11:50:38 +0200
From: David Hildenbrand <david@...hat.com>
To: Rebecca Mckeever <remckee0@...il.com>,
Mike Rapoport <rppt@...nel.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 6/8] memblock tests: update alloc_nid_api to test
memblock_alloc_try_nid_raw
On 19.08.22 10:34, Rebecca Mckeever wrote:
> Update memblock_alloc_try_nid() tests so that they test either
> memblock_alloc_try_nid() or memblock_alloc_try_nid_raw() depending on the
> value of alloc_nid_test_flags. Run through all the existing tests in
> alloc_nid_api twice: once for memblock_alloc_try_nid() and once for
> memblock_alloc_try_nid_raw().
>
> When the tests run memblock_alloc_try_nid(), they test that the entire
> memory region is zero. When the tests run memblock_alloc_try_nid_raw(),
> they test that the entire memory region is nonzero.
>
> Signed-off-by: Rebecca Mckeever <remckee0@...il.com>
> ---
> tools/testing/memblock/tests/alloc_nid_api.c | 188 ++++++++++++-------
> 1 file changed, 119 insertions(+), 69 deletions(-)
>
> diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c
> index 82fa8ea36320..2c1d5035e057 100644
> --- a/tools/testing/memblock/tests/alloc_nid_api.c
> +++ b/tools/testing/memblock/tests/alloc_nid_api.c
> @@ -1,6 +1,34 @@
> // SPDX-License-Identifier: GPL-2.0-or-later
> #include "alloc_nid_api.h"
>
> +static const char * const func_testing[] = {
> + "memblock_alloc_try_nid",
> + "memblock_alloc_try_nid_raw"
> +};
> +
> +static int alloc_nid_test_flags = TEST_ZEROED;
> +
> +static inline const char * const get_func_testing(int flags)
> +{
> + if (flags & TEST_RAW)
> + return func_testing[1];
> + else
> + return func_testing[0];
> +}
Same comments as for patch #5. Otherwise looks good.
--
Thanks,
David / dhildenb
Powered by blists - more mailing lists