blob: b83571758d8392af77f02f0d7fc92286cc5429c4 [file] [log] [blame]
Wang Nanb31de012015-11-06 13:49:41 +00001#ifndef PERF_TEST_LLVM_H
2#define PERF_TEST_LLVM_H
3
Wang Nane67d52d2016-11-26 07:03:37 +00004#ifdef __cplusplus
5extern "C" {
6#endif
7
Wang Nanb31de012015-11-06 13:49:41 +00008#include <stddef.h> /* for size_t */
9#include <stdbool.h> /* for bool */
10
11extern const char test_llvm__bpf_base_prog[];
Wang Nan7af3f3d2015-11-06 13:49:42 +000012extern const char test_llvm__bpf_test_kbuild_prog[];
Wang Nanbbb7d492015-11-16 12:10:14 +000013extern const char test_llvm__bpf_test_prologue_prog[];
Wang Nan7b6982c2016-01-25 09:55:48 +000014extern const char test_llvm__bpf_test_relocation[];
Wang Nanb31de012015-11-06 13:49:41 +000015
16enum test_llvm__testcase {
17 LLVM_TESTCASE_BASE,
Wang Nan7af3f3d2015-11-06 13:49:42 +000018 LLVM_TESTCASE_KBUILD,
Wang Nanbbb7d492015-11-16 12:10:14 +000019 LLVM_TESTCASE_BPF_PROLOGUE,
Wang Nan7b6982c2016-01-25 09:55:48 +000020 LLVM_TESTCASE_BPF_RELOCATION,
Wang Nanb31de012015-11-06 13:49:41 +000021 __LLVM_TESTCASE_MAX,
22};
23
24int test_llvm__fetch_bpf_obj(void **p_obj_buf, size_t *p_obj_buf_sz,
Wang Nan7b6982c2016-01-25 09:55:48 +000025 enum test_llvm__testcase index, bool force,
26 bool *should_load_fail);
Wang Nane67d52d2016-11-26 07:03:37 +000027#ifdef __cplusplus
28}
29#endif
Wang Nanb31de012015-11-06 13:49:41 +000030#endif