Skip to content

memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options

Rebecca Mckeever linux-mm lkml 5 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 1 replyApplied
  2. v44 patches 5 repliesSuperseded
  3. v34 patches 26 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches0 repliesSuperseded
v14 patches1 replySuperseded

Changes in v5 from the cover letter

PATCH 2:
- tests/common.c:
- Change prefixes to a list of pointers to strings and add nr_prefixes to track the current number of prefixes so that string modifications are not needed. Update implementations for test_*() and prefix_*() functions accordingly.

Patches in v5 Applied

#Subject and filesSizeRepliesApplied
1/4memblock tests: Makefile: add arguments to control verbositytools/testing/memblock/Makefile tools/testing/memblock/README tools/testing/memblock/scripts/Makefile.include+23 -10 replies
2/4memblock tests: add verbose output to memblock teststools/testing/memblock/tests/alloc_api.c tools/testing/memblock/tests/alloc_helpers_api.c tools/testing/memblock/tests/alloc_nid_api.c +3 more+817 -3440 replies
3/4memblock tests: set memblock_debug to enable memblock_dbg() messagestools/testing/memblock/internal.h+7 -00 replies
4/4memblock tests: remove completed TODO itemstools/testing/memblock/TODO+3 -110 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchDavid HildenbrandShaoqin Huang
1/4R-b
2/4A-b R-b
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 0/4] memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options

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.

---
Changes

v4 -> v5
PATCH 2:
- tests/common.c:
- Change prefixes to a list of pointers to strings and add nr_prefixes to track the current number of prefixes so that string modifications are not needed. Update implementations for test_*() and prefix_*() functions accordingly.

v3 -> v4
PATCH 1:
- Update subject line to specifically mention verbosity, which encompasses both Makefile arguments
PATCH 2:
- tests/common.h, tests/*_api.c:
- Define and use macro PREFIX_PUSH(), which runs prefix_push(__func__)
- Define and use function test_pass_pop(), which runs test_pass(), then prefix_pop()
- tests/alloc_*api.c:
- Remove static on constant func_testing
- tests/basic_api.c:
- Display "memblock_add" instead of "memblock_add_node" in verbose output for memblock_add_node_simple_check()
- tests/alloc_helpers_api.c:
- Add missing prefix_pop() in memblock_alloc_helpers_checks()
- Commit message:
- Format function/macro descriptions, reword prefix_push() description, and update as needed to reflect the above changes

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

v1 -> v2
PATCH 2:
- tests/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_*()
---

Rebecca Mckeever (4):
memblock tests: Makefile: add arguments to control verbosity 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      | 225 +++++++----
 .../memblock/tests/alloc_helpers_api.c        | 129 ++++---
 tools/testing/memblock/tests/alloc_nid_api.c  | 351 +++++++++++-------
 tools/testing/memblock/tests/basic_api.c      | 337 +++++++++++------
 tools/testing/memblock/tests/common.c         |  57 +++
 tools/testing/memblock/tests/common.h         |  62 ++++
 11 files changed, 850 insertions(+), 356 deletions(-)
Signature · 1 line
2.34.1