linux/tools/perf/tests
Arnaldo Carvalho de Melo d0b849e9bc perf tests: Check return of perf_evlist__open sw clock event period test
We were not checking if we successfully opened the counters, i.e. if
sys_perf_event_open worked, when it doesn't in this test, we were
continuing anyway and then segfaulting when trying to access the file
descriptor array, that at that point had been freed in perf_evlist__open
error path:

[root@ssdandy ~]# perf test -v 19
19: Test software clock events have valid period values    :
--- start ---
Segmentation fault (core dumped)
[root@ssdandy ~]#

Do the check and bail out instead.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-6qy8ljkn0e9hm7bh7keo5z68@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2013-11-11 16:28:42 -03:00
..
attr perf test: Update command line callchain attribute tests 2013-11-01 10:42:57 -03:00
attr.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2013-04-30 09:36:50 -07:00
attr.py perf tests: Make attr script test event cpu 2013-03-15 13:06:00 -03:00
bp_signal_overflow.c perf tests: Fix compile errors in bp_signal files 2013-05-28 16:23:57 +03:00
bp_signal.c perf tests: Fix compile errors in bp_signal files 2013-05-28 16:23:57 +03:00
builtin-test.c perf tools: Add test for parsing with no sample_id_all bit 2013-09-05 16:17:46 -03:00
code-reading.c perf record: Synthesize non-exec MMAP records when --data used 2013-11-11 15:56:39 -03:00
dso-data.c perf tests: Fix memory leak in dso-data.c 2013-10-14 10:28:54 -03:00
evsel-roundtrip-name.c perf evlist: Remove cpus and threads arguments from perf_evlist__new() 2013-03-15 13:06:01 -03:00
evsel-tp-sched.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
hists_link.c perf hists: Consolidate __hists__add_*entry() 2013-11-04 20:59:09 -03:00
keep-tracking.c perf tools: Fixup mmap event consumption 2013-10-28 16:06:00 -03:00
make perf tests: Add broken install-* tests into tests/make 2013-07-22 16:54:56 -03:00
mmap-basic.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
open-syscall-all-cpus.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
open-syscall-tp-fields.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
open-syscall.c perf evsel: Remove idx parm from constructor 2013-11-11 15:56:39 -03:00
parse-events.c perf fs: Rename NAME_find_mountpoint() to NAME__mountpoint() 2013-11-05 15:15:00 -03:00
parse-no-sample-id-all.c perf tools: Add test for parsing with no sample_id_all bit 2013-09-05 16:17:46 -03:00
perf-record.c Merge branch 'perf/urgent' into perf/core 2013-10-29 11:23:32 +01:00
perf-time-to-tsc.c perf tools: Fixup mmap event consumption 2013-10-28 16:06:00 -03:00
pmu.c perf tests: Use ARRAY_SIZE() were applicable 2013-01-24 16:40:51 -03:00
python-use.c perf tests: Check python path on attr and binding test 2013-01-24 16:40:10 -03:00
rdpmc.c tools/perf: Add required memory barriers 2013-11-06 12:34:26 +01:00
sample-parsing.c perf test: Update "sample parsing" test for PERF_SAMPLE_TRANSACTION 2013-11-04 12:47:24 -03:00
sw-clock.c perf tests: Check return of perf_evlist__open sw clock event period test 2013-11-11 16:28:42 -03:00
task-exit.c Merge branch 'perf/urgent' into perf/core 2013-10-29 11:23:32 +01:00
tests.h perf tools: Add test for parsing with no sample_id_all bit 2013-09-05 16:17:46 -03:00
vmlinux-kallsyms.c perf tests: Adjust the vmlinux symtab matches kallsyms test again 2013-08-07 17:35:33 -03:00