From: SeongJae Park <sj@kernel.org>
To: akpm@linux-foundation.org
Cc: SeongJae Park <sj@kernel.org>,
Jonathan.Cameron@Huawei.com, amit@kernel.org,
benh@kernel.crashing.org, corbet@lwn.net, david@redhat.com,
dwmw@amazon.com, elver@google.com, foersleo@amazon.de,
gthelen@google.com, markubo@amazon.de, rientjes@google.com,
shakeelb@google.com, shuah@kernel.org, linux-damon@amazon.com,
linux-mm@kvack.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 6/7] selftests/damon: Add 'schemes' debugfs tests
Date: Fri, 1 Oct 2021 12:56:03 +0000 [thread overview]
Message-ID: <20211001125604.29660-7-sj@kernel.org> (raw)
In-Reply-To: <20211001125604.29660-1-sj@kernel.org>
This commit adds simple selftets for 'schemes' debugfs file of DAMON.
Signed-off-by: SeongJae Park <sj@kernel.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
next prev parent reply other threads:[~2021-10-01 12:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 12:55 [PATCH 0/7] Implement Data Access Monitoring-based Memory Operation Schemes SeongJae Park
2021-10-01 12:55 ` [PATCH 1/7] mm/damon/core: Account age of target regions SeongJae Park
2021-10-01 12:55 ` [PATCH 2/7] mm/damon/core: Implement DAMON-based Operation Schemes (DAMOS) SeongJae Park
2021-10-01 12:56 ` [PATCH 3/7] mm/damon/vaddr: Support DAMON-based Operation Schemes SeongJae Park
2021-10-01 12:56 ` [PATCH 4/7] mm/damon/dbgfs: " SeongJae Park
2021-10-01 12:56 ` [PATCH 5/7] mm/damon/schemes: Implement statistics feature SeongJae Park
2021-10-01 12:56 ` SeongJae Park [this message]
2021-10-01 12:56 ` [PATCH 7/7] Docs/admin-guide/mm/damon: Document DAMON-based Operation Schemes SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211001125604.29660-7-sj@kernel.org \
--to=sj@kernel.org \
--cc=Jonathan.Cameron@Huawei.com \
--cc=akpm@linux-foundation.org \
--cc=amit@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=corbet@lwn.net \
--cc=david@redhat.com \
--cc=dwmw@amazon.com \
--cc=elver@google.com \
--cc=foersleo@amazon.de \
--cc=gthelen@google.com \
--cc=linux-damon@amazon.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=markubo@amazon.de \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.