[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211201150440.1088-8-sj@kernel.org>
Date: Wed, 1 Dec 2021 15:04:36 +0000
From: SeongJae Park <sj@...nel.org>
To: akpm@...ux-foundation.org
Cc: shuah@...nel.org, brendanhiggins@...gle.com, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
SeongJae Park <sj@...nel.org>
Subject: [PATCH 07/11] selftests/damon: Skip test if DAMON is running
Testing the DAMON debugfs files while DAMON is running makes no sense,
as any write to the debugfs files will fails. This commit makes the
test be skipped in the case.
Signed-off-by: SeongJae Park <sj@...nel.org>
---
tools/testing/selftests/damon/debugfs_attrs.sh | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/tools/testing/selftests/damon/debugfs_attrs.sh b/tools/testing/selftests/damon/debugfs_attrs.sh
index 196b6640bf37..fc80380c59f0 100644
--- a/tools/testing/selftests/damon/debugfs_attrs.sh
+++ b/tools/testing/selftests/damon/debugfs_attrs.sh
@@ -44,6 +44,15 @@ test_content() {
source ./_chk_dependency.sh
+ksft_skip=4
+
+damon_onoff="$DBGFS/monitor_on"
+if [ $(cat "$damon_onoff") = "on" ]
+then
+ echo "monitoring is on"
+ exit $ksft_skip
+fi
+
# Test attrs file
# ===============
--
2.17.1
Powered by blists - more mailing lists