Skip to contentSkip to conversation

perf test: Add perf_event_attr tests

RFC Superseded Jiri Olsa 3 participants 16 messages Aug 24, 2012 perf events

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
author
#6 lore raw

PATCH 6/13 perf test: Add perf_event_attr record graph test

In reply to Jiri Olsa

Adding tests to validate perf_event_attr data for commands:
'record -g --'
'record -g fp
'record -g dwarf

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>

graph

---
 tools/perf/util/test-attr/test-record-graph-default | 6 ++++++
 tools/perf/util/test-attr/test-record-graph-dwarf   | 6 ++++++
 tools/perf/util/test-attr/test-record-graph-fp      | 6 ++++++
 3 files changed, 18 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-graph-default
 create mode 100644 tools/perf/util/test-attr/test-record-graph-dwarf
 create mode 100644 tools/perf/util/test-attr/test-record-graph-fp
tools/perf/util/test-attr/test-record-graph-default new file +6 -0
new file mode 100644
index 0000000..833d184
@@ -0,0 +1,6 @@
+[config]
+command = record
+args    = -g -- kill >/dev/null 2>&1
+
+[event:base-record]
+sample_type=295
tools/perf/util/test-attr/test-record-graph-dwarf new file +6 -0
new file mode 100644
index 0000000..41f3f67
@@ -0,0 +1,6 @@
+[config]
+command = record
+args    = -g dwarf -- kill >/dev/null 2>&1
+
+[event:base-record]
+sample_type=295
tools/perf/util/test-attr/test-record-graph-fp new file +6 -0
new file mode 100644
index 0000000..7cef374
@@ -0,0 +1,6 @@
+[config]
+command = record
+args    = -g fp kill >/dev/null 2>&1
+
+[event:base-record]
+sample_type=295
Signature · 1 line
1.7.11.4
author
#8 lore raw

PATCH 8/13 perf test: Add perf_event_attr record no samples test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record -n'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-no-samples | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-no-samples
tools/perf/util/test-attr/test-record-no-samples new file +6 -0
new file mode 100644
index 0000000..d0141b2
@@ -0,0 +1,6 @@
+[config]
+command = record
+args    = -n kill >/dev/null 2>&1
+
+[event:base-record]
+sample_period=0
Signature · 1 line
1.7.11.4
author
#9 lore raw

PATCH 9/13 perf test: Add perf_event_attr record no-inherit test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record -i'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-no-inherit | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-no-inherit
tools/perf/util/test-attr/test-record-no-inherit new file +7 -0
new file mode 100644
index 0000000..9079a25
@@ -0,0 +1,7 @@
+[config]
+command = record
+args    = -i kill >/dev/null 2>&1
+
+[event:base-record]
+sample_type=259
+inherit=0
Signature · 1 line
1.7.11.4
author
#4 lore raw

PATCH 4/13 perf test: Add perf_event_attr record freq test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record -F 100'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-freq | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-freq
tools/perf/util/test-attr/test-record-freq new file +6 -0
new file mode 100644
index 0000000..600d0f8
@@ -0,0 +1,6 @@
+[config]
+command = record
+args    = -F 100 kill >/dev/null 2>&1
+
+[event:base-record]
+sample_period=100
Signature · 1 line
1.7.11.4
author
#13 lore raw

PATCH 13/13 perf test: Add attr tests under builtin test command

In reply to Jiri Olsa

The test attr suite is run only if it's run under perf source directory, because test attr files are not installed.

If run elsewhere, tests are ommited (notification is displayed) and finished as successfull.

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/builtin-test.c   |  4 ++++
 tools/perf/perf.h           |  1 +
 tools/perf/util/test-attr.c | 14 ++++++++++++++
 3 files changed, 19 insertions(+)
tools/perf/builtin-test.c +4 -0
index 381d5ab..f2d3c50 100644
@@ -1135,6 +1135,10 @@ static struct test {
 		.func = dso__test_data,
 	},
 	{
+		.desc = "Test perf attr",
+		.func = test_attr__run,
+	},
+	{
 		.func = NULL,
 	},
 };
tools/perf/perf.h +1 -0
index a67bb75..2039774 100644
@@ -174,6 +174,7 @@ void test_attr__init(void);
 int  test_attr__open(struct perf_event_attr *attr,
 		     pid_t pid, int cpu, int group_fd,
 		     unsigned long flags);
+int test_attr__run(void);
 
 static inline int
 sys_perf_event_open(struct perf_event_attr *attr,
tools/perf/util/test-attr.c +14 -0
index dd83954..eb610f7 100644
@@ -126,3 +126,17 @@ int test_attr__open(struct perf_event_attr *attr,
 
 	return fd;
 }
+
+int test_attr__run(void)
+{
+	struct stat st;
+	const char *run;
+
+	run = "python ./util/test-attr.py -d ./util/test-attr/ -p ./perf";
+
+	if (!lstat("./util/", &st))
+		return system(run);
+
+	fprintf(stderr, " (ommitted)");
+	return 0;
+}
Signature · 1 line
1.7.11.4
author
#12 lore raw

PATCH 12/13 perf test: Add perf_event_attr stat group test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'stat --group -e cycles,instructions'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-stat-group | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-stat-group
tools/perf/util/test-attr/test-stat-group new file +15 -0
new file mode 100644
index 0000000..fdc1596
@@ -0,0 +1,15 @@
+[config]
+command = stat
+args    = --group -e cycles,instructions kill >/dev/null 2>&1
+ret     = 1
+
+[event-1:base-stat]
+fd=1
+group_fd=-1
+
+[event-2:base-stat]
+fd=2
+group_fd=1
+config=1
+disabled=0
+enable_on_exec=0
Signature · 1 line
1.7.11.4
author
#11 lore raw

PATCH 11/13 perf test: Add perf_event_attr stat no-inherit test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'stat -i'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-stat-no-inherit | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-stat-no-inherit
tools/perf/util/test-attr/test-stat-no-inherit new file +7 -0
new file mode 100644
index 0000000..d54b2a1e
@@ -0,0 +1,7 @@
+[config]
+command = stat
+args    = -i -e cycles kill >/dev/null 2>&1
+ret     = 1
+
+[event:base-stat]
+inherit=0
Signature · 1 line
1.7.11.4
author
#10 lore raw

PATCH 10/13 perf test: Add perf_event_attr stat basic test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'stat'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/base-stat       | 39 +++++++++++++++++++++++++++++++
 tools/perf/util/test-attr/test-stat-basic |  6 +++++
 2 files changed, 45 insertions(+)
 create mode 100644 tools/perf/util/test-attr/base-stat
 create mode 100644 tools/perf/util/test-attr/test-stat-basic
tools/perf/util/test-attr/base-stat new file +39 -0
new file mode 100644
index 0000000..f46db90
@@ -0,0 +1,39 @@
+[event]
+fd=1
+group_fd=-1
+flags=0
+type=0
+size=96
+config=0
+sample_period=0
+sample_type=0
+read_format=3
+disabled=1
+inherit=1
+pinned=0
+exclusive=0
+exclude_user=0
+exclude_kernel=0
+exclude_hv=0
+exclude_idle=0
+mmap=0
+comm=0
+freq=0
+inherit_stat=0
+enable_on_exec=1
+task=0
+watermask=0
+precise_ip=0
+mmap_data=0
+sample_id_all=0
+exclude_host=0
+exclude_guest=1
+exclude_callchain_kernel=0
+exclude_callchain_user=0
+wakeup_events=0
+bp_type=0
+config1=0
+config2=0
+branch_sample_type=0
+sample_regs_user=0
+sample_stack_user=0
tools/perf/util/test-attr/test-stat-basic new file +6 -0
new file mode 100644
index 0000000..74e1788
@@ -0,0 +1,6 @@
+[config]
+command = stat
+args    = -e cycles kill >/dev/null 2>&1
+ret     = 1
+
+[event:base-stat]
Signature · 1 line
1.7.11.4
author
#3 lore raw

PATCH 3/13 perf test: Add perf_event_attr record group test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record --group -e cycles,instructions'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-group | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-group
tools/perf/util/test-attr/test-record-group new file +17 -0
new file mode 100644
index 0000000..6cff60f
@@ -0,0 +1,17 @@
+[config]
+command = record
+args    = --group -e cycles,instructions kill 2>/dev/null
+
+[event-1:base-record]
+fd=1
+group_fd=-1
+sample_type=327
+
+[event-2:base-record]
+fd=2
+group_fd=1
+config=1
+sample_type=327
+mmap=0
+comm=0
+enable_on_exec=0
Signature · 1 line
1.7.11.4

Jiri Olsa

author
#0 lore raw

cover perf test: Add perf_event_attr tests

hi,
this code tests the link between perf stat/record command line options and final perf_event_attr struct values. Also it tests the group fd linkage.

It's probably missing many command line option combinations worth testing. I wanted to check with others for more ideas before diving into this.

You can check this also here:

git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/linux.git
perf/attr_tests4

thanks,
jirka

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/Makefile                                 |   1 +
 tools/perf/builtin-test.c                           |   4 +
 tools/perf/perf.c                                   |   2 +
 tools/perf/perf.h                                   |  11 ++
 tools/perf/util/test-attr.c                         | 142 ++++++++++++++++++++++++++
 tools/perf/util/test-attr.py                        | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/test-attr/base-record               |  39 ++++++++
 tools/perf/util/test-attr/base-stat                 |  39 ++++++++
 tools/perf/util/test-attr/test-record-basic         |   5 +
 tools/perf/util/test-attr/test-record-count         |   8 ++
 tools/perf/util/test-attr/test-record-freq          |   6 ++
 tools/perf/util/test-attr/test-record-graph-default |   6 ++
 tools/perf/util/test-attr/test-record-graph-dwarf   |   6 ++
 tools/perf/util/test-attr/test-record-graph-fp      |   6 ++
 tools/perf/util/test-attr/test-record-group         |  17 ++++
 tools/perf/util/test-attr/test-record-no-inherit    |   7 ++
 tools/perf/util/test-attr/test-record-no-samples    |   6 ++
 tools/perf/util/test-attr/test-record-period        |   7 ++
 tools/perf/util/test-attr/test-stat-basic           |   6 ++
 tools/perf/util/test-attr/test-stat-group           |  15 +++
 tools/perf/util/test-attr/test-stat-no-inherit      |   7 ++
 21 files changed, 612 insertions(+)
author
#5 lore raw

PATCH 5/13 perf test: Add perf_event_attr record count test

Adding test to validate perf_event_attr data for command:
'record -c 123'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-count | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-count
tools/perf/util/test-attr/test-record-count new file +8 -0
new file mode 100644
index 0000000..2f841de
@@ -0,0 +1,8 @@
+[config]
+command = record
+args    = -c 123 kill >/dev/null 2>&1
+
+[event:base-record]
+sample_period=123
+sample_type=7
+freq=0
Signature · 1 line
1.7.11.4
author
#7 lore raw

PATCH 7/13 perf test: Add perf_event_attr record period test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record -c 100 -P'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/test-record-period | 7 +++++++
 1 file changed, 7 insertions(+)
 create mode 100644 tools/perf/util/test-attr/test-record-period
tools/perf/util/test-attr/test-record-period new file +7 -0
new file mode 100644
index 0000000..8abc531
@@ -0,0 +1,7 @@
+[config]
+command = record
+args    = -c 100 -P kill >/dev/null 2>&1
+
+[event:base-record]
+sample_period=100
+freq=0
Signature · 1 line
1.7.11.4
author
#2 lore raw

PATCH 2/13 perf test: Add perf_event_attr record basic test

In reply to Jiri Olsa

Adding test to validate perf_event_attr data for command:
'record'

Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/util/test-attr/base-record       | 39 +++++++++++++++++++++++++++++
 tools/perf/util/test-attr/test-record-basic |  5 ++++
 2 files changed, 44 insertions(+)
 create mode 100644 tools/perf/util/test-attr/base-record
 create mode 100644 tools/perf/util/test-attr/test-record-basic
tools/perf/util/test-attr/base-record new file +39 -0
new file mode 100644
index 0000000..ea2d3c5
@@ -0,0 +1,39 @@
+[event]
+fd=1
+group_fd=-1
+flags=0
+type=0
+size=96
+config=0
+sample_period=4000
+sample_type=263
+read_format=7
+disabled=1
+inherit=1
+pinned=0
+exclusive=0
+exclude_user=0
+exclude_kernel=0
+exclude_hv=0
+exclude_idle=0
+mmap=1
+comm=1
+freq=1
+inherit_stat=0
+enable_on_exec=1
+task=0
+watermask=0
+precise_ip=0
+mmap_data=0
+sample_id_all=1
+exclude_host=0
+exclude_guest=1
+exclude_callchain_kernel=0
+exclude_callchain_user=0
+wakeup_events=0
+bp_type=0
+config1=0
+config2=0
+branch_sample_type=0
+sample_regs_user=0
+sample_stack_user=0
tools/perf/util/test-attr/test-record-basic new file +5 -0
new file mode 100644
index 0000000..55c0428
@@ -0,0 +1,5 @@
+[config]
+command = record
+args    = kill >/dev/null 2>&1
+
+[event:base-record]
Signature · 1 line
1.7.11.4
author
#1 lore raw

PATCH 1/13 perf test: Add framework for atomated perf_event_attr tests

In reply to Jiri Olsa

Adding automated test to check event's perf_event_attr values.

The idea is run perf session with kidnaping sys_perf_event_open function. For each sys_perf_event_open call we store the perf_event_attr data to the file to be checked later against what we expect.

You can run this by:

  # python ./util/test-attr.py -d ./util/test-attr/ -p ./perf -v
Cc Arnaldo Carvalho de Melo <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Paul Mackerras <[email protected]>
Cc Corey Ashford <[email protected]>
Cc Frederic Weisbecker <[email protected]>
---
 tools/perf/Makefile          |   1 +
 tools/perf/perf.c            |   2 +
 tools/perf/perf.h            |  10 ++
 tools/perf/util/test-attr.c  | 128 ++++++++++++++++++++
 tools/perf/util/test-attr.py | 272 +++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 413 insertions(+)
 create mode 100644 tools/perf/util/test-attr.c
 create mode 100644 tools/perf/util/test-attr.py
tools/perf/Makefile +1 -0
index 722ddee..746375d 100644
@@ -405,6 +405,7 @@ LIB_OBJS += $(OUTPUT)util/rblist.o
 LIB_OBJS += $(OUTPUT)util/intlist.o
 LIB_OBJS += $(OUTPUT)ui/helpline.o
 LIB_OBJS += $(OUTPUT)ui/stdio/hist.o
+LIB_OBJS += $(OUTPUT)util/test-attr.o
 
 BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o
 BUILTIN_OBJS += $(OUTPUT)builtin-bench.o
tools/perf/perf.c +2 -0
index e7840e5..94092eb13 100644
@@ -477,6 +477,8 @@ int main(int argc, const char **argv)
 	}
 	cmd = argv[0];
 
+	test_attr__init();
+
 	/*
 	 * We use PATH to find perf commands, but we prepend some higher
 	 * precedence paths: the "--exec-path" option, the PERF_EXEC_PATH
tools/perf/perf.h +10 -0
index 87f4ec6..a67bb75 100644
@@ -5,6 +5,7 @@ struct winsize;
 
 void get_term_dimensions(struct winsize *ws);
 
+
 #if defined(__i386__)
 #include "../../arch/x86/include/asm/unistd.h"
 #define rmb()		asm volatile("lock; addl $0,0(%%esp)" ::: "memory")
@@ -168,11 +169,20 @@ static inline unsigned long long rdclock(void)
 	(void) (&_min1 == &_min2);		\
 	_min1 < _min2 ? _min1 : _min2; })
 
+extern bool test_attr__enabled;
+void test_attr__init(void);
+int  test_attr__open(struct perf_event_attr *attr,
+		     pid_t pid, int cpu, int group_fd,
+		     unsigned long flags);
+
 static inline int
 sys_perf_event_open(struct perf_event_attr *attr,
 		      pid_t pid, int cpu, int group_fd,
 		      unsigned long flags)
 {
+	if (unlikely(test_attr__enabled))
+		return test_attr__open(attr, pid, cpu, group_fd, flags);
+
 	return syscall(__NR_perf_event_open, attr, pid, cpu,
 		       group_fd, flags);
 }
tools/perf/util/test-attr.c new file +128 -0

128 lines not on this page · raw message

tools/perf/util/test-attr.py new file +272 -0

272 lines not on this page · raw message

Signature · 1 line
1.7.11.4
#14 lore raw
In reply to Jiri Olsa

Em Fri, Aug 24, 2012 at 11:00:31AM +0200, Jiri Olsa escreveu:

Quoted 3 lines
 tools/perf/util/test-attr.c                         | 142 ++++++++++++++++++++++++++
 tools/perf/util/test-attr.py                        | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/test-attr/base-record               |  39 ++++++++

I suggest we move all this to:

tools/perf/tests/attr/

Quoted 15 lines
 tools/perf/util/test-attr/base-stat                 |  39 ++++++++
 tools/perf/util/test-attr/test-record-basic         |   5 +
 tools/perf/util/test-attr/test-record-count         |   8 ++
 tools/perf/util/test-attr/test-record-freq          |   6 ++
 tools/perf/util/test-attr/test-record-graph-default |   6 ++
 tools/perf/util/test-attr/test-record-graph-dwarf   |   6 ++
 tools/perf/util/test-attr/test-record-graph-fp      |   6 ++
 tools/perf/util/test-attr/test-record-group         |  17 ++++
 tools/perf/util/test-attr/test-record-no-inherit    |   7 ++
 tools/perf/util/test-attr/test-record-no-samples    |   6 ++
 tools/perf/util/test-attr/test-record-period        |   7 ++
 tools/perf/util/test-attr/test-stat-basic           |   6 ++
 tools/perf/util/test-attr/test-stat-group           |  15 +++
 tools/perf/util/test-attr/test-stat-no-inherit      |   7 ++
 21 files changed, 612 insertions(+)
#15 lore raw
Quoted 9 lines · Arnaldo Carvalho de Melo

Em Fri, Aug 24, 2012 at 11:00:31AM +0200, Jiri Olsa escreveu:

Quoted 3 lines
 tools/perf/util/test-attr.c                         | 142 ++++++++++++++++++++++++++
 tools/perf/util/test-attr.py                        | 272 ++++++++++++++++++++++++++++++++++++++++++++++++++
 tools/perf/util/test-attr/base-record               |  39 ++++++++

I suggest we move all this to:

tools/perf/tests/attr/

Yes!

I'd even strongly suggest increasing perf test's prominence within the project: if the tests are quick enough to run we could run them during the build of perf and warn if perf test fails in an unexpected way with the new perf binary.

( Running new perf on older kernel should never cause an
unexpected failure and thus a build warning. )

So as people are working on new perf patches, the default build will run perf test and will catch some errors. As the number of testcases grows it might catch a wide range of bugs. It will also help us find regressions sooner, when users/testers build perf they'll always run perf test as well and report new warnings/failures.

Thanks,

Ingo