summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_cpp.cpp
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-12-06 11:04:15 +0300
committerDavid S. Miller <davem@davemloft.net>2019-12-06 11:04:15 +0300
commitae72555b410410568b493f8735324f8e9bd7c051 (patch)
tree6b86350dbaf4de0801e7ae58aac9b0e410714ecc /tools/testing/selftests/bpf/test_cpp.cpp
parent0033b34a03ec5cf747cdaf9b1f9dceb91c020f17 (diff)
parent8f9081c92523328aa569d09051add79a6c0ae9ff (diff)
downloadlinux-ae72555b410410568b493f8735324f8e9bd7c051.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
Alexei Starovoitov says: ==================== pull-request: bpf 2019-12-05 The following pull-request contains BPF updates for your *net* tree. We've added 6 non-merge commits during the last 1 day(s) which contain a total of 14 files changed, 116 insertions(+), 37 deletions(-). The main changes are: 1) three selftests fixes, from Stanislav. 2) one samples fix, from Jesper. 3) one verifier fix, from Yonghong. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/bpf/test_cpp.cpp')
-rw-r--r--tools/testing/selftests/bpf/test_cpp.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_cpp.cpp b/tools/testing/selftests/bpf/test_cpp.cpp
new file mode 100644
index 000000000000..f0eb2727b766
--- /dev/null
+++ b/tools/testing/selftests/bpf/test_cpp.cpp
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) */
+#include "libbpf.h"
+#include "bpf.h"
+#include "btf.h"
+
+/* do nothing, just make sure we can link successfully */
+
+int main(int argc, char *argv[])
+{
+ /* libbpf.h */
+ libbpf_set_print(NULL);
+
+ /* bpf.h */
+ bpf_prog_get_fd_by_id(0);
+
+ /* btf.h */
+ btf__new(NULL, 0);
+
+ return 0;
+}