diff options
author | Andrey Ignatov <rdna@fb.com> | 2019-03-24 01:51:00 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-04-12 23:54:59 +0300 |
commit | 7568f4cbbeae687e4c545516275479f50c15a7cc (patch) | |
tree | 6fd06f468a87e79e8c203969d90318b862159649 /tools/perf/scripts/python | |
parent | 8549ddc832d6f36be47279d201e95cc8ade6faa9 (diff) | |
download | linux-7568f4cbbeae687e4c545516275479f50c15a7cc.tar.xz |
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>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions