mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Stephane Eranian <eranian@google.com>,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@kernel.org, ak@linux.intel.com, acme@kernel.org
Subject: perf tests: Fix attr tests size values interrupt
Date: Tue, 9 Dec 2014 14:53:01 +0100	[thread overview]
Message-ID: <20141209135301.GC6784@krava.brq.redhat.com> (raw)
In-Reply-To: <20141209133947.GD2406@redhat.com>

On Tue, Dec 09, 2014 at 11:39:47AM -0200, Arnaldo Carvalho de Melo wrote:
> Em Tue, Dec 09, 2014 at 11:30:31AM -0200, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Nov 21, 2014 at 07:26:31PM -0200, Arnaldo Carvalho de Melo escreveu:
> > > Em Wed, Sep 24, 2014 at 01:48:37PM +0200, Stephane Eranian escreveu:
> > > > This patch also adds a new ABI version
> > > > PERF_ATTR_SIZE_VER4 because we extend
> > > > the perf_event_attr struct with a new u64
> > > > field.
>  
> > I think this problem is also related to this changeset:
>  
> > [root@zoo ~]# perf test -v 15
> > 15: struct perf_event_attr setup                           :
> <SNIP>
> > running '/home/acme/libexec/perf-core/tests/attr/test-stat-default'
> > expected size=96, got 104
> > FAILED '/home/acme/libexec/perf-core/tests/attr/test-stat-default' -
> > match failure
> > test child finished with 0
> > ---- end ----
> > struct perf_event_attr setup: Ok
> > [root@zoo ~]# uname -r
> > 3.17.3-200.fc20.x86_64
> > [root@zoo ~]#
> > 
> > Checking if this is just a matter of updating the test entry.
> 
> Well, here I think that size variable needs to somehow be tested against
> the value of another field, the ABI one, so that for each ABI we test
> against the rightsize, that is, after this cset, 8 bytes (sizeof u64)
> bigger, Jiri?

well this patch enlarged the perf_event_attr
so the test needs to be adjusted like in patch below

[jolsa@krava perf]$ ./perf test attr -vv
15: struct perf_event_attr setup                           :
--- start ---
test child forked, pid 9719
running './tests/attr/test-stat-group1'
  'PERF_TEST_ATTR=/tmp/tmp4drvul ./perf stat -o /tmp/tmp4drvul/perf.data -e '{cycles,instructions}' kill >/dev/null 2>&1' ret 1 
expected size=96, got 104
FAILED './tests/attr/test-stat-group1' - match failure

jirka


---
Following change adjusted 'struct perf_event_attr', but let
the attr test's sizes untouched:
  60e2364e60e8 perf: Add ability to sample machine state on interrupt

Adjusting test size values for attr test.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
---
diff --git a/tools/perf/tests/attr/base-record b/tools/perf/tests/attr/base-record
index f710b92ccff6..d3095dafed36 100644
--- a/tools/perf/tests/attr/base-record
+++ b/tools/perf/tests/attr/base-record
@@ -5,7 +5,7 @@ group_fd=-1
 flags=0|8
 cpu=*
 type=0|1
-size=96
+size=104
 config=0
 sample_period=4000
 sample_type=263
diff --git a/tools/perf/tests/attr/base-stat b/tools/perf/tests/attr/base-stat
index dc3ada2470c0..872ed7e24c7c 100644
--- a/tools/perf/tests/attr/base-stat
+++ b/tools/perf/tests/attr/base-stat
@@ -5,7 +5,7 @@ group_fd=-1
 flags=0|8
 cpu=*
 type=0
-size=96
+size=104
 config=0
 sample_period=0
 sample_type=0

  reply	other threads:[~2014-12-09 14:46 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-24 11:48 [PATCH v7 0/6] perf: add ability to sample interrupted machine state Stephane Eranian
2014-09-24 11:48 ` [PATCH v7 1/6] perf: add ability to sample machine state on interrupt Stephane Eranian
2014-11-16 12:35   ` [tip:perf/core] perf: Add " tip-bot for Stephane Eranian
2014-11-21 21:26   ` [PATCH v7 1/6] perf: add " Arnaldo Carvalho de Melo
2014-12-09 13:30     ` Arnaldo Carvalho de Melo
2014-12-09 13:39       ` Arnaldo Carvalho de Melo
2014-12-09 13:53         ` Jiri Olsa [this message]
2014-12-09 13:59           ` perf tests: Fix attr tests size values interrupt Arnaldo Carvalho de Melo
2014-12-12  8:18           ` [tip:perf/urgent] perf tests: Fix attr tests size values to cope with machine state on interrupt ABI changes tip-bot for Jiri Olsa
2014-09-24 11:48 ` [PATCH v7 2/6] perf/x86: add support for sampling PEBS machine state registers Stephane Eranian
2014-11-16 12:35   ` [tip:perf/core] perf/x86: Add " tip-bot for Stephane Eranian
2014-09-24 11:48 ` [PATCH v7 3/6] perf tools: add core support for sampling intr machine state regs Stephane Eranian
2014-11-16 12:36   ` [tip:perf/core] perf tools: Add " tip-bot for Stephane Eranian
2014-09-24 11:48 ` [PATCH v7 4/6] perf/tests: add interrupted state sample parsing test Stephane Eranian
2014-11-16 12:36   ` [tip:perf/core] perf/tests: Add " tip-bot for Stephane Eranian
2014-09-24 11:48 ` [PATCH v7 5/6] perf record: add new -I option to sample interrupted machine state Stephane Eranian
2014-11-16 12:36   ` [tip:perf/core] perf record: Add " tip-bot for Stephane Eranian
2014-09-24 11:48 ` [PATCH v7 6/6] perf: improve perf_sample_data struct layout Stephane Eranian
2014-11-16 12:37   ` [tip:perf/core] perf: Improve the " tip-bot for Peter Zijlstra
2014-09-25  9:26 ` [PATCH v7 0/6] perf: add ability to sample interrupted machine state Peter Zijlstra
2014-09-25 10:32   ` Stephane Eranian
2014-09-25 14:29     ` Peter Zijlstra
2014-09-25 16:22       ` Stephane Eranian

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=20141209135301.GC6784@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome