blob: f68b0d9b8ae285ce1c6396d58a0340057bcca681 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Wang Nanb31de012015-11-06 13:49:41 +00002#ifndef PERF_TEST_LLVM_H
3#define PERF_TEST_LLVM_H
4
Wang Nane67d52d2016-11-26 07:03:37 +00005#ifdef __cplusplus
6extern "C" {
7#endif
8
Wang Nanb31de012015-11-06 13:49:41 +00009#include <stddef.h> /* for size_t */
10#include <stdbool.h> /* for bool */
11
12extern const char test_llvm__bpf_base_prog[];
Wang Nan7af3f3d2015-11-06 13:49:42 +000013extern const char test_llvm__bpf_test_kbuild_prog[];
Wang Nanbbb7d492015-11-16 12:10:14 +000014extern const char test_llvm__bpf_test_prologue_prog[];
Wang Nan7b6982c2016-01-25 09:55:48 +000015extern const char test_llvm__bpf_test_relocation[];
Wang Nanb31de012015-11-06 13:49:41 +000016
17enum test_llvm__testcase {
18 LLVM_TESTCASE_BASE,
Wang Nan7af3f3d2015-11-06 13:49:42 +000019 LLVM_TESTCASE_KBUILD,
Wang Nanbbb7d492015-11-16 12:10:14 +000020 LLVM_TESTCASE_BPF_PROLOGUE,
Wang Nan7b6982c2016-01-25 09:55:48 +000021 LLVM_TESTCASE_BPF_RELOCATION,
Wang Nanb31de012015-11-06 13:49:41 +000022 __LLVM_TESTCASE_MAX,
23};
24
25int test_llvm__fetch_bpf_obj(void **p_obj_buf, size_t *p_obj_buf_sz,
Wang Nan7b6982c2016-01-25 09:55:48 +000026 enum test_llvm__testcase index, bool force,
27 bool *should_load_fail);
Wang Nane67d52d2016-11-26 07:03:37 +000028#ifdef __cplusplus
29}
30#endif
Wang Nanb31de012015-11-06 13:49:41 +000031#endif