Skip to content

Commit 946dccb

Browse files
remckeerppt
authored andcommitted
memblock tests: Makefile: add arguments to control verbosity
Add VERBOSE and MEMBLOCK_DEBUG user-provided arguments. VERBOSE will enable verbose output from Memblock simulator. MEMBLOCK_DEBUG will enable memblock_dbg() messages. Update the help message to include VERBOSE and MEMBLOCK_DEBUG. Update the README to include VERBOSE. The README does not include all available options and refers to the help message for the remaining options. Therefore, omit MEMBLOCK_DEBUG from README. Reviewed-by: David Hildenbrand <[email protected]> Signed-off-by: Rebecca Mckeever <[email protected]> Signed-off-by: Mike Rapoport <[email protected]> Link: https://lore.kernel.org/r/5503f3efe82ecef5c99961a1d53003c8ad06cf27.1656907314.git.remckee0@gmail.com
1 parent 28e1a8f commit 946dccb

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

tools/testing/memblock/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ help:
4545
@echo ' clean - Remove generated files and symlinks in the directory'
4646
@echo ''
4747
@echo 'Configuration:'
48+
@echo ' make VERBOSE=1 - enable verbose output, which includes the'
49+
@echo ' names of functions being tested and the'
50+
@echo ' number of test cases passing'
51+
@echo ' make MEMBLOCK_DEBUG=1 - enable memblock_dbg() messages'
4852
@echo ' make NUMA=1 - simulate enabled NUMA'
4953
@echo ' make MOVABLE_NODE=1 - override `movable_node_is_enabled`'
5054
@echo ' definition to simulate movable NUMA nodes'

tools/testing/memblock/README

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,15 @@ To run the tests, build the main target and run it:
3434
$ make && ./main
3535

3636
A successful run produces no output. It is also possible to override different
37-
configuration parameters. For example, to simulate enabled NUMA, use:
37+
configuration parameters. For example, to include verbose output, specify the
38+
VERBOSE flag when building the main target:
39+
40+
$ make VERBOSE=1
41+
42+
This will print information about which functions are being tested and the
43+
number of test cases that passed.
44+
45+
To simulate enabled NUMA, use:
3846

3947
$ make NUMA=1
4048

tools/testing/memblock/scripts/Makefile.include

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,13 @@ ifeq ($(32BIT_PHYS_ADDR_T), 1)
1717
CFLAGS += -m32 -U CONFIG_PHYS_ADDR_T_64BIT
1818
LDFLAGS += -m32
1919
endif
20+
21+
# Enable verbose testing output
22+
ifeq ($(VERBOSE), 1)
23+
CFLAGS += -D VERBOSE
24+
endif
25+
26+
# Enable memblock_dbg() messages
27+
ifeq ($(MEMBLOCK_DEBUG), 1)
28+
CFLAGS += -D MEMBLOCK_DEBUG
29+
endif

0 commit comments

Comments
 (0)