]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
memblock tests: Makefile: add arguments to control verbosity
authorRebecca Mckeever <remckee0@gmail.com>
Mon, 4 Jul 2022 04:06:55 +0000 (23:06 -0500)
committerMike Rapoport <rppt@linux.ibm.com>
Mon, 4 Jul 2022 16:58:27 +0000 (19:58 +0300)
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 <david@redhat.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
Link: https://lore.kernel.org/r/5503f3efe82ecef5c99961a1d53003c8ad06cf27.1656907314.git.remckee0@gmail.com
tools/testing/memblock/Makefile
tools/testing/memblock/README
tools/testing/memblock/scripts/Makefile.include

index a698e24b35e7797319609de22d21e39ff16ff4c6..9fde49ad73bd9ca61e2b84639aace97d48043139 100644 (file)
@@ -45,6 +45,10 @@ help:
        @echo  '  clean           - Remove generated files and symlinks in the directory'
        @echo  ''
        @echo  'Configuration:'
+       @echo  '  make VERBOSE=1            - enable verbose output, which includes the'
+       @echo  '                              names of functions being tested and the'
+       @echo  '                              number of test cases passing'
+       @echo  '  make MEMBLOCK_DEBUG=1     - enable memblock_dbg() messages'
        @echo  '  make NUMA=1               - simulate enabled NUMA'
        @echo  '  make MOVABLE_NODE=1       - override `movable_node_is_enabled`'
        @echo  '                              definition to simulate movable NUMA nodes'
index ca6afcff013aa91cdd2df4cee41ee54c68d83b51..058146b528a5e419d9f9e37357cba28fed96b04b 100644 (file)
@@ -34,7 +34,15 @@ To run the tests, build the main target and run it:
 $ make && ./main
 
 A successful run produces no output. It is also possible to override different
-configuration parameters. For example, to simulate enabled NUMA, use:
+configuration parameters. For example, to include verbose output, specify the
+VERBOSE flag when building the main target:
+
+$ make VERBOSE=1
+
+This will print information about which functions are being tested and the
+number of test cases that passed.
+
+To simulate enabled NUMA, use:
 
 $ make NUMA=1
 
index 641569ccb7b0376bc9f301878c98e53a1d1418b3..4401f79bed4c8d0efdd89a95db918930a452a01e 100644 (file)
@@ -17,3 +17,13 @@ ifeq ($(32BIT_PHYS_ADDR_T), 1)
        CFLAGS += -m32 -U CONFIG_PHYS_ADDR_T_64BIT
        LDFLAGS += -m32
 endif
+
+# Enable verbose testing output
+ifeq ($(VERBOSE), 1)
+       CFLAGS += -D VERBOSE
+endif
+
+# Enable memblock_dbg() messages
+ifeq ($(MEMBLOCK_DEBUG), 1)
+       CFLAGS += -D MEMBLOCK_DEBUG
+endif