summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDaniel Xu <dxu@dxuuu.xyz>2020-02-17 19:04:32 -0800
committerAlexei Starovoitov <ast@kernel.org>2020-02-19 15:01:07 -0800
commit67306f84ca78c2ca5136f21791710c126a55a19b (patch)
tree9017e0f53548a512619ec8dc4ffd13f2c5a37540 /arch
parentfff7b64355eac6e29b50229ad1512315bc04b44e (diff)
selftests/bpf: Add bpf_read_branch_records() selftest
Add a selftest to test: * default bpf_read_branch_records() behavior * BPF_F_GET_BRANCH_RECORDS_SIZE flag behavior * error path on non branch record perf events * using helper to write to stack * using helper to write to global On host with hardware counter support: # ./test_progs -t perf_branches #27/1 perf_branches_hw:OK #27/2 perf_branches_no_hw:OK #27 perf_branches:OK Summary: 1/2 PASSED, 0 SKIPPED, 0 FAILED On host without hardware counter support (VM): # ./test_progs -t perf_branches #27/1 perf_branches_hw:OK #27/2 perf_branches_no_hw:OK #27 perf_branches:OK Summary: 1/2 PASSED, 1 SKIPPED, 0 FAILED Also sync tools/include/uapi/linux/bpf.h. Signed-off-by: Daniel Xu <dxu@dxuuu.xyz> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andriin@fb.com> Link: https://lore.kernel.org/bpf/20200218030432.4600-3-dxu@dxuuu.xyz
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions