From: SeongJae Park <sj@kernel.org>
To: SeongJae Park <sj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>,
damon@lists.linux.dev, kunit-dev@googlegroups.com,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-mm@kvack.org
Subject: Re: [RFC PATCH 09/10] mm/damon/tests/.kunitconifg: enable DAMON_DEBUG_SANITY
Date: Sat, 21 Feb 2026 12:15:41 -0800 [thread overview]
Message-ID: <20260221201543.99335-1-sj@kernel.org> (raw)
In-Reply-To: <20260221193629.19332-10-sj@kernel.org>
On Sat, 21 Feb 2026 11:36:26 -0800 SeongJae Park <sj@kernel.org> wrote:
> CONFIG_DAMON_DEBUG_SANITY is recommended for DAMON development and test
> setups. Enable it on the default configurations for DAMON kunit test
> run.
>
> Signed-off-by: SeongJae Park <sj@kernel.org>
> ---
> mm/damon/tests/.kunitconfig | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/mm/damon/tests/.kunitconfig b/mm/damon/tests/.kunitconfig
> index 36a450f57b581..144d27e6ecc5c 100644
> --- a/mm/damon/tests/.kunitconfig
> +++ b/mm/damon/tests/.kunitconfig
> @@ -13,3 +13,6 @@ CONFIG_DAMON_VADDR_KUNIT_TEST=y
> CONFIG_SYSFS=y
> CONFIG_DAMON_SYSFS=y
> CONFIG_DAMON_SYSFS_KUNIT_TEST=y
> +
> +# enable DAMON_DEBUG_SANITY to catch any bug
> +CONFIG_DAMON_DEBUG_SANITY=y
And this makes kunit for DAMON fails, like below.
'''
$ ./tools/testing/kunit/kunit.py run --kunitconfig mm/damon/tests/
[11:57:20] Configuring KUnit Kernel ...
Regenerating .config ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
[11:57:24] Building KUnit Kernel ...
Populating config with:
$ make ARCH=um O=.kunit olddefconfig
Building with:
$ make all compile_commands.json scripts_gdb ARCH=um O=.kunit --jobs=8
ERROR:root:In file included from ../include/asm-generic/bug.h:7,
from ./arch/um/include/generated/asm/bug.h:1,
from ../arch/x86/include/asm/alternative.h:9,
from ../arch/x86/um/asm/barrier.h:6,
from ../include/linux/list.h:11,
from ../arch/um/include/linux/time-internal.h:9,
from ../arch/x86/um/asm/processor.h:4,
from ../include/linux/sched.h:13,
from ../include/linux/cgroup.h:12,
from ../include/linux/memcontrol.h:13,
from ../include/linux/damon.h:11,
from ../mm/damon/core.c:10:
../mm/damon/core.c: In function ‘damon_verify_new_region’:
../include/linux/once_lite.h:28:50: error: expected expression before ‘)’ token
28 | bool __ret_do_once = !!(condition); \
| ^
../include/asm-generic/bug.h:185:9: note: in expansion of macro ‘DO_ONCE_LITE_IF’
185 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ^~~~~~~~~~~~~~~
../mm/damon/core.c:127:9: note: in expansion of macro ‘WARN_ONCE’
127 | WARN_ONCE();
| ^~~~~~~~~
'''
I changed BUG() to WARN_ONCE() on the last moment of this patch posting, so I
missed this failure. I will fix this on the next revision.
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-02-21 20:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-21 19:36 [RFC PATCH 00/10] mm/damon: add optional debugging-purpose sanity checks SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 01/10] mm/damon: add CONFIG_DAMON_DEBUG_SANITY SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 02/10] mm/damon/core: add damon_new_region() debug_sanity check SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 03/10] mm/damon/core: add damon_del_region() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 04/10] mm/damon/core: add damon_nr_regions() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 05/10] mm/damon/core: add damon_merge_two_regions() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 06/10] mm/damon/core: add damon_merge_regions_of() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 07/10] mm/damon/core: add damon_split_region_at() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 08/10] mm/damon/core: add damon_reset_aggregated() " SeongJae Park
2026-02-21 19:36 ` [RFC PATCH 09/10] mm/damon/tests/.kunitconifg: enable DAMON_DEBUG_SANITY SeongJae Park
2026-02-21 20:15 ` SeongJae Park [this message]
2026-02-21 19:36 ` [RFC PATCH 10/10] tools/testing/selftests/damon/config: " SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260221201543.99335-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=brendan.higgins@linux.dev \
--cc=damon@lists.linux.dev \
--cc=davidgow@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox