Skip to contentSkip to conversation

selftests-damon-test-quota-goals-directory.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Dec 12, 2023

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/damon: test quota goals directory
has been removed from the -mm tree. Its filename was
selftests-damon-test-quota-goals-directory.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: selftests/damon: test quota goals directory
Date: Thu, 30 Nov 2023 02:36:49 +0000

Add DAMON selftests for testing creation/existence of quota goals directories and files, and simple valid input writes.

---

 tools/testing/selftests/damon/sysfs.sh |   27 +++++++++++++++++++++++
 1 file changed, 27 insertions(+)
tools/testing/selftests/damon/sysfs.sh renamed from tools/testing/selftests/damon/sysfs.sh~selftests-damon-test-quota-goals-directory +27 -0
@@ -150,6 +150,32 @@ test_weights()
 	ensure_file "$weights_dir/age_permil" "exist" "600"
 }
 
+test_goal()
+{
+	goal_dir=$1
+	ensure_dir "$goal_dir" "exist"
+	ensure_file "$goal_dir/target_value" "exist" "600"
+	ensure_file "$goal_dir/current_value" "exist" "600"
+}
+
+test_goals()
+{
+	goals_dir=$1
+	ensure_dir "$goals_dir" "exist"
+	ensure_file "$goals_dir/nr_goals" "exist" "600"
+
+	ensure_write_succ  "$goals_dir/nr_goals" "1" "valid input"
+	test_goal "$goals_dir/0"
+
+	ensure_write_succ  "$goals_dir/nr_goals" "2" "valid input"
+	test_goal "$goals_dir/0"
+	test_goal "$goals_dir/1"
+
+	ensure_write_succ  "$goals_dir/nr_goals" "0" "valid input"
+	ensure_dir "$goals_dir/0" "not_exist"
+	ensure_dir "$goals_dir/1" "not_exist"
+}
+
 test_quotas()
 {
 	quotas_dir=$1
@@ -158,6 +184,7 @@ test_quotas()
 	ensure_file "$quotas_dir/bytes" "exist" 600
 	ensure_file "$quotas_dir/reset_interval_ms" "exist" 600
 	test_weights "$quotas_dir/weights"
+	test_goals "$quotas_dir/goals"
 }
 
 test_access_pattern()

_

Patches currently in -mm which might be from [email protected] are

mm-damon-core-make-damon_start-waits-until-kdamond_fn-starts.patch