* [PATCH v2 5/5] memblock tests: remove completed TODO item [not found] <cover.1664753534.git.remckee0@gmail.com> @ 2022-10-02 23:41 ` Rebecca Mckeever 2022-10-10 9:07 ` David Hildenbrand [not found] ` <c73a6fd7fc3fa4529a6e444b9602d9c63ded91fd.1664753534.git.remckee0@gmail.com> 1 sibling, 1 reply; 5+ messages in thread From: Rebecca Mckeever @ 2022-10-02 23:41 UTC (permalink / raw) To: Mike Rapoport, linux-mm, linux-kernel; +Cc: David Hildenbrand, Rebecca Mckeever Remove completed item from TODO list. Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> --- tools/testing/memblock/TODO | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tools/testing/memblock/TODO b/tools/testing/memblock/TODO index 33044c634ea7..cb7fac47a643 100644 --- a/tools/testing/memblock/TODO +++ b/tools/testing/memblock/TODO @@ -8,10 +8,5 @@ TODO likely that the current MEM_SIZE won't be enough for these test cases. Use realloc to adjust the size accordingly. -2. Add test cases using this functions (implement them for both directions): - + memblock_alloc_raw() - + memblock_alloc_exact_nid_raw() - + memblock_alloc_try_nid_raw() - -3. Add tests for memblock_alloc_node() to check if the correct NUMA node is set +2. Add tests for memblock_alloc_node() to check if the correct NUMA node is set for the new region -- 2.25.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 5/5] memblock tests: remove completed TODO item 2022-10-02 23:41 ` [PATCH v2 5/5] memblock tests: remove completed TODO item Rebecca Mckeever @ 2022-10-10 9:07 ` David Hildenbrand 0 siblings, 0 replies; 5+ messages in thread From: David Hildenbrand @ 2022-10-10 9:07 UTC (permalink / raw) To: Rebecca Mckeever, Mike Rapoport, linux-mm, linux-kernel On 03.10.22 01:41, Rebecca Mckeever wrote: > Remove completed item from TODO list. > > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> > --- Reviewed-by: David Hildenbrand <david@redhat.com> -- Thanks, David / dhildenb ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <c73a6fd7fc3fa4529a6e444b9602d9c63ded91fd.1664753534.git.remckee0@gmail.com>]
* Re: [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw [not found] ` <c73a6fd7fc3fa4529a6e444b9602d9c63ded91fd.1664753534.git.remckee0@gmail.com> @ 2022-10-10 11:16 ` David Hildenbrand 2022-10-11 4:19 ` Rebecca Mckeever 0 siblings, 1 reply; 5+ messages in thread From: David Hildenbrand @ 2022-10-10 11:16 UTC (permalink / raw) To: Rebecca Mckeever, Mike Rapoport, linux-mm, linux-kernel On 03.10.22 01:41, Rebecca Mckeever wrote: > Add tests for memblock_alloc_exact_nid_raw() that are very similar to > the range tests for memblock_alloc_try_nid_raw(). > > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> > --- > tools/testing/memblock/Makefile | 2 +- > tools/testing/memblock/main.c | 2 + > .../memblock/tests/alloc_exact_nid_api.c | 1208 +++++++++++++++++ > .../memblock/tests/alloc_exact_nid_api.h | 9 + > 4 files changed, 1220 insertions(+), 1 deletion(-) > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h > > diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile > index 246f7ac8489b..2310ac4d080e 100644 > --- a/tools/testing/memblock/Makefile > +++ b/tools/testing/memblock/Makefile > @@ -7,7 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \ > LDFLAGS += -fsanitize=address -fsanitize=undefined > TARGETS = main > TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \ > - tests/basic_api.o tests/common.o > + tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o > DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o > OFILES = main.o $(DEP_OFILES) $(TEST_OFILES) > EXTR_SRC = ../../../mm/memblock.c > diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c > index 4ca1024342b1..278f9dec5008 100644 > --- a/tools/testing/memblock/main.c > +++ b/tools/testing/memblock/main.c > @@ -3,6 +3,7 @@ > #include "tests/alloc_api.h" > #include "tests/alloc_helpers_api.h" > #include "tests/alloc_nid_api.h" > +#include "tests/alloc_exact_nid_api.h" > #include "tests/common.h" > > int main(int argc, char **argv) > @@ -12,6 +13,7 @@ int main(int argc, char **argv) > memblock_alloc_checks(); > memblock_alloc_helpers_checks(); > memblock_alloc_nid_checks(); > + memblock_alloc_exact_nid_checks(); > > return 0; > } memblock_alloc_exact_nid_raw(NUMA_NO_NODE) behaves exactly the way memblock_alloc_try_nid_raw(NUMA_NO_NODE) behaves -- which is essentially memblock_alloc_raw(). So do we really need a separate set of tests for these? -- Thanks, David / dhildenb ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw 2022-10-10 11:16 ` [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw David Hildenbrand @ 2022-10-11 4:19 ` Rebecca Mckeever 2022-10-11 9:36 ` David Hildenbrand 0 siblings, 1 reply; 5+ messages in thread From: Rebecca Mckeever @ 2022-10-11 4:19 UTC (permalink / raw) To: David Hildenbrand; +Cc: Mike Rapoport, linux-mm, linux-kernel On Mon, Oct 10, 2022 at 01:16:03PM +0200, David Hildenbrand wrote: > On 03.10.22 01:41, Rebecca Mckeever wrote: > > Add tests for memblock_alloc_exact_nid_raw() that are very similar to > > the range tests for memblock_alloc_try_nid_raw(). > > > > Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> > > --- > > tools/testing/memblock/Makefile | 2 +- > > tools/testing/memblock/main.c | 2 + > > .../memblock/tests/alloc_exact_nid_api.c | 1208 +++++++++++++++++ > > .../memblock/tests/alloc_exact_nid_api.h | 9 + > > 4 files changed, 1220 insertions(+), 1 deletion(-) > > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c > > create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h > > > > diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile > > index 246f7ac8489b..2310ac4d080e 100644 > > --- a/tools/testing/memblock/Makefile > > +++ b/tools/testing/memblock/Makefile > > @@ -7,7 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \ > > LDFLAGS += -fsanitize=address -fsanitize=undefined > > TARGETS = main > > TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \ > > - tests/basic_api.o tests/common.o > > + tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o > > DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o > > OFILES = main.o $(DEP_OFILES) $(TEST_OFILES) > > EXTR_SRC = ../../../mm/memblock.c > > diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c > > index 4ca1024342b1..278f9dec5008 100644 > > --- a/tools/testing/memblock/main.c > > +++ b/tools/testing/memblock/main.c > > @@ -3,6 +3,7 @@ > > #include "tests/alloc_api.h" > > #include "tests/alloc_helpers_api.h" > > #include "tests/alloc_nid_api.h" > > +#include "tests/alloc_exact_nid_api.h" > > #include "tests/common.h" > > int main(int argc, char **argv) > > @@ -12,6 +13,7 @@ int main(int argc, char **argv) > > memblock_alloc_checks(); > > memblock_alloc_helpers_checks(); > > memblock_alloc_nid_checks(); > > + memblock_alloc_exact_nid_checks(); > > return 0; > > } > > > memblock_alloc_exact_nid_raw(NUMA_NO_NODE) behaves exactly the way > memblock_alloc_try_nid_raw(NUMA_NO_NODE) behaves -- which is essentially > memblock_alloc_raw(). > > So do we really need a separate set of tests for these? > Instead of a separate set of tests, I could add a flag for memblock_alloc_exact_nid_raw() to test_flags so that the range tests in alloc_nid_api.c could be run with that flag. Do you think I should do that, or omit tests for memblock_alloc_exact_nid_raw(NUMA_NO_NODE) altogether? > -- > Thanks, > > David / dhildenb > Thanks, Rebecca ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw 2022-10-11 4:19 ` Rebecca Mckeever @ 2022-10-11 9:36 ` David Hildenbrand 0 siblings, 0 replies; 5+ messages in thread From: David Hildenbrand @ 2022-10-11 9:36 UTC (permalink / raw) To: Rebecca Mckeever; +Cc: Mike Rapoport, linux-mm, linux-kernel On 11.10.22 06:19, Rebecca Mckeever wrote: > On Mon, Oct 10, 2022 at 01:16:03PM +0200, David Hildenbrand wrote: >> On 03.10.22 01:41, Rebecca Mckeever wrote: >>> Add tests for memblock_alloc_exact_nid_raw() that are very similar to >>> the range tests for memblock_alloc_try_nid_raw(). >>> >>> Signed-off-by: Rebecca Mckeever <remckee0@gmail.com> >>> --- >>> tools/testing/memblock/Makefile | 2 +- >>> tools/testing/memblock/main.c | 2 + >>> .../memblock/tests/alloc_exact_nid_api.c | 1208 +++++++++++++++++ >>> .../memblock/tests/alloc_exact_nid_api.h | 9 + >>> 4 files changed, 1220 insertions(+), 1 deletion(-) >>> create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.c >>> create mode 100644 tools/testing/memblock/tests/alloc_exact_nid_api.h >>> >>> diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile >>> index 246f7ac8489b..2310ac4d080e 100644 >>> --- a/tools/testing/memblock/Makefile >>> +++ b/tools/testing/memblock/Makefile >>> @@ -7,7 +7,7 @@ CFLAGS += -I. -I../../include -Wall -O2 -fsanitize=address \ >>> LDFLAGS += -fsanitize=address -fsanitize=undefined >>> TARGETS = main >>> TEST_OFILES = tests/alloc_nid_api.o tests/alloc_helpers_api.o tests/alloc_api.o \ >>> - tests/basic_api.o tests/common.o >>> + tests/basic_api.o tests/common.o tests/alloc_exact_nid_api.o >>> DEP_OFILES = memblock.o lib/slab.o mmzone.o slab.o >>> OFILES = main.o $(DEP_OFILES) $(TEST_OFILES) >>> EXTR_SRC = ../../../mm/memblock.c >>> diff --git a/tools/testing/memblock/main.c b/tools/testing/memblock/main.c >>> index 4ca1024342b1..278f9dec5008 100644 >>> --- a/tools/testing/memblock/main.c >>> +++ b/tools/testing/memblock/main.c >>> @@ -3,6 +3,7 @@ >>> #include "tests/alloc_api.h" >>> #include "tests/alloc_helpers_api.h" >>> #include "tests/alloc_nid_api.h" >>> +#include "tests/alloc_exact_nid_api.h" >>> #include "tests/common.h" >>> int main(int argc, char **argv) >>> @@ -12,6 +13,7 @@ int main(int argc, char **argv) >>> memblock_alloc_checks(); >>> memblock_alloc_helpers_checks(); >>> memblock_alloc_nid_checks(); >>> + memblock_alloc_exact_nid_checks(); >>> return 0; >>> } >> >> >> memblock_alloc_exact_nid_raw(NUMA_NO_NODE) behaves exactly the way >> memblock_alloc_try_nid_raw(NUMA_NO_NODE) behaves -- which is essentially >> memblock_alloc_raw(). >> >> So do we really need a separate set of tests for these? >> > Instead of a separate set of tests, I could add a flag for > memblock_alloc_exact_nid_raw() to test_flags so that the range tests in > alloc_nid_api.c could be run with that flag. Do you think I should do > that, or omit tests for memblock_alloc_exact_nid_raw(NUMA_NO_NODE) > altogether? Good question. From an API point of view, it makes sense to test that API somehow. With implementation in mind, it doesn't make too much sense to test it twice. Whatever you prefer :) Just wanted to point out that separate tests don't make sense -- using a flag would be cleaner. -- Thanks, David / dhildenb ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-10-11 9:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1664753534.git.remckee0@gmail.com>
2022-10-02 23:41 ` [PATCH v2 5/5] memblock tests: remove completed TODO item Rebecca Mckeever
2022-10-10 9:07 ` David Hildenbrand
[not found] ` <c73a6fd7fc3fa4529a6e444b9602d9c63ded91fd.1664753534.git.remckee0@gmail.com>
2022-10-10 11:16 ` [PATCH v2 1/5] memblock tests: add range tests for memblock_alloc_exact_nid_raw David Hildenbrand
2022-10-11 4:19 ` Rebecca Mckeever
2022-10-11 9:36 ` David Hildenbrand
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).