Skip to content

Commit 964e170

Browse files
sjp38torvalds
authored andcommitted
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/[email protected] Signed-off-by: SeongJae Park <[email protected]> Cc: Brendan Higgins <[email protected]> Cc: Shuah Khan <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 9f86d62 commit 964e170

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tools/testing/selftests/damon/debugfs_attrs.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ test_content() {
4444

4545
source ./_chk_dependency.sh
4646

47+
ksft_skip=4
48+
49+
damon_onoff="$DBGFS/monitor_on"
50+
if [ $(cat "$damon_onoff") = "on" ]
51+
then
52+
echo "monitoring is on"
53+
exit $ksft_skip
54+
fi
55+
4756
# Test attrs file
4857
# ===============
4958

0 commit comments

Comments
 (0)