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]
Message-ID: <20141209135301.GC6784@krava.brq.redhat.com>
Date:	Tue, 9 Dec 2014 14:53:01 +0100
From:	Jiri Olsa <jolsa@...hat.com>
To:	Arnaldo Carvalho de Melo <acme@...hat.com>
Cc:	Stephane Eranian <eranian@...gle.com>,
	linux-kernel@...r.kernel.org, peterz@...radead.org,
	mingo@...nel.org, ak@...ux.intel.com, acme@...nel.org
Subject: perf tests: Fix attr tests size values interrupt

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@...va 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@...nel.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ