linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Rebecca Mckeever <remckee0@gmail.com>,
	Mike Rapoport <rppt@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/5] memblock tests: introduce range tests for memblock_alloc_exact_nid_raw
Date: Mon, 31 Oct 2022 11:28:15 +0100	[thread overview]
Message-ID: <b60e55de-46b7-3eeb-4ad1-914d8cc5f25b@redhat.com> (raw)
In-Reply-To: <d5481026b5b75e919e6497968453e86ab79b77d0.1666203643.git.remckee0@gmail.com>

On 19.10.22 20:34, Rebecca Mckeever wrote:
> Add TEST_F_EXACT flag, which specifies that tests should run
> memblock_alloc_exact_nid_raw(). Introduce range tests for
> memblock_alloc_exact_nid_raw() by using the TEST_F_EXACT flag to run the
> range tests in alloc_nid_api.c, since memblock_alloc_exact_nid_raw() and
> memblock_alloc_try_nid_raw() behave the same way when nid = NUMA_NO_NODE.
> 
> Rename tests and other functions in alloc_nid_api.c by removing "_try".
> Since the test names will be displayed in verbose output, they need to
> be general enough to refer to any of the memblock functions that the
> tests may run.
> 
> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>

[...]

> diff --git a/tools/testing/memblock/tests/alloc_nid_api.c b/tools/testing/memblock/tests/alloc_nid_api.c
> index 2c2d60f4e3e3..df8e7e038cab 100644
> --- a/tools/testing/memblock/tests/alloc_nid_api.c
> +++ b/tools/testing/memblock/tests/alloc_nid_api.c
> @@ -18,18 +18,27 @@ static const unsigned int node_fractions[] = {
>   	 625, /* 1/16 */
>   };
>   
> -static inline const char * const get_memblock_alloc_try_nid_name(int flags)
> +static inline const char * const get_memblock_alloc_nid_name(int flags)
>   {
> +	if (flags & TEST_F_EXACT)
> +		return "memblock_alloc_exact_nid_raw";
>   	if (flags & TEST_F_RAW)
>   		return "memblock_alloc_try_nid_raw";
>   	return "memblock_alloc_try_nid";
>   }
>   
> -static inline void *run_memblock_alloc_try_nid(phys_addr_t size,
> -					       phys_addr_t align,
> -					       phys_addr_t min_addr,
> -					       phys_addr_t max_addr, int nid)
> +static inline void *run_memblock_alloc_nid(phys_addr_t size,
> +					   phys_addr_t align,
> +					   phys_addr_t min_addr,
> +					   phys_addr_t max_addr, int nid)
>   {

I think we want to assert here that TEST_F_EXACT without TEST_F_RAW is 
not set --- because there is no API to support it.

Apart from that

Acked-by: David Hildenbrand <david@redhat.com>


Thanks!

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-10-31 10:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-19 18:34 [PATCH v3 0/5] memblock tests: add " Rebecca Mckeever
2022-10-19 18:34 ` [PATCH v3 1/5] memblock tests: introduce range " Rebecca Mckeever
2022-10-31 10:28   ` David Hildenbrand [this message]
2022-11-03  4:02     ` Rebecca Mckeever
2022-10-19 18:34 ` [PATCH v3 2/5] memblock tests: add top-down NUMA " Rebecca Mckeever
2022-10-31 10:36   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 3/5] memblock tests: add bottom-up " Rebecca Mckeever
2022-10-31 10:39   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 4/5] memblock tests: add generic " Rebecca Mckeever
2022-10-31 12:42   ` David Hildenbrand
2022-10-19 18:34 ` [PATCH v3 5/5] memblock tests: remove completed TODO item Rebecca Mckeever
2022-10-31  5:00 ` [PATCH v3 0/5] memblock tests: add tests for memblock_alloc_exact_nid_raw Rebecca Mckeever
2022-10-31  8:43   ` Mike Rapoport
2022-10-31 12:43 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b60e55de-46b7-3eeb-4ad1-914d8cc5f25b@redhat.com \
    --to=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=remckee0@gmail.com \
    --cc=rppt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox