selftests/damon: introduce _common.sh to host shared function

The current test scripts contain duplicated root permission checks in
multiple locations.  This patch consolidates these checks into _common.sh
to eliminate code redundancy.

Link: https://lkml.kernel.org/r/20250718064217.299300-1-lienze@kylinos.cn
Signed-off-by: Enze Li <lienze@kylinos.cn>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Enze Li 2025-07-18 14:42:17 +08:00 • committed by Andrew Morton
commit 511914506d
5 changed files with 22 additions and 24 deletions