kernel-fxtec-pro1x/tools/perf/tests
Sandipan Das aa90f9f955 perf tests: Fix indexing when invoking subtests
Recently, the subtest numbering was changed to start from 1.  While it
is fine for displaying results, this should not be the case when the
subtests are actually invoked.

Typically, the subtests are stored in zero-indexed arrays and invoked
based on the index passed to the main test function.  Since the index
now starts from 1, the second subtest in the array (index 1) gets
invoked instead of the first (index 0).  This applies to all of the
following subtests but for the last one, the subtest always fails
because it does not meet the boundary condition of the subtest index
being lesser than the number of subtests.

This can be observed on powerpc64 and x86_64 systems running Fedora 28
as shown below.

Before:

  # perf test "builtin clang support"
  55: builtin clang support                                 :
  55.1: builtin clang compile C source to IR                : Ok
  55.2: builtin clang compile C source to ELF object        : FAILED!

  # perf test "LLVM search and compile"
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : FAILED!

  # perf test "BPF filter"
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : FAILED!

After:

  # perf test "builtin clang support"
  55: builtin clang support                                 :
  55.1: builtin clang compile C source to IR                : Ok
  55.2: builtin clang compile C source to ELF object        : Ok

  # perf test "LLVM search and compile"
  38: LLVM search and compile                               :
  38.1: Basic BPF llvm compile                              : Ok
  38.2: kbuild searching                                    : Ok
  38.3: Compile source for BPF prologue generation          : Ok
  38.4: Compile source for BPF relocation                   : Ok

  # perf test "BPF filter"
  40: BPF filter                                            :
  40.1: Basic BPF filtering                                 : Ok
  40.2: BPF pinning                                         : Ok
  40.3: BPF prologue generation                             : Ok
  40.4: BPF relocation checker                              : Ok

Signed-off-by: Sandipan Das <sandipan@linux.ibm.com>
Reported-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Hendrik Brueckner <brueckner@linux.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Ravi Bangoria <ravi.bangoria@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Fixes: 9ef0112442 ("perf test: Fix subtest number when showing results")
Link: http://lkml.kernel.org/r/20180726171733.33208-1-sandipan@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2018-07-31 10:52:51 -03:00
..
attr
shell perf tests: Fix record+probe_libc_inet_pton.sh when event exists 2018-07-24 14:52:19 -03:00
.gitignore
attr.c
attr.py
backward-ring-buffer.c
bitmap.c
bp_account.c
bp_signal.c
bp_signal_overflow.c
bpf-script-example.c
bpf-script-test-kbuild.c
bpf-script-test-prologue.c
bpf-script-test-relocation.c
bpf.c
Build
builtin-test.c perf tests: Fix indexing when invoking subtests 2018-07-31 10:52:51 -03:00
clang.c
code-reading.c perf test code-reading: Fix perf_env setup for PTI entry trampolines 2018-06-06 12:52:05 -03:00
cpumap.c
dso-data.c
dwarf-unwind.c
event-times.c
event_update.c
evsel-roundtrip-name.c
evsel-tp-sched.c
expr.c
fdarray.c
hists_common.c perf symbols: Unify symbol maps 2018-04-27 10:47:06 -03:00
hists_common.h
hists_cumulate.c
hists_filter.c
hists_link.c
hists_output.c
is_printable_array.c
keep-tracking.c
kmod-path.c perf tests kmod-path: Add tests for vdso32 and vdsox32 2018-06-06 12:52:03 -03:00
llvm.c
llvm.h
make
mem.c
mem2node.c
mmap-basic.c
mmap-thread-lookup.c
openat-syscall-all-cpus.c
openat-syscall-tp-fields.c
openat-syscall.c
parse-events.c perf tests: Fix complex event name parsing 2018-07-31 10:52:23 -03:00
parse-no-sample-id-all.c
perf-hooks.c
perf-record.c
perf-targz-src-pkg
pmu.c
python-use.c perf test: Use header file util/debug.h 2018-06-04 10:28:53 -03:00
sample-parsing.c
sdt.c
stat.c
sw-clock.c
switch-tracking.c
task-exit.c
tests.h
thread-map.c
thread-mg-share.c
topology.c perf test session topology: Fix test on s390 2018-06-25 11:59:35 -03:00
unit_number__scnprintf.c
vmlinux-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00