mm-damon-add-kunit-tests.patch removed from -mm tree
The patch titled
Subject: mm/damon: add kunit tests
has been removed from the -mm tree. Its filename was
mm-damon-add-kunit-tests.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: mm/damon: add kunit tests
This commit adds kunit based unit tests for the core and the virtual address spaces monitoring primitives of DAMON.
Signed-off-by SeongJae Park <[email protected]>
Reviewed-by Brendan Higgins <[email protected]>
Cc Alexander Shishkin <[email protected]>
Cc Amit Shah <[email protected]>
Cc Benjamin Herrenschmidt <[email protected]>
Cc David Hildenbrand <[email protected]>
Cc David Rientjes <[email protected]>
Cc David Woodhouse <[email protected]>
Cc Fan Du <[email protected]>
Cc Fernand Sieber <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
Cc Greg Thelen <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Joe Perches <[email protected]>
Cc Jonathan Cameron <[email protected]>
Cc Jonathan Corbet <[email protected]>
Cc Leonard Foerster <[email protected]>
Cc Marco Elver <[email protected]>
Cc Markus Boehme <[email protected]>
Cc Maximilian Heyne <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Minchan Kim <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Rik van Riel <[email protected]>
Cc Shakeel Butt <[email protected]>
Cc Shuah Khan <[email protected]>
Cc Steven Rostedt (VMware) <[email protected]>
Cc Vladimir Davydov <[email protected]>
Cc Vlastimil Babka <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/damon/Kconfig | 36 ++++ mm/damon/core-test.h | 253 ++++++++++++++++++++++++++++++ mm/damon/core.c | 7 mm/damon/dbgfs-test.h | 126 +++++++++++++++ mm/damon/dbgfs.c | 2 mm/damon/vaddr-test.h | 329 ++++++++++++++++++++++++++++++++++++++++ mm/damon/vaddr.c | 7 7 files changed, 760 insertions(+)
mm/damon/core.c renamed from mm/damon/core.c~mm-damon-add-kunit-tests +7 -0
@@ -16,6 +16,11 @@#define CREATE_TRACE_POINTS #include <trace/events/damon.h> +#ifdef CONFIG_DAMON_KUNIT_TEST +#undef DAMON_MIN_REGION +#define DAMON_MIN_REGION 1 +#endif +/* Get a random number in [l, r) */ #define damon_rand (l, r) (l + prandom_u32_max(r - l))
@@ -711,3 +716,5 @@ static int kdamond_fn(void *data)do_exit (0 ); } + +#include "core-test.h"
mm/damon/core-test.h new file +253 -0
253 lines not on this page · raw message
mm/damon/dbgfs.c renamed from mm/damon/dbgfs.c~mm-damon-add-kunit-tests +2 -0
@@ -619,3 +619,5 @@ static int __init damon_dbgfs_init(void) }module_init (damon_dbgfs_init); + +#include "dbgfs-test.h"
mm/damon/dbgfs-test.h new file +126 -0
126 lines not on this page · raw message
mm/damon/Kconfig renamed from mm/damon/Kconfig~mm-damon-add-kunit-tests +36 -0
@@ -12,6 +12,18 @@ config DAMON See https://damonitor.github.io/doc/html/latest-damon/index.html for more information. +config DAMON_KUNIT_TEST + bool "Test for damon" if !KUNIT_ALL_TESTS + depends on DAMON && KUNIT=y + default KUNIT_ALL_TESTS + help + This builds the DAMON Kunit test suite. + + For more information on KUnit and unit tests in general, please refer + to the KUnit documentation. + + If unsure, say N. + config DAMON_VADDR bool "Data access monitoring primitives for virtual address spaces" depends on DAMON && MMU
@@ -20,6 +32,18 @@ config DAMON_VADDR This builds the default data access monitoring primitives for DAMON that works for virtual address spaces. +config DAMON_VADDR_KUNIT_TEST + bool "Test for DAMON primitives" if !KUNIT_ALL_TESTS + depends on DAMON_VADDR && KUNIT=y + default KUNIT_ALL_TESTS + help + This builds the DAMON virtual addresses primitives Kunit test suite. + + For more information on KUnit and unit tests in general, please refer + to the KUnit documentation. + + If unsure, say N. + config DAMON_DBGFS bool "DAMON debugfs interface" depends on DAMON_VADDR && DEBUG_FS
@@ -29,4 +53,16 @@ config DAMON_DBGFS If unsure, say N. +config DAMON_DBGFS_KUNIT_TEST + bool "Test for damon debugfs interface" if !KUNIT_ALL_TESTS + depends on DAMON_DBGFS && KUNIT=y + default KUNIT_ALL_TESTS + help + This builds the DAMON debugfs interface Kunit test suite. + + For more information on KUnit and unit tests in general, please refer + to the KUnit documentation. + + If unsure, say N. + endmenu
mm/damon/vaddr.c renamed from mm/damon/vaddr.c~mm-damon-add-kunit-tests +7 -0
@@ -18,6 +18,11 @@#include <linux/sched/mm.h> #include <linux/slab.h> +#ifdef CONFIG_DAMON_VADDR_KUNIT_TEST +#undef DAMON_MIN_REGION +#define DAMON_MIN_REGION 1 +#endif +/* Get a random number in [l, r) */ #define damon_rand (l, r) (l + prandom_u32_max(r - l))
@@ -663,3 +668,5 @@ void damon_va_set_primitives(struct damo ctx->primitive.target_valid = damon_va_target_valid; ctx->primitive.cleanup =NULL ; } + +#include "vaddr-test.h"
mm/damon/vaddr-test.h new file +329 -0
329 lines not on this page · raw message
_
Patches currently in -mm which might be from [email protected] are