linux-stable/tools/testing/selftests
Andrey Ignatov 7568f4cbbe selftests/bpf: C based test for sysctl and strtoX
Add C based test for a few bpf_sysctl_* helpers and bpf_strtoul.

Make sure that sysctl can be identified by name and that multiple
integers can be parsed from sysctl value with bpf_strtoul.

net/ipv4/tcp_mem is chosen as a testing sysctl, it contains 3 unsigned
longs, they all are parsed and compared (val[0] < val[1] < val[2]).

Example of output:
  # ./test_sysctl
  ...
  Test case: C prog: deny all writes .. [PASS]
  Test case: C prog: deny access by name .. [PASS]
  Test case: C prog: read tcp_mem .. [PASS]
  Summary: 39 PASSED, 0 FAILED

Signed-off-by: Andrey Ignatov <rdna@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2019-04-12 13:54:59 -07:00
..
android selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
bpf selftests/bpf: C based test for sysctl and strtoX 2019-04-12 13:54:59 -07:00
breakpoints
capabilities
cgroup Add tests for memory.oom.group 2018-09-07 16:36:01 -06:00
cpu-hotplug selftests: cpu-hotplug: fix case where CPUs offline > CPUs present 2019-01-25 14:57:45 -07:00
cpufreq
drivers selftests: mlxsw: Add a new test for strict priority 2019-03-28 17:20:53 -07:00
efivarfs selftests/efivarfs: add required kernel configs 2018-09-05 10:58:07 -06:00
exec
filesystems selftests: add binderfs selftests 2019-01-30 15:19:56 +01:00
firmware selftests: firmware: fix verify_reqs() return value 2019-02-08 13:00:43 +01:00
ftrace The biggest change for this release is in the histogram code. 2019-03-11 17:01:32 -07:00
futex selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
gpio selftests: gpio-mockup-chardev: Check asprintf() for error 2019-01-16 15:02:57 -07:00
ia64
ima selftests/ima: kexec_load syscall test 2018-12-11 07:19:47 -05:00
intel_pstate
ipc
ir media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
kcmp
kmod
kvm KVM: selftests: complete IO before migrating guest state 2019-03-28 17:29:09 +01:00
lib
livepatch livepatch/selftests: use "$@" to preserve argument list 2019-02-12 10:58:47 +01:00
locking
media_tests
membarrier
memfd selftests/memfd: add tests for F_SEAL_FUTURE_WRITE seal 2019-03-05 21:07:19 -08:00
memory-hotplug selftests: memory-hotplug: add required configs 2018-09-05 10:58:31 -06:00
mount selftests: mount: remove no longer needed config option 2018-08-09 11:26:07 -06:00
mqueue
net selftests: Add debugging options to pmtu.sh 2019-04-11 21:32:00 -07:00
netfilter selftests: netfilter: add simple masq/redirect test cases 2019-02-04 14:21:27 +01:00
networking/timestamping Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
nsfs
ntb
pidfd selftests: add tests for pidfd_send_signal() 2019-03-05 17:04:33 +01:00
powerpc selftests/powerpc: Remove duplicate header 2019-02-26 12:32:06 +11:00
prctl
proc tools/testing/selftests/proc/proc-pid-vm.c: test with vsyscall in mind 2019-03-14 14:36:20 -07:00
pstore
ptp
ptrace
rcutorture tools headers: Move the nolibc header from rcutorture to tools/include/nolibc/ 2019-01-25 15:37:13 -08:00
rseq rseq/selftests: fix parametrized test with -fpie 2018-09-27 12:59:19 -06:00
rtc selftests: rtc: rtctest: add alarm test on minute boundary 2019-01-14 18:49:14 -07:00
safesetid LSM: SafeSetID: add selftest 2019-02-12 10:58:51 -08:00
seccomp selftests/seccomp: Actually sleep for 1/10th second 2019-02-13 08:52:42 -07:00
sigaltstack
size
sparc64 selftests: sparc64: Add missing SPDX License Identifiers 2018-06-18 09:29:20 -06:00
splice
static_keys
sync
sysctl tools/testing/selftests/sysctl/sysctl.sh: add tests for >32-bit values written to 32-bit integers 2019-03-12 10:04:00 -07:00
tc-testing net: sched: flower: use correct ht function to prevent duplicates 2019-04-11 11:33:06 -07:00
timers selftests: timers: use LDLIBS instead of LDFLAGS 2019-01-28 08:02:12 -07:00
tmpfs tmpfs: test link accounting with O_TMPFILE 2019-03-05 21:07:20 -08:00
tpm2 selftests/tpm2: Open tpm dev in unbuffered mode 2019-04-08 15:58:55 -07:00
uevent
user
vDSO selftests: vDSO - fix to return KSFT_SKIP when test couldn't be run 2018-07-11 10:14:26 -06:00
vm tools: mark 'test_vmalloc.sh' executable 2019-03-11 10:10:29 -07:00
watchdog selftests: watchdog: fix spelling mistake "experies" -> "expires" 2018-12-13 13:03:19 -07:00
x86 Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2019-01-27 12:02:00 -08:00
zram
.gitignore
Makefile pidfd patches for v5.1-rc1 2019-03-16 13:47:14 -07:00
gen_kselftest_tar.sh
kselftest.h selftest: include stdio.h in kselftest.h 2019-02-13 08:34:47 -07:00
kselftest_harness.h selftests/harness: Update named initializer syntax 2019-02-13 08:52:35 -07:00
kselftest_install.sh
lib.mk selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00