From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Anup Sharma <anupnewsmail@gmail.com>
Cc: Ian Rogers <irogers@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] perf: test: Add support for testing JSON generated by perf data command
Date: Mon, 22 May 2023 15:31:05 -0300 [thread overview]
Message-ID: <ZGu06UDugpWRhhQI@kernel.org> (raw)
In-Reply-To: <ZGu0RP9JVeoDQQXW@kernel.org>
Em Mon, May 22, 2023 at 03:28:20PM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Mon, May 22, 2023 at 11:10:43AM -0700, Ian Rogers escreveu:
> > On Fri, May 19, 2023 at 12:41 AM Anup Sharma <anupnewsmail@gmail.com> wrote:
> > >
> > > This commit adds support for testing the JSON output generated
> > > by the perf data command's conversion to JSON functionality.
> > > The test script now includes a validation step to ensure that
> > > the resulting JSON file is contain valid data.
> > >
> > > Signed-off-by: Anup Sharma <anupnewsmail@gmail.com>
> >
> > Acked-by: Ian Rogers <irogers@google.com>
>
> I'm fixing these and some other identation minor issues:
The ones below, using 'set list' on vim, look at the mix of tabs with
spaces:
+validate_json_format()$
+{$
+ echo "Validating Perf Data Converted JSON file"$
+ if [ -f "$result" ]$
+ then$
+ if $PYTHON -c "import json; json.load(open('$result'))" >/dev/null 2>&1$
+^Ithen$
+ echo "The file contains valid JSON format [SUCCESS]"$
+ else$
+ echo "The file does not contain valid JSON format [FAILED]"$
+ err=1$
+^I exit$
+ fi$
+ else$
+ echo "File not found [FAILED]"$
+ err=2$
+ exit$
+ fi$
+}$
+$
+test_json_converter_command$
> [acme@quaco perf-tools-next]$ b4 am -ctsl --cc-trailers CAP-5=fXyqWYgR0M0rqG8a2j0sL1WThNX8r49T7EfvkOG32-UqA@mail.gmail.com
> Grabbing thread from lore.kernel.org/all/CAP-5%3DfXyqWYgR0M0rqG8a2j0sL1WThNX8r49T7EfvkOG32-UqA%40mail.gmail.com/t.mbox.gz
> Checking for newer revisions
> Grabbing search results from lore.kernel.org
> Analyzing 2 messages in the thread
> Checking attestation on all messages, may take a moment...
> ---
> [PATCH v2] perf: test: Add support for testing JSON generated by perf data command
> + Acked-by: Ian Rogers <irogers@google.com>
> + Link: https://lore.kernel.org/r/ZGcoJBAGlknjsA/n@yoga
> + Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
> NOTE: install dkimpy for DKIM signature verification
> ---
> Total patches: 1
> ---
> Link: https://lore.kernel.org/r/ZGcoJBAGlknjsA/n@yoga
> Base: not specified
> git am ./v2_20230519_anupnewsmail_perf_test_add_support_for_testing_json_generated_by_perf_data_command.mbx
> [acme@quaco perf-tools-next]$ git am ./v2_20230519_anupnewsmail_perf_test_add_support_for_testing_json_generated_by_perf_data_command.mbx
> Applying: perf: test: Add support for testing JSON generated by perf data command
> .git/rebase-apply/patch:59: trailing whitespace.
> else
> warning: 1 line adds whitespace errors.
> tools/perf/tests/shell/test_perf_data_converter_json.sh:48: trailing whitespace.
> + else
> [acme@quaco perf-tools-next]$
>
--
- Arnaldo
next prev parent reply other threads:[~2023-05-22 18:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-19 7:41 [PATCH v2] perf: test: Add support for testing JSON generated by perf data command Anup Sharma
2023-05-22 18:10 ` Ian Rogers
2023-05-22 18:28 ` Arnaldo Carvalho de Melo
2023-05-22 18:31 ` Arnaldo Carvalho de Melo [this message]
2023-05-22 18:43 ` Arnaldo Carvalho de Melo
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=ZGu06UDugpWRhhQI@kernel.org \
--to=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=anupnewsmail@gmail.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--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 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.