Commit 501e3dc5 authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton

selftests/damon/_chk_dependency: get debugfs mount point from /proc/mounts

DAMON debugfs selftests dependency checker assumes debugfs would be
mounted at /sys/kernel/debug.  That would be ok for many cases, but some
systems might mounted the file system on some different places.  Parse the
real mount point using /proc/mounts file.

Link: https://lkml.kernel.org/r/20240207203134.69976-9-sj@kernel.orgSigned-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent f08db42b
......@@ -4,7 +4,14 @@
# Kselftest framework requirement - SKIP code is 4.
ksft_skip=4
DBGFS=/sys/kernel/debug/damon
DBGFS=$(grep debugfs /proc/mounts --max-count 1 | awk '{print $2}')
if [ "$DBGFS" = "" ]
then
echo "debugfs not mounted"
exit $ksft_skip
fi
DBGFS+="/damon"
if [ $EUID -ne 0 ];
then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment