linux-stable/tools/testing/selftests
Martin KaFai Lau 05687352c6 bpf: Refactor and bug fix in test_func_type in test_btf.c
1) bpf_load_program_xattr() is absorbing the EBIG error
   which makes testing this case impossible.  It is replaced
   with a direct syscall(__NR_bpf, BPF_PROG_LOAD,...).
2) The test_func_type() is renamed to test_info_raw() to
   prepare for the new line_info test in the next patch.
3) The bpf_obj_get_info_by_fd() testing for func_info
   is refactored to test_get_finfo().  A new
   test_get_linfo() will be added in the next patch
   for testing line_info purpose.
4) The test->func_info_cnt is checked instead of
   a static value "2".
5) Remove unnecessary "\n" in error message.
6) Adding back info_raw_test_num to the cmd arg such
   that a specific test case can be tested, like
   all other existing tests.

7) Fix a bug in handling expected_prog_load_failure.
   A test could pass even if prog_fd != -1 while
   expected_prog_load_failure is true.
8) The min rec_size check should be < 8 instead of < 4.

Fixes: 4798c4ba3b ("tools/bpf: extends test_btf to test load/retrieve func_type info")
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2018-12-09 13:54:38 -08:00
..
android
bpf bpf: Refactor and bug fix in test_func_type in test_btf.c 2018-12-09 13:54:38 -08:00
breakpoints
capabilities
cgroup
cpu-hotplug
cpufreq
drivers selftests: mlxsw: Consider VxLAN learning enabled as valid 2018-11-21 17:10:31 -08:00
efivarfs
exec
filesystems
firmware
ftrace
futex
gpio
ia64
intel_pstate
ipc
kcmp
kmod
kvm
lib
locking
media_tests
membarrier
memfd
memory-hotplug
mount
mqueue
net selftests/net: add txring_overwrite 2018-11-24 18:22:21 -08:00
netfilter
networking/timestamping
nsfs
ntb
powerpc
prctl
proc
pstore
ptp
ptrace
rcutorture
rseq
rtc
seccomp
sigaltstack
size
sparc64
splice
static_keys
sync
sysctl
tc-testing
timers
uevent
user
vDSO
vm
watchdog
x86
zram
.gitignore
gen_kselftest_tar.sh
kselftest.h
kselftest_harness.h
kselftest_install.sh
lib.mk
Makefile