aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_progs.h
diff options
context:
space:
mode:
authorStanislav Fomichev <sdf@google.com>2019-03-01 19:42:19 -0800
committerAlexei Starovoitov <ast@kernel.org>2019-03-02 11:10:40 -0800
commit886225bb0868fcf763bea62d18e57e4b5ef08a42 (patch)
tree3b643e34c41fc8c294309130f8b0b19b1890c53c /tools/testing/selftests/bpf/test_progs.h
parentselftests: bpf: break up test_progs - spinlock (diff)
downloadlinux-dev-886225bb0868fcf763bea62d18e57e4b5ef08a42.tar.xz
linux-dev-886225bb0868fcf763bea62d18e57e4b5ef08a42.zip
selftests: bpf: break up test_progs - misc
Move the rest of prog tests into separate files. Signed-off-by: Stanislav Fomichev <sdf@google.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/test_progs.h')
-rw-r--r--tools/testing/selftests/bpf/test_progs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_progs.h b/tools/testing/selftests/bpf/test_progs.h
index 66309327b4f8..51a07367cd43 100644
--- a/tools/testing/selftests/bpf/test_progs.h
+++ b/tools/testing/selftests/bpf/test_progs.h
@@ -81,6 +81,11 @@ extern struct ipv6_packet pkt_v6;
#define NUM_ITER 100000
#define VIP_NUM 5
+static inline __u64 ptr_to_u64(const void *ptr)
+{
+ return (__u64) (unsigned long) ptr;
+}
+
int bpf_find_map(const char *test, struct bpf_object *obj, const char *name);
int compare_map_keys(int map1_fd, int map2_fd);
int compare_stack_ips(int smap_fd, int amap_fd, int stack_trace_len);