Skip to content

Commit ad76bf1

Browse files
committed
Merge tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock
Pull memblock updates from Mike Rapoport: "Extend test coverage: - add tests that trigger reallocation of memblock structures from memblock itself via memblock_double_array() - add tests for memblock_alloc_exact_nid_raw() that verify that requested node and memory range constraints are respected" * tag 'memblock-v6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rppt/memblock: memblock tests: remove completed TODO item memblock tests: add generic NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add bottom-up NUMA tests for memblock_alloc_exact_nid_raw memblock tests: add top-down NUMA tests for memblock_alloc_exact_nid_raw memblock tests: introduce range tests for memblock_alloc_exact_nid_raw memblock test: Update TODO list memblock test: Add test to memblock_reserve() 129th region memblock test: Add test to memblock_add() 129th region
2 parents 6f1f5ca + 80c2fe0 commit ad76bf1

File tree

10 files changed

+1622
-280
lines changed

10 files changed

+1622
-280
lines changed

tools/testing/memblock/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \
77
LDFLAGS += -fsanitize=address -fsanitize=undefined
88
TARGETS = main
99
TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \
10-
tests/basic_api.o tests/common.o
10+
tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o
1111
DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o
1212
OFILES = main.o $(DEP_OFILES) $(TEST_OFILES)
1313
EXTR_SRC = ../../../mm/memblock.c

tools/testing/memblock/TODO

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,5 @@
11
TODO
22
=====
33

4-
1. Add tests trying to memblock_add() or memblock_reserve() 129th region.
5-
This will trigger memblock_double_array(), make sure it succeeds.
6-
*Important:* These tests require valid memory ranges, use dummy physical
7-
memory block from common.c to implement them. It is also very
8-
likely that the current MEM_SIZE won't be enough for these
9-
test cases. Use realloc to adjust the size accordingly.
10-
11-
2. Add test cases using this functions (implement them for both directions):
12-
+ memblock_alloc_raw()
13-
+ memblock_alloc_exact_nid_raw()
14-
+ memblock_alloc_try_nid_raw()
15-
16-
3. Add tests for memblock_alloc_node() to check if the correct NUMA node is set
4+
1. Add tests for memblock_alloc_node() to check if the correct NUMA node is set
175
for the new region

tools/testing/memblock/main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include "tests/alloc_api.h"
44
#include "tests/alloc_helpers_api.h"
55
#include "tests/alloc_nid_api.h"
6+
#include "tests/alloc_exact_nid_api.h"
67
#include "tests/common.h"
78

89
int main(int argc, char **argv)
@@ -12,6 +13,7 @@ int main(int argc, char **argv)
1213
memblock_alloc_checks();
1314
memblock_alloc_helpers_checks();
1415
memblock_alloc_nid_checks();
16+
memblock_alloc_exact_nid_checks();
1517

1618
return 0;
1719
}

0 commit comments

Comments
 (0)