linux/tools/perf/tests
Thomas Richter 19508c048a perf tests: Add platform dependency to test 15
This patch adds platform dependency into the test case 15
(perf_event_attr). It is based on a suggestion from Jiri Olsa.

Add a new optional attribute named 'arch' in the [config] section of the
test case file. It is a comma separated list of architecture names this
test can be executed on. For example:

  arch = x86_64,alpha,ppc

If this attribute is missing the test is executed on any platform.  This
does not break existing behavior.

The values listed for this attribute should be identical to uname -m
output.

If the list starts with an exclamation mark (!) the comparison is
inverted, for example for

  arch = !s390x,ppc

the test is not executed on s390x or ppc platforms.  The exclamation
mark must be at the beginnning of the list.

Here is an example debug output:

  [root@s35lp76]# fgrep arch tests/attr/test-stat-C2
  arch = x86_64,alpha,ppc
  [root@s35lp76]# PERF_TEST_ATTR=/tmp /usr/bin/python2 ./tests/attr.py \
    -d ./tests/attr/ -p ./perf -vvvvv -t test-stat-C1

provides the following output:

  running './tests/attr//test-stat-C1'
  test limitation 'x86_64,alpha,ppc' <--- new
    loading expected events
      Event event:base-stat
        fd = 1
        group_fd = -1
        .....

Here is the output when a test is skipped:

  [root@s35lp76]# fgrep arch tests/attr/test-stat-C1
  arch = !s390x
  [root@s35lp76]# PERF_TEST_ATTR=/tmp /usr/bin/python2 ./tests/attr.py \
    -d ./tests/attr/ -p ./perf -vvvvv -t test-stat-C1

provides the following output:

test limitation '!s390x' <--- new

skipped [s390x] './tests/attr//test-stat-C1' <--- new

The test is skipped with return code 0.

Suggested-and-Acked-by: Jiri Olsa <jolsa@redhat.com>
Reviewed-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: linux-s390@vger.kernel.org
Link: http://lkml.kernel.org/r/20170622073625.86762-1-tmricht@linux.vnet.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-06-26 21:42:00 -03:00
..
attr perf tests: Fix attr tests 2015-04-08 10:49:53 -03:00
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
attr.c perf tools: Remove string.h, unistd.h and sys/stat.h from util.h 2017-04-24 13:43:33 -03:00
attr.py perf tests: Add platform dependency to test 15 2017-06-26 21:42:00 -03:00
backward-ring-buffer.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
bitmap.c perf tests: Add test for bitmap_scnprintf function 2016-08-02 16:33:27 -03:00
bp_signal_overflow.c tools: Adopt noinline from kernel sources 2017-06-19 15:27:06 -03:00
bp_signal.c tools: Adopt noinline from kernel sources 2017-06-19 15:27:06 -03:00
bpf-script-example.c perf tests bpf: Use SyS_epoll_wait alias 2016-08-03 19:40:48 -03:00
bpf-script-test-kbuild.c perf test: Enhance the LLVM tests: add kbuild test 2015-11-06 17:49:50 -03:00
bpf-script-test-prologue.c perf test llvm: Avoid error when PROFILE_ALL_BRANCHES is set 2017-06-19 16:11:26 -03:00
bpf-script-test-relocation.c perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
bpf.c perf tools: Remove string.h, unistd.h and sys/stat.h from util.h 2017-04-24 13:43:33 -03:00
Build perf tools: Fix build with ARCH=x86_64 2017-06-14 15:44:29 -03:00
builtin-test.c perf test: Disable breakpoint signal tests for powerpc 2017-06-05 14:18:01 -03:00
clang.c perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used 2017-04-19 13:01:44 -03:00
code-reading.c perf tests: Decompress kernel module before objdump 2017-06-08 15:39:19 -03:00
cpumap.c perf cpumap: Convert cpu_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:14 -03:00
dso-data.c perf tools: Remove include dirent.h from util.h 2017-04-19 13:01:55 -03:00
dwarf-unwind.c tools: Adopt noinline from kernel sources 2017-06-19 15:27:06 -03:00
event_update.c perf tests: Replace assignment with comparison on assert check 2016-04-25 20:24:26 -03:00
event-times.c perf tools: Remove poll.h and wait.h from util.h 2017-04-24 13:43:34 -03:00
evsel-roundtrip-name.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
evsel-tp-sched.c perf tests: Pass the subtest index to each test routine 2015-11-19 13:19:15 -03:00
expr.c perf tools: Add a simple expression parser for JSON 2017-03-23 11:39:27 -03:00
fdarray.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
hists_common.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00
hists_common.h perf tests: Define and use symbolic names for fake symbols 2014-06-01 14:35:11 +02:00
hists_cumulate.c perf tools: Move event prototypes from util.h to event.h 2017-04-25 15:30:47 -03:00
hists_filter.c perf tools: Move event prototypes from util.h to event.h 2017-04-25 15:30:47 -03:00
hists_link.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
hists_output.c perf tools: Move event prototypes from util.h to event.h 2017-04-25 15:30:47 -03:00
is_printable_array.c perf tools: Move print_binary definitions to separate files 2017-04-19 13:01:50 -03:00
keep-tracking.c perf evsel: Do not use globals in config() 2016-04-11 22:18:20 -03:00
kmod-path.c perf tests kmod-path: Don't fail if compressed modules aren't supported 2017-05-04 10:05:55 -03:00
llvm.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
llvm.h perf clang: Update test case to use real BPF script 2016-12-05 15:51:44 -03:00
make Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-12-17 16:24:13 -08:00
mmap-basic.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
mmap-thread-lookup.c perf tools: Move path related functions to util/path.h 2017-04-19 13:01:53 -03:00
openat-syscall-all-cpus.c perf tools: Move path related functions to util/path.h 2017-04-19 13:01:53 -03:00
openat-syscall-tp-fields.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
openat-syscall.c perf tools: Move path related functions to util/path.h 2017-04-19 13:01:53 -03:00
parse-events.c perf tools: Remove string.h, unistd.h and sys/stat.h from util.h 2017-04-24 13:43:33 -03:00
parse-no-sample-id-all.c perf tools: Add include <linux/kernel.h> where ARRAY_SIZE() is used 2017-04-19 13:01:44 -03:00
perf-hooks.c perf tools: Pass context to perf hook functions 2016-12-05 15:51:42 -03:00
perf-record.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
perf-targz-src-pkg perf tests: Fix tarpkg build test error output redirection 2016-03-24 12:26:41 -03:00
pmu.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
python-use.c perf utils: Check verbose flag properly 2017-02-20 11:35:54 -03:00
sample-parsing.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00
sdt.c perf buildid: Move prototypes from util.h to build-id.h 2017-04-25 11:45:59 -03:00
stat.c perf tools: Add stat round event synthesize function 2015-12-17 14:55:44 -03:00
sw-clock.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
switch-tracking.c perf tools: Include errno.h where needed 2017-04-19 13:01:51 -03:00
task-exit.c perf evsel: Fix probing of precise_ip level for default cycles event 2017-06-14 15:44:29 -03:00
tests.h perf test: Disable breakpoint signal tests for powerpc 2017-06-05 14:18:01 -03:00
thread-map.c perf thread_map: Convert thread_map.refcnt from atomic_t to refcount_t 2017-03-03 19:07:16 -03:00
thread-mg-share.c perf map: Convert map_groups.refcnt from atomic_t to refcount_t 2017-03-03 19:07:15 -03:00
topology.c perf tools: Replace _SC_NPROCESSORS_CONF with max_present_cpu in cpu_topology_map 2017-02-17 12:56:35 -03:00
unit_number__scnprintf.c perf tools: Move units conversion/formatting routines to separate object 2017-04-20 13:22:44 -03:00
vmlinux-kallsyms.c perf tools: Including missing inttypes.h header 2017-04-19 13:01:46 -03:00