aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/testing_helpers.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2020-07-31 11:28:28 -0700
committerAlexei Starovoitov <ast@kernel.org>2020-08-01 20:38:28 -0700
commit90806ccc90bbd0150267a97ae4003269597a6a6c (patch)
tree9a3eb6b6cda28f4689509797816966e648cf84fb /tools/testing/selftests/bpf/testing_helpers.h
parentlibbpf: Add bpf_link detach APIs (diff)
downloadlinux-dev-90806ccc90bbd0150267a97ae4003269597a6a6c.tar.xz
linux-dev-90806ccc90bbd0150267a97ae4003269597a6a6c.zip
selftests/bpf: Add link detach tests for cgroup, netns, and xdp bpf_links
Add bpf_link__detach() testing to selftests for cgroup, netns, and xdp bpf_links. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Song Liu <songliubraving@fb.com> Acked-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20200731182830.286260-4-andriin@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/testing_helpers.h')
-rw-r--r--tools/testing/selftests/bpf/testing_helpers.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/testing_helpers.h b/tools/testing/selftests/bpf/testing_helpers.h
index 923b51762759..d4f8e749611b 100644
--- a/tools/testing/selftests/bpf/testing_helpers.h
+++ b/tools/testing/selftests/bpf/testing_helpers.h
@@ -1,5 +1,8 @@
/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
/* Copyright (C) 2020 Facebook, Inc. */
#include <stdbool.h>
+#include <bpf/bpf.h>
+#include <bpf/libbpf.h>
int parse_num_list(const char *s, bool **set, int *set_len);
+__u32 link_info_prog_id(const struct bpf_link *link, struct bpf_link_info *info);