lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 22 May 2023 15:31:05 -0300
From:   Arnaldo Carvalho de Melo <acme@...nel.org>
To:     Anup Sharma <anupnewsmail@...il.com>
Cc:     Ian Rogers <irogers@...gle.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] perf: test: Add support for testing JSON generated by
 perf data command

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@...il.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@...il.com>
> > 
> > Acked-by: Ian Rogers <irogers@...gle.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@...co perf-tools-next]$ b4 am -ctsl --cc-trailers CAP-5=fXyqWYgR0M0rqG8a2j0sL1WThNX8r49T7EfvkOG32-UqA@...l.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@...gle.com>
>     + Link: https://lore.kernel.org/r/ZGcoJBAGlknjsA/n@yoga
>     + Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.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@...co 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@...co perf-tools-next]$
> 

-- 

- Arnaldo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ