All of lore.kernel.org
 help / color / mirror / Atom feed
From: SeongJae Park <sj38.park@gmail.com>
To: Shuah Khan <skhan@linuxfoundation.org>
Cc: SeongJae Park <sj@kernel.org>,
	Gautam <gautammenghani201@gmail.com>,
	shuah@kernel.org, damon@lists.linux.dev, linux-mm@kvack.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4] kselftests/damon: add support for cases where debugfs cannot be read
Date: Mon, 27 Jun 2022 18:57:04 +0000	[thread overview]
Message-ID: <20220627185704.58902-1-sj38.park@gmail.com> (raw)
In-Reply-To: <7d6b7de6-4609-e6ca-0a88-1f9799c70769@linuxfoundation.org>

From: SeongJae Park <sj@kernel.org>

Hi Shuah,

On Mon, 27 Jun 2022 11:00:18 -0600 Shuah Khan <skhan@linuxfoundation.org> wrote:

[...]
> >> --- a/tools/testing/selftests/damon/_chk_dependency.sh
> >> +++ b/tools/testing/selftests/damon/_chk_dependency.sh
> >> @@ -26,3 +26,13 @@ do
> >>   		exit 1
> >>   	fi
> >>   done
> >> +
> >> +permission_error="Operation not permitted"
> >> +for f in attrs target_ids monitor_on
> >> +do
> >> +	status=$( cat "$DBGFS/$f" 2>&1 )
> >> +	if [ "${status#*$permission_error}" != "$status" ]; then
> >> +		echo "Permission for reading $DBGFS/$f denied; maybe secureboot enabled?"
> 
> btw - does this run as a regular user or does it need root privilege?
> If so add a test for that and skip with a message.

It needs the root permission, and does the check at the beginning[1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/testing/selftests/damon/_chk_dependency.sh?h=v5.19-rc4#n9


Thanks,
SJ

> >> +		exit $ksft_skip
> >> +	fi
> >> +done
> >> -- 
> >> 2.36.1
> >
> thanks,
> -- Shuah

  reply	other threads:[~2022-06-27 18:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-24 19:52 [PATCH] kselftests/damon: add support for checking secureboot status Gautam
2022-06-24 20:29 ` SeongJae Park
2022-06-25  5:56   ` [PATCH v2] kselftests/damon: add support for cases where debugfs cannot be read Gautam
2022-06-25  8:35     ` [PATCH v3] " Gautam
2022-06-25 18:55       ` SeongJae Park
2022-06-25 19:52         ` [PATCH v4] " Gautam
2022-06-25 20:03           ` SeongJae Park
2022-06-27 17:00             ` Shuah Khan
2022-06-27 18:57               ` SeongJae Park [this message]
2022-06-27 19:46                 ` Shuah Khan
     [not found]               ` <Yrn6BxU298rzjiak@fedora>
2022-06-28  3:37                 ` Gautam Menghani

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=20220627185704.58902-1-sj38.park@gmail.com \
    --to=sj38.park@gmail.com \
    --cc=damon@lists.linux.dev \
    --cc=gautammenghani201@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=shuah@kernel.org \
    --cc=sj@kernel.org \
    --cc=skhan@linuxfoundation.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.