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
[...]