kernel_optimize_test/tools/perf/tests
Arnaldo Carvalho de Melo d3280ce01e perf test: Auto bump rlimit(MEMLOCK) for BPF test sake
I noticed that the 'perf test bpf' was failing:

  # perf test bpf
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Skip
  41.2: BPF pinning                                         : Skip
  41.3: BPF prologue generation                             : Skip
  41.4: BPF relocation checker                              : Skip
  # ulimit -l
  64
  #

Using verbose mode we get just a line bout -EPERF being returned from
libbpf's bpf_load_program_xattr(), that ends up being used in 'perf
test bpf' initial program loading capability query:

  Missing basic BPF support, skip this test: Operation not permitted

Not that informative, but on a separate problem when creating BPF maps
bumping rlimit(MEMLOCK) helped, so I tried it here as well, works:

  # ulimit -l 128
  # perf test bpf
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  #

So use the recently added rlimit__bump_memlock() helper:

  # ulimit -l 64
  # perf test bpf
  41: BPF filter                                            :
  41.1: Basic BPF filtering                                 : Ok
  41.2: BPF pinning                                         : Ok
  41.3: BPF prologue generation                             : Ok
  41.4: BPF relocation checker                              : Ok
  # ulimit -l
  64
  #

I.e. the bumping of memlock is restricted to the 'perf test' instance,
not changing the global value.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-b9fubkhr4jm192lu7y8hgjvo@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-07-09 16:27:01 -03:00
..
attr perf tools: Save bpf_prog_info and BTF of new BPF programs 2019-03-21 11:27:04 -03:00
shell Merge remote-tracking branch 'tip/perf/core' into perf/urgent 2019-07-08 13:06:57 -03:00
.gitignore
attr.c perf tools: Fix diverse comment typos 2018-12-17 14:56:47 -03:00
attr.py perf script python: Add Python3 support to tests/attr.py 2019-02-05 10:31:08 -03:00
backward-ring-buffer.c perf tools: Fix errors under optimization level '-Og' 2019-03-19 16:52:04 -03:00
bitmap.c perf tools: Drop unneeded bitmap_zero() calls 2018-08-08 15:55:44 -03:00
bp_account.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bp_signal_overflow.c
bp_signal.c perf tests ARM: Disable breakpoint tests 32-bit 2018-12-17 14:56:27 -03:00
bpf-script-example.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-kbuild.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-prologue.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf-script-test-relocation.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
bpf.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
Build perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
builtin-test.c perf test: Auto bump rlimit(MEMLOCK) for BPF test sake 2019-07-09 16:27:01 -03:00
clang.c
code-reading.c tools perf: Move from sane_ctype.h obtained from git to the Linux's original 2019-06-25 21:02:47 -03:00
cpumap.c
dso-data.c perf test: Fix spelling mistake "leadking" -> "leaking" 2019-05-15 16:36:46 -03:00
dwarf-unwind.c perf tools: Use zfree() where applicable 2019-07-09 10:13:27 -03:00
event_update.c
event-times.c
evsel-roundtrip-name.c
evsel-tp-sched.c perf tests: Fix a memory leak in test__perf_evsel__tp_sched_test() 2019-03-19 16:52:06 -03:00
expr.c perf tools: Use zfree() where applicable 2019-07-09 10:13:27 -03:00
fdarray.c
hists_common.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_common.h
hists_cumulate.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_filter.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_link.c perf hist: Use cached rbtrees 2019-01-25 15:12:10 +01:00
hists_output.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
is_printable_array.c
keep-tracking.c
kmod-path.c perf tools: Remove ext from struct kmod_path 2018-08-20 08:54:59 -03:00
llvm.c perf tools: Add missing headers, mostly stdlib.h 2019-07-09 10:13:22 -03:00
llvm.h
make perf build tests: Add NO_LIBZSTD=1 to make_minimal 2019-05-15 16:36:49 -03:00
map_groups.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
mem.c perf tests: Add missing SPDX headers 2019-06-17 15:57:19 -03:00
mem2node.c perf tools: Use zfree() where applicable 2019-07-09 10:13:27 -03:00
mmap-basic.c perf tests mmap: Show which tracepoint is failing 2018-04-18 15:35:52 -03:00
mmap-thread-lookup.c perf test mmap-thread-lookup: Initialize variable to suppress memory sanitizer warning 2019-07-09 09:33:54 -03:00
openat-syscall-all-cpus.c perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test 2019-03-19 16:52:05 -03:00
openat-syscall-tp-fields.c
openat-syscall.c
parse-events.c perf test 6: Fix missing kvm module load for s390 2019-06-10 16:20:13 -03:00
parse-no-sample-id-all.c
perf-hooks.c
perf-record.c perf tests record: Allow for 'sleep' being 'coreutils' 2018-12-17 14:54:26 -03:00
perf-targz-src-pkg
pmu.c perf tests pmu: Add missing headers 2019-02-06 10:00:38 -03:00
python-use.c perf test: Use header file util/debug.h 2018-06-04 10:28:53 -03:00
sample-parsing.c perf tools: Add missing headers, mostly stdlib.h 2019-07-09 10:13:22 -03:00
sdt.c perf tests: Add missing headers so far obtained indirectly 2019-02-06 10:00:38 -03:00
stat.c
sw-clock.c
switch-tracking.c perf tools: Use list_del_init() more thorougly 2019-07-09 10:13:27 -03:00
task-exit.c
tests.h perf tests: Add a test for time-utils 2019-06-10 16:20:12 -03:00
thread-map.c perf tools: Use zfree() where applicable 2019-07-09 10:13:27 -03:00
thread-mg-share.c
time-utils-test.c perf time-utils: Add support for multiple explicit time intervals 2019-06-10 16:20:13 -03:00
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 tools: Add missing headers, mostly stdlib.h 2019-07-09 10:13:22 -03:00
wp.c perf test: S390 does not support watchpoints in test 22 2018-10-08 14:23:44 -03:00