mirror of
https://github.com/torvalds/linux.git
synced 2026-04-21 08:13:56 -04:00
memblock tests: add labels to verbose output for generic alloc tests
Generic tests for memblock_alloc*() functions do not use separate functions for testing top-down and bottom-up allocation directions. Therefore, the function name that is displayed in the verbose testing output does not include the allocation direction. Add an additional prefix when running generic tests for memblock_alloc*() functions that indicates which allocation direction is set. The prefix will be displayed when the tests are run in verbose mode. Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Shaoqin Huang <shaoqin.huang@intel.com> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> Signed-off-by: Mike Rapoport <rppt@linux.ibm.com> Link: https://lore.kernel.org/r/fb76a42253d2a196a7daea29dd8121a69904f58e.1661578349.git.remckee0@gmail.com
This commit is contained in:
committed by
Mike Rapoport
parent
25b9defb5b
commit
fb2e97fe85
@@ -100,4 +100,20 @@ static inline void test_pass_pop(void)
|
||||
prefix_pop();
|
||||
}
|
||||
|
||||
static inline void run_top_down(int (*func)())
|
||||
{
|
||||
memblock_set_bottom_up(false);
|
||||
prefix_push("top-down");
|
||||
func();
|
||||
prefix_pop();
|
||||
}
|
||||
|
||||
static inline void run_bottom_up(int (*func)())
|
||||
{
|
||||
memblock_set_bottom_up(true);
|
||||
prefix_push("bottom-up");
|
||||
func();
|
||||
prefix_pop();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user