mbox series

[v3,0/4] memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options

Message ID cover.1655889641.git.remckee0@gmail.com (mailing list archive)
Headers show
Series memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options | expand

Message

Rebecca Mckeever June 22, 2022, 9:29 a.m. UTC
These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
simulator, which can be specified when running make. These patches also
implement the functionality for these options.

VERBOSE
Usage:

$ make VERBOSE=1

Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
each test, the verbose output includes the name of the memblock function
being tested, the name of the test, and whether the test passed or failed.
Since all the tests in Memblock simulator run as one monolithic test, this
output is a quick way to get a summary of test results.

MEMBLOCK_DEBUG
Usage:

$ make MEMBLOCK_DEBUG=1

Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
are debug messages built into several functions in memblock that include
information such as the name of the function and the size and start and
end addresses of the memblock region.

Rebecca Mckeever (4):
  memblock tests: add user-provided arguments to Makefile
  memblock tests: add verbose output to memblock tests
  memblock tests: set memblock_debug to enable memblock_dbg() messages
  memblock tests: remove completed TODO items

 tools/testing/memblock/Makefile               |   4 +
 tools/testing/memblock/README                 |  10 +-
 tools/testing/memblock/TODO                   |  14 +-
 tools/testing/memblock/internal.h             |   7 +
 .../testing/memblock/scripts/Makefile.include |  10 +
 tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
 .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
 tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
 tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
 tools/testing/memblock/tests/common.c         |  58 +++
 tools/testing/memblock/tests/common.h         |  54 +++
 11 files changed, 913 insertions(+), 356 deletions(-)

---
Changes

v1 -> v2
PATCH 2, in common.c:
  Remove #ifdef VERBOSE around prefixes and related constants
  Add __maybe_unused to prefixes
  Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
    immediately after the other constants
  Add #ifdef VERBOSE around definitions for test_*() and prefix_*()

v2 -> v3
PATCH 1:
  Add Reviewed-by tag
---

Comments

David Hildenbrand June 22, 2022, 10 a.m. UTC | #1
On 22.06.22 11:29, Rebecca Mckeever wrote:
> These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> simulator, which can be specified when running make. These patches also
> implement the functionality for these options.
> 
> VERBOSE
> Usage:
> 
> $ make VERBOSE=1
> 
> Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
> each test, the verbose output includes the name of the memblock function
> being tested, the name of the test, and whether the test passed or failed.
> Since all the tests in Memblock simulator run as one monolithic test, this
> output is a quick way to get a summary of test results.
> 
> MEMBLOCK_DEBUG
> Usage:
> 
> $ make MEMBLOCK_DEBUG=1
> 
> Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
> are debug messages built into several functions in memblock that include
> information such as the name of the function and the size and start and
> end addresses of the memblock region.
> 
> Rebecca Mckeever (4):
>   memblock tests: add user-provided arguments to Makefile
>   memblock tests: add verbose output to memblock tests
>   memblock tests: set memblock_debug to enable memblock_dbg() messages
>   memblock tests: remove completed TODO items
> 
>  tools/testing/memblock/Makefile               |   4 +
>  tools/testing/memblock/README                 |  10 +-
>  tools/testing/memblock/TODO                   |  14 +-
>  tools/testing/memblock/internal.h             |   7 +
>  .../testing/memblock/scripts/Makefile.include |  10 +
>  tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
>  .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
>  tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
>  tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
>  tools/testing/memblock/tests/common.c         |  58 +++
>  tools/testing/memblock/tests/common.h         |  54 +++
>  11 files changed, 913 insertions(+), 356 deletions(-)
> 
> ---
> Changes
> 
> v1 -> v2
> PATCH 2, in common.c:
>   Remove #ifdef VERBOSE around prefixes and related constants
>   Add __maybe_unused to prefixes
>   Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
>     immediately after the other constants
>   Add #ifdef VERBOSE around definitions for test_*() and prefix_*()
> 
> v2 -> v3
> PATCH 1:
>   Add Reviewed-by tag
> ---
> 

Hi Rebecca,

no need to resend a new version that frequently; wait for more feedback
first.

Usually, people expect a new version when there hasn't been more review
feedback for a few days.

Also, there is usually no need to send a new version when you get a
rb/ack tag: the maintainer might just pick them up when applying the
patches.
Mike Rapoport June 22, 2022, 2:17 p.m. UTC | #2
Hi Rebecca,

On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> simulator, which can be specified when running make. These patches also
> implement the functionality for these options.
> 
> VERBOSE
> Usage:
> 
> $ make VERBOSE=1
> 
> Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
> each test, the verbose output includes the name of the memblock function
> being tested, the name of the test, and whether the test passed or failed.
> Since all the tests in Memblock simulator run as one monolithic test, this
> output is a quick way to get a summary of test results.
> 
> MEMBLOCK_DEBUG
> Usage:
> 
> $ make MEMBLOCK_DEBUG=1
> 
> Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
> are debug messages built into several functions in memblock that include
> information such as the name of the function and the size and start and
> end addresses of the memblock region.
> 
> Rebecca Mckeever (4):
>   memblock tests: add user-provided arguments to Makefile
>   memblock tests: add verbose output to memblock tests
>   memblock tests: set memblock_debug to enable memblock_dbg() messages
>   memblock tests: remove completed TODO items
> 
>  tools/testing/memblock/Makefile               |   4 +
>  tools/testing/memblock/README                 |  10 +-
>  tools/testing/memblock/TODO                   |  14 +-
>  tools/testing/memblock/internal.h             |   7 +
>  .../testing/memblock/scripts/Makefile.include |  10 +
>  tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
>  .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
>  tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
>  tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
>  tools/testing/memblock/tests/common.c         |  58 +++
>  tools/testing/memblock/tests/common.h         |  54 +++
>  11 files changed, 913 insertions(+), 356 deletions(-)
> 
> ---
> Changes
> 
> v1 -> v2
> PATCH 2, in common.c:
>   Remove #ifdef VERBOSE around prefixes and related constants
>   Add __maybe_unused to prefixes
>   Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
>     immediately after the other constants
>   Add #ifdef VERBOSE around definitions for test_*() and prefix_*()
> 
> v2 -> v3
> PATCH 1:
>   Add Reviewed-by tag
> ---

The patch changelog in a cover letter usually goes before the commit list
and diffstat. 
 
> -- 
> 2.34.1
>
Rebecca Mckeever June 23, 2022, 1:01 a.m. UTC | #3
Hi Mike,

On Wed, Jun 22, 2022 at 09:17:24AM -0500, Mike Rapoport wrote:
> Hi Rebecca,
> 
> On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> > These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> > simulator, which can be specified when running make. These patches also
> > implement the functionality for these options.
> > 
> > VERBOSE
> > Usage:
> > 
> > $ make VERBOSE=1
> > 
> > Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
> > each test, the verbose output includes the name of the memblock function
> > being tested, the name of the test, and whether the test passed or failed.
> > Since all the tests in Memblock simulator run as one monolithic test, this
> > output is a quick way to get a summary of test results.
> > 
> > MEMBLOCK_DEBUG
> > Usage:
> > 
> > $ make MEMBLOCK_DEBUG=1
> > 
> > Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
> > are debug messages built into several functions in memblock that include
> > information such as the name of the function and the size and start and
> > end addresses of the memblock region.
> > 
> > Rebecca Mckeever (4):
> >   memblock tests: add user-provided arguments to Makefile
> >   memblock tests: add verbose output to memblock tests
> >   memblock tests: set memblock_debug to enable memblock_dbg() messages
> >   memblock tests: remove completed TODO items
> > 
> >  tools/testing/memblock/Makefile               |   4 +
> >  tools/testing/memblock/README                 |  10 +-
> >  tools/testing/memblock/TODO                   |  14 +-
> >  tools/testing/memblock/internal.h             |   7 +
> >  .../testing/memblock/scripts/Makefile.include |  10 +
> >  tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
> >  .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
> >  tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
> >  tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
> >  tools/testing/memblock/tests/common.c         |  58 +++
> >  tools/testing/memblock/tests/common.h         |  54 +++
> >  11 files changed, 913 insertions(+), 356 deletions(-)
> > 
> > ---
> > Changes
> > 
> > v1 -> v2
> > PATCH 2, in common.c:
> >   Remove #ifdef VERBOSE around prefixes and related constants
> >   Add __maybe_unused to prefixes
> >   Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
> >     immediately after the other constants
> >   Add #ifdef VERBOSE around definitions for test_*() and prefix_*()
> > 
> > v2 -> v3
> > PATCH 1:
> >   Add Reviewed-by tag
> > ---
> 
> The patch changelog in a cover letter usually goes before the commit list
> and diffstat. 
>  
Thanks for letting me know, I will do that next time.

> > -- 
> > 2.34.1
> > 
> 
> -- 
> Sincerely yours,
> Mike.

Thanks,
Rebecca
Ira Weiny June 23, 2022, 3:30 a.m. UTC | #4
On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> simulator, which can be specified when running make. These patches also
> implement the functionality for these options.

I seem to be missing patch 3/4 and I don't see it on lore?

https://lore.kernel.org/linux-mm/004e021cc3cb7be8749361b3b1cb324459b9cb9f.1655889641.git.remckee0@gmail.com/

Did it get sent?  Did it define the ASSERT_*() macros?

Ira

> 
> VERBOSE
> Usage:
> 
> $ make VERBOSE=1
> 
> Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
> each test, the verbose output includes the name of the memblock function
> being tested, the name of the test, and whether the test passed or failed.
> Since all the tests in Memblock simulator run as one monolithic test, this
> output is a quick way to get a summary of test results.
> 
> MEMBLOCK_DEBUG
> Usage:
> 
> $ make MEMBLOCK_DEBUG=1
> 
> Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
> are debug messages built into several functions in memblock that include
> information such as the name of the function and the size and start and
> end addresses of the memblock region.
> 
> Rebecca Mckeever (4):
>   memblock tests: add user-provided arguments to Makefile
>   memblock tests: add verbose output to memblock tests
>   memblock tests: set memblock_debug to enable memblock_dbg() messages
>   memblock tests: remove completed TODO items
> 
>  tools/testing/memblock/Makefile               |   4 +
>  tools/testing/memblock/README                 |  10 +-
>  tools/testing/memblock/TODO                   |  14 +-
>  tools/testing/memblock/internal.h             |   7 +
>  .../testing/memblock/scripts/Makefile.include |  10 +
>  tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
>  .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
>  tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
>  tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
>  tools/testing/memblock/tests/common.c         |  58 +++
>  tools/testing/memblock/tests/common.h         |  54 +++
>  11 files changed, 913 insertions(+), 356 deletions(-)
> 
> ---
> Changes
> 
> v1 -> v2
> PATCH 2, in common.c:
>   Remove #ifdef VERBOSE around prefixes and related constants
>   Add __maybe_unused to prefixes
>   Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
>     immediately after the other constants
>   Add #ifdef VERBOSE around definitions for test_*() and prefix_*()
> 
> v2 -> v3
> PATCH 1:
>   Add Reviewed-by tag
> ---
> 
> -- 
> 2.34.1
> 
>
Rebecca Mckeever June 23, 2022, 4:20 a.m. UTC | #5
On Wed, Jun 22, 2022 at 08:30:36PM -0700, Ira Weiny wrote:
> On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> > These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> > simulator, which can be specified when running make. These patches also
> > implement the functionality for these options.
> 
> I seem to be missing patch 3/4 and I don't see it on lore?
> 
> https://lore.kernel.org/linux-mm/004e021cc3cb7be8749361b3b1cb324459b9cb9f.1655889641.git.remckee0@gmail.com/
> 
> Did it get sent?  Did it define the ASSERT_*() macros?

That's strange, my email shows that it was sent to linux-mm@kvack.org and
linux-kernel@vger.kernel.org but I'm not seeing it on lore either.
Should I resend just patch 3/4? For now, you can take a look at v1.
Patch 3 is unchanged from v1, which is showing up on lore:

https://lore.kernel.org/linux-mm/fe34452209f54287023ccacd666eade81ecd9a24.1655878337.git.remckee0@gmail.com/T/#u

It does not define the ASSERT_*() macros, that happens in patch 2.
Patch 3 implements MEMBLOCK_DEBUG.

Thanks,
Rebecca

> 
> Ira
> 
> > 
> > VERBOSE
> > Usage:
> > 
> > $ make VERBOSE=1
> > 
> > Passing VERBOSE=1 will enable verbose output from Memblock simulator. For
> > each test, the verbose output includes the name of the memblock function
> > being tested, the name of the test, and whether the test passed or failed.
> > Since all the tests in Memblock simulator run as one monolithic test, this
> > output is a quick way to get a summary of test results.
> > 
> > MEMBLOCK_DEBUG
> > Usage:
> > 
> > $ make MEMBLOCK_DEBUG=1
> > 
> > Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These
> > are debug messages built into several functions in memblock that include
> > information such as the name of the function and the size and start and
> > end addresses of the memblock region.
> > 
> > Rebecca Mckeever (4):
> >   memblock tests: add user-provided arguments to Makefile
> >   memblock tests: add verbose output to memblock tests
> >   memblock tests: set memblock_debug to enable memblock_dbg() messages
> >   memblock tests: remove completed TODO items
> > 
> >  tools/testing/memblock/Makefile               |   4 +
> >  tools/testing/memblock/README                 |  10 +-
> >  tools/testing/memblock/TODO                   |  14 +-
> >  tools/testing/memblock/internal.h             |   7 +
> >  .../testing/memblock/scripts/Makefile.include |  10 +
> >  tools/testing/memblock/tests/alloc_api.c      | 241 ++++++++----
> >  .../memblock/tests/alloc_helpers_api.c        | 135 +++++--
> >  tools/testing/memblock/tests/alloc_nid_api.c  | 371 ++++++++++++------
> >  tools/testing/memblock/tests/basic_api.c      | 365 ++++++++++++-----
> >  tools/testing/memblock/tests/common.c         |  58 +++
> >  tools/testing/memblock/tests/common.h         |  54 +++
> >  11 files changed, 913 insertions(+), 356 deletions(-)
> > 
> > ---
> > Changes
> > 
> > v1 -> v2
> > PATCH 2, in common.c:
> >   Remove #ifdef VERBOSE around prefixes and related constants
> >   Add __maybe_unused to prefixes
> >   Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are
> >     immediately after the other constants
> >   Add #ifdef VERBOSE around definitions for test_*() and prefix_*()
> > 
> > v2 -> v3
> > PATCH 1:
> >   Add Reviewed-by tag
> > ---
> > 
> > -- 
> > 2.34.1
> > 
> >
Mike Rapoport June 23, 2022, 4:38 a.m. UTC | #6
On Wed, Jun 22, 2022 at 11:20:11PM -0500, Rebecca Mckeever wrote:
> On Wed, Jun 22, 2022 at 08:30:36PM -0700, Ira Weiny wrote:
> > On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> > > These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> > > simulator, which can be specified when running make. These patches also
> > > implement the functionality for these options.
> > 
> > I seem to be missing patch 3/4 and I don't see it on lore?
> > 
> > https://lore.kernel.org/linux-mm/004e021cc3cb7be8749361b3b1cb324459b9cb9f.1655889641.git.remckee0@gmail.com/
> > 
> > Did it get sent?  Did it define the ASSERT_*() macros?

I see it on lore in both linux-mm and linux-kernel, and here as well:
 
https://lore.kernel.org/all/39c5c97d2b5c1ab88b7bbbf02633f840fd5dfcdf.1655889641.git.remckee0@gmail.com/

> That's strange, my email shows that it was sent to linux-mm@kvack.org and
> linux-kernel@vger.kernel.org but I'm not seeing it on lore either.
> Should I resend just patch 3/4?

No need to resend.

> For now, you can take a look at v1.  Patch 3 is unchanged from v1, which
> is showing up on lore:
> 
> https://lore.kernel.org/linux-mm/fe34452209f54287023ccacd666eade81ecd9a24.1655878337.git.remckee0@gmail.com/T/#u
> 
> It does not define the ASSERT_*() macros, that happens in patch 2.
> Patch 3 implements MEMBLOCK_DEBUG.
> 
> Thanks,
> Rebecca
>
Ira Weiny June 23, 2022, 5:48 a.m. UTC | #7
On Wed, Jun 22, 2022 at 11:38:35PM -0500, Mike Rapoport wrote:
> On Wed, Jun 22, 2022 at 11:20:11PM -0500, Rebecca Mckeever wrote:
> > On Wed, Jun 22, 2022 at 08:30:36PM -0700, Ira Weiny wrote:
> > > On Wed, Jun 22, 2022 at 04:29:05AM -0500, Rebecca Mckeever wrote:
> > > > These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock
> > > > simulator, which can be specified when running make. These patches also
> > > > implement the functionality for these options.
> > > 
> > > I seem to be missing patch 3/4 and I don't see it on lore?
> > > 
> > > https://lore.kernel.org/linux-mm/004e021cc3cb7be8749361b3b1cb324459b9cb9f.1655889641.git.remckee0@gmail.com/
> > > 
> > > Did it get sent?  Did it define the ASSERT_*() macros?
> 
> I see it on lore in both linux-mm and linux-kernel, and here as well:
>  
> https://lore.kernel.org/all/39c5c97d2b5c1ab88b7bbbf02633f840fd5dfcdf.1655889641.git.remckee0@gmail.com/

Odd.  Thanks!

Ira

> 
> > That's strange, my email shows that it was sent to linux-mm@kvack.org and
> > linux-kernel@vger.kernel.org but I'm not seeing it on lore either.
> > Should I resend just patch 3/4?
> 
> No need to resend.
> 
> > For now, you can take a look at v1.  Patch 3 is unchanged from v1, which
> > is showing up on lore:
> > 
> > https://lore.kernel.org/linux-mm/fe34452209f54287023ccacd666eade81ecd9a24.1655878337.git.remckee0@gmail.com/T/#u
> > 
> > It does not define the ASSERT_*() macros, that happens in patch 2.
> > Patch 3 implements MEMBLOCK_DEBUG.
> > 
> > Thanks,
> > Rebecca
> > 
> 
> -- 
> Sincerely yours,
> Mike.