]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/damon/sysfs.sh: test monitoring intervals goal dir
authorSeongJae Park <sj@kernel.org>
Fri, 22 May 2026 15:40:23 +0000 (08:40 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 4 Jun 2026 21:45:01 +0000 (14:45 -0700)
sysfs.sh DAMON selftest is not testing monitoring intervals goal
directory.  Add the test.

Link: https://lore.kernel.org/20260522154026.80546-13-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/sysfs.sh

index 1ac3e2ce8e448640f188ff0025261772a1495ba0..b3418214ed3589ee9980dc42fee5bd2f577aa746 100755 (executable)
@@ -282,6 +282,17 @@ test_targets()
        ensure_dir "$targets_dir/1" "not_exist"
 }
 
+
+test_intervals_goal()
+{
+       goal_dir=$1
+       ensure_dir "$goal_dir" "exist"
+       ensure_file "$goal_dir/access_bp" "exist" "600"
+       ensure_file "$goal_dir/aggrs" "exist" "600"
+       ensure_file "$goal_dir/min_sample_us" "exist" "600"
+       ensure_file "$goal_dir/max_sample_us" "exist" "600"
+}
+
 test_intervals()
 {
        intervals_dir=$1
@@ -289,6 +300,7 @@ test_intervals()
        ensure_file "$intervals_dir/aggr_us" "exist" "600"
        ensure_file "$intervals_dir/sample_us" "exist" "600"
        ensure_file "$intervals_dir/update_us" "exist" "600"
+       test_intervals_goal "$intervals_dir/intervals_goal"
 }
 
 test_damon_filter()