alistair23-linux/tools/testing/selftests
Martin KaFai Lau 88cda1c9da bpf: libbpf: Provide basic API support to specify BPF obj name
This patch extends the libbpf to provide API support to
allow specifying BPF object name.

In tools/lib/bpf/libbpf, the C symbol of the function
and the map is used.  Regarding section name, all maps are
under the same section named "maps".  Hence, section name
is not a good choice for map's name.  To be consistent with
map, bpf_prog also follows and uses its function symbol as
the prog's name.

This patch adds logic to collect function's symbols in libbpf.
There is existing codes to collect the map's symbols and no change
is needed.

The bpf_load_program_name() and bpf_map_create_name() are
added to take the name argument.  For the other bpf_map_create_xxx()
variants, a name argument is directly added to them.

In samples/bpf, bpf_load.c in particular, the symbol is also
used as the map's name and the map symbols has already been
collected in the existing code.  For bpf_prog, bpf_load.c does
not collect the function symbol name.  We can consider to collect
them later if there is a need to continue supporting the bpf_load.c.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Alexei Starovoitov <ast@fb.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-29 06:17:05 +01:00
..
bpf bpf: libbpf: Provide basic API support to specify BPF obj name 2017-09-29 06:17:05 +01:00
breakpoints selftests: breakpoint_test: Add missing line breaks 2017-07-26 10:32:31 -06:00
capabilities selftests: capabilities: convert error output to TAP13 ksft framework 2017-08-14 11:31:15 -06:00
cpu-hotplug selftests/cpu-hotplug: Skip test when there is only one online cpu 2017-08-16 17:48:18 -06:00
cpufreq selftests: create cpufreq kconfig fragments 2017-04-27 08:42:18 -06:00
drivers/gpu drm/i915: Provide a hook for selftests 2017-02-13 20:45:21 +00:00
efivarfs selftests: remove duplicated all and clean target 2017-01-05 13:41:35 -07:00
exec selftests: enable O and KBUILD_OUTPUT 2017-01-05 13:42:22 -07:00
filesystems selftests: move dnotify_test from Documentation/filesystems 2016-09-20 09:09:00 -06:00
firmware test_firmware: add batched firmware tests 2017-08-10 13:58:41 -07:00
ftrace selftests: ftrace: Check given string is not zero-length 2017-07-26 15:41:43 -06:00
futex linux-kselftest-4.14-rc1-update 2017-09-08 15:11:20 -07:00
gpio selftests: gpio: fix clean target to remove all generated files and dirs 2017-04-25 09:49:50 -06:00
ia64 selftests: move ia64 tests from Documentation/ia64 2016-09-20 09:58:12 -06:00
intel_pstate selftests: intel_pstate: add .gitignore 2017-06-30 10:06:24 -06:00
ipc selftests: ipc add missing generated file to .gitignore 2017-01-11 09:51:03 -07:00
kcmp tools/testing/selftests/kcmp/kcmp_test.c: add KCMP_EPOLL_TFD testing 2017-09-08 18:26:47 -07:00
kmod test_kmod: fix description for -s -and -c parameters 2017-08-18 15:32:01 -07:00
lib selftests: lib: Skip tests on missing test modules 2017-06-23 09:41:53 -06:00
locking locking/ww_mutex: Add ww_mutex to tools/testing/selftests 2017-01-14 11:37:17 +01:00
media_tests selftests: media_tests add a new video device test 2016-07-26 09:59:30 -06:00
membarrier selftests: membarrier: use ksft_* var arg msg api 2017-06-30 16:16:23 -06:00
memfd linux-kselftest-4.14-rc1-update 2017-09-08 15:11:20 -07:00
memory-hotplug selftests: fix memory-hotplug test 2017-06-30 10:06:23 -06:00
mount selftests: add default rules for c source file 2017-01-05 13:42:01 -07:00
mqueue selftests: remove duplicated all and clean target 2017-01-05 13:41:35 -07:00
net selftests: rtnetlink.sh: add rudimentary vrf test 2017-09-28 10:14:16 -07:00
networking/timestamping selftests/net: Add a test to validate behavior of rx timestamps 2017-08-23 20:30:47 -07:00
nsfs selftests/nsfs: create kconfig fragments 2017-07-24 12:35:14 -06:00
ntb ntb: ntb_test: ensure the link is up before trying to configure the mws 2017-08-01 15:18:59 -04:00
powerpc selftests/powerpc: Force ptrace tests to build -fno-pie 2017-08-31 14:26:49 +10:00
prctl selftests: move prctl tests from Documentation/prctl 2016-09-20 09:09:09 -06:00
pstore selftests: pstore: add .gitignore for generated files 2017-08-02 13:50:29 -06:00
ptp selftests: ptp: include default header install path 2017-08-02 15:26:46 -06:00
ptrace selftests: remove duplicated all and clean target 2017-01-05 13:41:35 -07:00
rcutorture Merge branches 'doc.2017.08.17a', 'fixes.2017.08.17a', 'hotplug.2017.07.25b', 'misc.2017.08.17a', 'spin_unlock_wait_no.2017.08.17a', 'srcu.2017.07.27c' and 'torture.2017.07.24c' into HEAD 2017-08-17 08:10:04 -07:00
seccomp Major additions: 2017-09-22 16:16:41 -10:00
sigaltstack selftests: sigaltstack: convert to use TAP13 ksft framework 2017-08-02 13:55:48 -06:00
size kselftest: convert get_size to use stricter TAP13 format 2017-06-14 18:23:27 -06:00
splice selftests: splice: add .gitignore for generated files 2017-08-02 13:50:48 -06:00
static_keys selftests: create test-specific kconfig fragments 2016-02-25 09:47:52 -07:00
sync selftests: sync: convert to use TAP13 ksft framework 2017-07-28 13:20:29 -06:00
sysctl test_sysctl: fix sysctl.sh by making it executable 2017-08-07 15:13:36 -06:00
tc-testing tc-testing: add test for testing ife type 2017-08-29 15:14:18 -07:00
timers linux-kselftest-4.14-rc1-update 2017-09-08 15:11:20 -07:00
user selftests: create test-specific kconfig fragments 2016-02-25 09:47:52 -07:00
vDSO selftests: move vDSO tests from Documentation/vDSO 2016-09-20 09:58:04 -06:00
vm userfaultfd: selftest: explicit failure if the SIGBUS test failed 2017-09-06 17:27:29 -07:00
watchdog selftests: watchdog: get boot reason via WDIOC_GETBOOTSTATUS 2017-07-24 12:37:07 -06:00
x86 Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2017-09-11 18:34:47 -07:00
zram selftests: add EXTRA_CLEAN for clean target 2017-01-05 13:42:17 -07:00
.gitignore selftests: add gpio generated files to .gitignore 2017-04-25 09:49:38 -06:00
gen_kselftest_tar.sh
kselftest.h selftests: kselftest framework: change skip exit code to 0 2017-08-25 10:02:00 -06:00
kselftest_harness.h selftests: Enhance kselftest_harness.h to print which assert failed 2017-09-05 19:21:33 -06:00
kselftest_install.sh
lib.mk selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format 2017-08-25 10:17:12 -06:00
Makefile selftests/Makefile: Add missed PHONY targets 2017-04-21 11:24:58 -06:00