summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-08-03 00:43:03 +0300
committerAndrew Morton <akpm@linux-foundation.org>2023-08-21 23:37:36 +0300
commit4c45c20d53488d05da6e240f3ac4dffbd3963f94 (patch)
treed643d58d28559f296239e48c30b07989dd30addd /tools
parent26713c8908752a7edca18dcafe88e36dccfb41a2 (diff)
downloadlinux-4c45c20d53488d05da6e240f3ac4dffbd3963f94.tar.xz
selftests/damon/sysfs: test address range damos filter
Add a selftest for checking existence of addr_{start,end} files under DAMOS filter directory, and 'addr' damos filter type input of DAMON sysfs interface. Link: https://lkml.kernel.org/r/20230802214312.110532-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/damon/sysfs.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/damon/sysfs.sh b/tools/testing/selftests/damon/sysfs.sh
index 967e27267549..5677cfd342fc 100644
--- a/tools/testing/selftests/damon/sysfs.sh
+++ b/tools/testing/selftests/damon/sysfs.sh
@@ -103,9 +103,12 @@ test_filter()
ensure_file "$filter_dir/type" "exist" "600"
ensure_write_succ "$filter_dir/type" "anon" "valid input"
ensure_write_succ "$filter_dir/type" "memcg" "valid input"
+ ensure_write_succ "$filter_dir/type" "addr" "valid input"
ensure_write_fail "$filter_dir/type" "foo" "invalid input"
ensure_file "$filter_dir/matching" "exist" "600"
ensure_file "$filter_dir/memcg_path" "exist" "600"
+ ensure_file "$filter_dir/addr_start" "exist" "600"
+ ensure_file "$filter_dir/addr_end" "exist" "600"
}
test_filters()