Skip to content
Snippets Groups Projects
Commit 964e1701 authored by SeongJae Park's avatar SeongJae Park Committed by Linus Torvalds
Browse files

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 fail.  This commit makes the test
be skipped in this case.

Link: https://lkml.kernel.org/r/20211201150440.1088-8-sj@kernel.org


Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 9f86d624
No related branches found
No related tags found
No related merge requests found
......@@ -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
# ===============
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment