All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>,
	LKML <linux-kernel@vger.kernel.org>,
	linux-perf-users <linux-perf-users@vger.kernel.org>,
	Sven Schnelle <svens@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	sumanth Korikkar <sumanthk@linux.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>
Subject: Re: [PATCH] perf/tests: Fix test case 83 on s390
Date: Wed, 20 Jul 2022 13:13:16 -0300	[thread overview]
Message-ID: <YtgpnIBpt+zNYHyu@kernel.org> (raw)
In-Reply-To: <CAP-5=fWeUh2hyGAqc4XidJZ7X06f4=MojyQwuOtbL3cs3u+T=w@mail.gmail.com>

Em Wed, Jul 20, 2022 at 06:16:44AM -0700, Ian Rogers escreveu:
> On Wed, Jul 20, 2022, 5:34 AM Thomas Richter <tmricht@linux.ibm.com> wrote:
> 
> > Perf test case 83: perf stat CSV output linter might fail
> > on s390.
> > The reason for this is the output of the command
> >
> >  ./perf stat -x, -A -a --no-merge true
> >
> > which depends on a .config file setting. When CONFIG_SCHED_TOPOLOGY
> > is set, the output of above perf command is
> >
> >    CPU0,1.50,msec,cpu-clock,1502781,100.00,1.052,CPUs utilized
> >
> > When CONFIG_SCHED_TOPOLOGY is *NOT* set the output of above perf
> > command is
> >
> >    0.95,msec,cpu-clock,949800,100.00,1.060,CPUs utilized
> >
> > Fix the test case to accept both output formats.
> >
> > Output before:
> >  # perf test 83
> >  83: perf stat CSV output linter       : FAILED!
> >  #
> >
> > Output after:
> >  # ./perf test 83
> >  83: perf stat CSV output linter       : Ok
> >  #
> >
> > Fixes: ec906102e5b7 ("perf test: Fix "perf stat CSV output linter" test on
> > s390")
> >
> > Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
> > Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
> >
> 
> Acked-by: Ian Rogers <irogers@google.com>

Thanks, applied.

- Arnaldo

 
> Thanks,
> Ian
> 
> ---
> >  tools/perf/tests/shell/stat+csv_output.sh | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/tests/shell/stat+csv_output.sh
> > b/tools/perf/tests/shell/stat+csv_output.sh
> > index 38c26f3ef4c1..eb5196f58190 100755
> > --- a/tools/perf/tests/shell/stat+csv_output.sh
> > +++ b/tools/perf/tests/shell/stat+csv_output.sh
> > @@ -8,7 +8,8 @@ set -e
> >
> >  function commachecker()
> >  {
> > -       local -i cnt=0 exp=0
> > +       local -i cnt=0
> > +       local exp=0
> >
> >         case "$1"
> >         in "--no-args")         exp=6
> > @@ -17,7 +18,7 @@ function commachecker()
> >         ;; "--interval")        exp=7
> >         ;; "--per-thread")      exp=7
> >         ;; "--system-wide-no-aggr")     exp=7
> > -                               [ $(uname -m) = "s390x" ] && exp=6
> > +                               [ $(uname -m) = "s390x" ] && exp='^[6-7]$'
> >         ;; "--per-core")        exp=8
> >         ;; "--per-socket")      exp=8
> >         ;; "--per-node")        exp=8
> > @@ -34,7 +35,7 @@ function commachecker()
> >                 x=$(echo $line | tr -d -c ',')
> >                 cnt="${#x}"
> >                 # echo $line $cnt
> > -               [ "$cnt" -ne "$exp" ] && {
> > +               [[ ! "$cnt" =~ $exp ]] && {
> >                         echo "wrong number of fields. expected $exp in
> > $line" 1>&2
> >                         exit 1;
> >                 }
> > --
> > 2.36.1
> >
> >

-- 

- Arnaldo

      parent reply	other threads:[~2022-07-20 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-20 12:34 [PATCH] perf/tests: Fix test case 83 on s390 Thomas Richter
     [not found] ` <CAP-5=fWeUh2hyGAqc4XidJZ7X06f4=MojyQwuOtbL3cs3u+T=w@mail.gmail.com>
2022-07-20 16:13   ` Arnaldo Carvalho de Melo [this message]

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=YtgpnIBpt+zNYHyu@kernel.org \
    --to=acme@kernel.org \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=irogers@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=sumanthk@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    --cc=tmricht@linux.ibm.com \
    /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.