]> www.infradead.org Git - users/willy/xarray.git/commit
mm/damon/core-test: fix damon_test_ops_registration() for DAMON_VADDR unset case
authorSeongJae Park <sj@kernel.org>
Tue, 27 Aug 2024 03:03:32 +0000 (20:03 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Sep 2024 04:15:57 +0000 (21:15 -0700)
commite43772dcdf21a8cdf3666ee35b2a7166ad39b255
tree9e6b005c8c8e9699a588847439e5b3eae9a2f701
parent9fcce7e7be38fc1da7673d2d69d72ab5c66d154e
mm/damon/core-test: fix damon_test_ops_registration() for DAMON_VADDR unset case

DAMON core kunit test can be executed without CONFIG_DAMON_VADDR.  In the
case, vaddr DAMON ops is not registered.  Meanwhile, ops registration
kunit test assumes the vaddr ops is registered.  Check and handle the case
by registrering fake vaddr ops inside the test code.

Link: https://lkml.kernel.org/r/20240827030336.7930-6-sj@kernel.org
Fixes: 4f540f5ab4f2 ("mm/damon/core-test: add a kunit test case for ops registration")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: David Gow <davidgow@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core-test.h