From: Swapnil Sapkal <swapnil.sapkal@amd.com>
To: Namhyung Kim <namhyung@kernel.org>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Ian Rogers <irogers@google.com>,
James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
<linux-perf-users@vger.kernel.org>
Subject: Re: [PATCH] perf test: Skip sched stats test for !root
Date: Mon, 6 Apr 2026 10:59:45 +0530 [thread overview]
Message-ID: <303dfa89-9f81-4a16-ac28-03ab00be0f09@amd.com> (raw)
In-Reply-To: <20260405051644.61511-1-namhyung@kernel.org>
Hi Namhyung,
On 05-04-2026 10:46, Namhyung Kim wrote:
> Running perf sched stats requires root and it fails to open the
> schedstat file for regular users. Let's skip the test.
>
> $ perf sched stats true
> Failed to open /proc/sys/kernel/sched_schedstats
>
> Cc: Swapnil Sapkal <swapnil.sapkal@amd.com>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Swapnil Sapkal <swapnil.sapkal@amd.com>
--
Thanks and Regards,
Swapnil
> ---
> tools/perf/tests/shell/perf_sched_stats.sh | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/tools/perf/tests/shell/perf_sched_stats.sh b/tools/perf/tests/shell/perf_sched_stats.sh
> index 2b1410b050d04737..41ee41fbf0253d55 100755
> --- a/tools/perf/tests/shell/perf_sched_stats.sh
> +++ b/tools/perf/tests/shell/perf_sched_stats.sh
> @@ -4,6 +4,11 @@
>
> set -e
>
> +if [ "$(id -u)" != 0 ]; then
> + echo "[Skip] No root permission"
> + exit 2
> +fi
> +
> err=0
> test_perf_sched_stats_record() {
> echo "Basic perf sched stats record test"
next prev parent reply other threads:[~2026-04-06 5:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 5:16 [PATCH] perf test: Skip sched stats test for !root Namhyung Kim
2026-04-05 17:19 ` Ian Rogers
2026-04-06 5:29 ` Swapnil Sapkal [this message]
2026-04-06 17:51 ` Namhyung Kim
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=303dfa89-9f81-4a16-ac28-03ab00be0f09@amd.com \
--to=swapnil.sapkal@amd.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox