[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20211001125604.29660-7-sj@kernel.org>
Date: Fri, 1 Oct 2021 12:56:03 +0000
From: SeongJae Park <sj@...nel.org>
To: akpm@...ux-foundation.org
Cc: SeongJae Park <sj@...nel.org>, Jonathan.Cameron@...wei.com,
amit@...nel.org, benh@...nel.crashing.org, corbet@....net,
david@...hat.com, dwmw@...zon.com, elver@...gle.com,
foersleo@...zon.de, gthelen@...gle.com, markubo@...zon.de,
rientjes@...gle.com, shakeelb@...gle.com, shuah@...nel.org,
linux-damon@...zon.com, linux-mm@...ck.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 6/7] selftests/damon: Add 'schemes' debugfs tests
This commit adds simple selftets for 'schemes' debugfs file of DAMON.
Signed-off-by: SeongJae Park <sj@...nel.org>
---
tools/testing/selftests/damon/debugfs_attrs.sh | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/tools/testing/selftests/damon/debugfs_attrs.sh b/tools/testing/selftests/damon/debugfs_attrs.sh
index bfabb19dc0d3..639cfb6a1f65 100755
--- a/tools/testing/selftests/damon/debugfs_attrs.sh
+++ b/tools/testing/selftests/damon/debugfs_attrs.sh
@@ -57,6 +57,19 @@ test_write_fail "$file" "1 2 3 5 4" "$orig_content" \
test_content "$file" "$orig_content" "1 2 3 4 5" "successfully written"
echo "$orig_content" > "$file"
+# Test schemes file
+# =================
+
+file="$DBGFS/schemes"
+orig_content=$(cat "$file")
+
+test_write_succ "$file" "1 2 3 4 5 6 4" \
+ "$orig_content" "valid input"
+test_write_fail "$file" "1 2
+3 4 5 6 3" "$orig_content" "multi lines"
+test_write_succ "$file" "" "$orig_content" "disabling"
+echo "$orig_content" > "$file"
+
# Test target_ids file
# ====================
--
2.17.1
Powered by blists - more mailing lists