mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
f87c1930ac
Move testing prog and object load wrappers (bpf_prog_test_load and bpf_test_load_program) into testing_helpers.{c,h} and get rid of otherwise useless test_stub.c. Make testing_helpers.c available to non-test_progs binaries as well. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Dave Marchevsky <davemarchevsky@fb.com> Link: https://lore.kernel.org/bpf/20211103220845.2676888-11-andrii@kernel.org
14 lines
614 B
C
14 lines
614 B
C
/* 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);
|
|
int bpf_prog_test_load(const char *file, enum bpf_prog_type type,
|
|
struct bpf_object **pobj, int *prog_fd);
|
|
int bpf_test_load_program(enum bpf_prog_type type, const struct bpf_insn *insns,
|
|
size_t insns_cnt, const char *license,
|
|
__u32 kern_version, char *log_buf,
|
|
size_t log_buf_sz);
|