Commit 61879eed authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton

mm/damon/dbgfs-test: skip dbgfs_set_init_regions() test if PADDR is not registered

The test depends on registration of DAMON_OPS_PADDR.  It would be
registered only when CONFIG_DAMON_PADDR is set.  DAMON core kunit tests do
fake ops registration for such case.  However, the functions for such fake
ops registration is not available to DAMON debugfs interface.  Just skip
the test in the case.

Link: https://lkml.kernel.org/r/20240827030336.7930-8-sj@kernel.org
Fixes: 999b9467 ("mm/damon/dbgfs-test: fix is_target_id() change")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: David Gow <davidgow@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 8e34bac5
......@@ -116,6 +116,11 @@ static void damon_dbgfs_test_set_init_regions(struct kunit *test)
int i, rc;
char buf[256];
if (!damon_is_registered_ops(DAMON_OPS_PADDR)) {
damon_destroy_ctx(ctx);
kunit_skip(test, "PADDR not registered");
}
damon_select_ops(ctx, DAMON_OPS_PADDR);
dbgfs_set_targets(ctx, 3, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment