From: Mike Rapoport <rppt@kernel.org>
To: David Hildenbrand <david@redhat.com>
Cc: Rebecca Mckeever <remckee0@gmail.com>,
outreachy@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] memblock tests: update style of comments for memblock_add_*() functions
Date: Thu, 21 Apr 2022 17:34:05 +0300 [thread overview]
Message-ID: <YmFrXaBvhJy2auYK@kernel.org> (raw)
In-Reply-To: <436b1fd0-16a6-0f77-7ff4-a68252d6b117@redhat.com>
On Thu, Apr 21, 2022 at 09:12:02AM +0200, David Hildenbrand wrote:
> On 20.04.22 13:19, Rebecca Mckeever wrote:
> > Update comments in memblock_add_*() functions to match the style used
> > in tests/alloc_*.c by rewording to make the expected outcome more apparent
> > and, if more than one memblock is involved, adding a visual of the
> > memory blocks.
> >
> > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
> > ---
> > tools/testing/memblock/tests/basic_api.c | 75 +++++++++++++++++-------
> > 1 file changed, 54 insertions(+), 21 deletions(-)
> >
> > diff --git a/tools/testing/memblock/tests/basic_api.c b/tools/testing/memblock/tests/basic_api.c
> > index fbc1ce160303..cdf112d25343 100644
> > --- a/tools/testing/memblock/tests/basic_api.c
> > +++ b/tools/testing/memblock/tests/basic_api.c
> > @@ -26,8 +26,8 @@ static int memblock_initialization_check(void)
> > /*
> > * A simple test that adds a memory block of a specified base address
> > * and size to the collection of available memory regions (memblock.memory).
> > - * It checks if a new entry was created and if region counter and total memory
> > - * were correctly updated.
> > + * Expect to create a new entry. The region counter and total memory get
> > + * updated.
> > */
> > static int memblock_add_simple_check(void)
> > {
> > @@ -55,8 +55,8 @@ static int memblock_add_simple_check(void)
> > /*
> > * A simple test that adds a memory block of a specified base address, size
Can you please add coma after size ... ^
> > * NUMA node and memory flags to the collection of available memory regions.
> > - * It checks if the new entry, region counter and total memory size have
> > - * expected values.
> > + * Expect to create a new entry. The region counter and total memory get
> > + * updated.
> > */
> > static int memblock_add_node_simple_check(void)
> > {
...
> > @@ -125,10 +131,20 @@ static int memblock_add_disjoint_check(void)
> >
> > /*
> > * A test that tries to add two memory blocks, where the second one overlaps
> > - * with the beginning of the first entry (that is r1.base < r2.base + r2.size).
> > - * After this, it checks if two entries are merged into one region that starts
> > - * at r2.base and has size of two regions minus their intersection. It also
> > - * verifies the reported total size of the available memory and region counter.
> > + * with the beginning of the first entry (that is r1.base < r2.base + r2.size):
> > + *
> > + * | +----+----+------------+ |
> > + * | | r|2 | r1 | |
> > + * +----+----+----+------------+----------+
I'd move | separator outside the block name, e.g
* | +----+----+------------+ |
* | | | r2 | r1 | |
* +----+----+----+------------+----------+
but no strong feelings about this :)
> > + * ^ ^
> > + * | |
> > + * | r1.base
> > + * |
> > + * r2.base
> > + *
> > + * Expect to merge the two entries into one region that starts at r2.base
> > + * and has size of two regions minus their intersection. The total size of
> > + * the available memory is updated, and the region counter stays the same.
> > */
> > static int memblock_add_overlap_top_check(void)
...
> Reviewed-by: David Hildenbrand <david@redhat.com>
>
> --
> Thanks,
>
> David / dhildenb
>
>
--
Sincerely yours,
Mike.
next prev parent reply other threads:[~2022-04-21 14:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-20 11:18 [PATCH 0/3] memblock tests: update style of comments Rebecca Mckeever
2022-04-20 11:19 ` [PATCH 1/3] memblock tests: update style of comments for memblock_add_*() functions Rebecca Mckeever
2022-04-21 7:12 ` David Hildenbrand
2022-04-21 14:34 ` Mike Rapoport [this message]
2022-04-20 11:19 ` [PATCH 2/3] memblock tests: update style of comments for memblock_reserve_*() functions Rebecca Mckeever
2022-04-21 7:14 ` David Hildenbrand
2022-04-20 11:19 ` [PATCH 3/3] memblock tests: remove extra column of spaces in block comment Rebecca Mckeever
2022-04-21 7:09 ` David Hildenbrand
2022-04-21 14:42 ` Mike Rapoport
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=YmFrXaBvhJy2auYK@kernel.org \
--to=rppt@kernel.org \
--cc=david@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=outreachy@lists.linux.dev \
--cc=remckee0@gmail.com \
/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