mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Ian Rogers <irogers@google.com>,
	linux-perf-users@vger.kernel.org,
	John Garry <john.garry@huawei.com>, Will Deacon <will@kernel.org>,
	James Clark <james.clark@arm.com>,
	Mike Leach <mike.leach@linaro.org>,
	German Gomez <german.gomez@arm.com>
Subject: Re: [PATCH v2] perf test: Add ARM SPE system wide test
Date: Fri, 17 Jun 2022 15:38:40 +0800	[thread overview]
Message-ID: <20220617073840.GA45710@leoy-ThinkPad-X240s> (raw)
In-Reply-To: <20220616230546.1390813-1-namhyung@kernel.org>

Hi Namhyung,

On Thu, Jun 16, 2022 at 04:05:46PM -0700, Namhyung Kim wrote:

[...]

> +arm_spe_system_wide_test() {
> +	echo "Recording trace with system-wide mode $perfdata"
> +	perf record -o ${perfdata} -e arm_spe// -a \
> +		-- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1
> +
> +	if [ $? != 0 ]; then
> +		arm_spe_report "SPE system-wide testing" 2
> +		return
> +	fi

I am awared the root permission issue after I saw German's suggestion.

If the snapshot test is passed, no matter the system wide test is passed
or not, we will always return 0 for 'passed' result.  But we might miss
to capture the system-wide testing failure.

How about use 'dummy' event to verіfy the root permission?
(actually I referred to intel-pt test):

        perf record -o ${tmpfile} -B -N --no-bpf-event -e dummy:u -a true 2>&1 >/dev/null
        if [ $? != 0 ]; then
        	arm_spe_report "SPE system-wide testing" 2
        	return
        fi

        perf record -o ${perfdata} -e arm_spe// -a \
                  -- dd if=/dev/zero of=/dev/null count=100000 > /dev/null 2>&1

Thanks,
Leo

> +	perf_script_samples dd &&
> +	perf_report_samples dd
> +
> +	err=$?
> +	arm_spe_report "SPE system-wide testing" $err
> +}
> +
>  arm_spe_snapshot_test
> +arm_spe_system_wide_test
> +
>  exit $glb_err
> -- 
> 2.36.1.476.g0c4daa206d-goog
> 

  reply	other threads:[~2022-06-17  7:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-16 23:05 Namhyung Kim
2022-06-17  7:38 ` Leo Yan [this message]
2022-06-17  7:45   ` Leo Yan
2022-06-24  6:22     ` 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=20220617073840.GA45710@leoy-ThinkPad-X240s \
    --to=leo.yan@linaro.org \
    --cc=acme@kernel.org \
    --cc=german.gomez@arm.com \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=john.garry@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=mike.leach@linaro.org \
    --cc=mingo@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    --cc=will@kernel.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

all inboxes | Powered by JetHome®