[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b82a3829-9ea9-1dbd-7318-f6ac4e5ea94e@intel.com>
Date: Fri, 21 Oct 2022 11:45:47 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Namhyung Kim <namhyung@...nel.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>,
linux-perf-users@...r.kernel.org
Subject: Re: [PATCH 6/8] perf test: Add target workload test in perf record
tests
On 20/10/22 20:26, Namhyung Kim wrote:
> Add a subtest which profiles the given workload on the command line.
> As it's a minimal requirement, test should run ok so it doesn't skip
> the test even if it failed to run the perf record.
>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Reviewed-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
> tools/perf/tests/shell/record.sh | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/shell/record.sh
> index 345764afb745..c59d1459c960 100755
> --- a/tools/perf/tests/shell/record.sh
> +++ b/tools/perf/tests/shell/record.sh
> @@ -174,11 +174,29 @@ test_system_wide() {
> echo "Basic --system-wide mode test [Success]"
> }
>
> +test_workload() {
> + echo "Basic target workload test"
> + if ! perf record -o "${perfdata}" ${testprog} 2> /dev/null
> + then
> + echo "Workload record [Failed record]"
> + err=1
> + return
> + fi
> + if ! perf report -i "${perfdata}" -q | grep -q "${testsym}"
> + then
> + echo "Workload record [Failed missing output]"
> + err=1
> + return
> + fi
> + echo "Basic target workload test [Success]"
> +}
> +
> build_test_program
>
> test_per_thread
> test_register_capture
> test_system_wide
> +test_workload
>
> cleanup
> exit $err
Powered by blists - more mailing lists