aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_btf.h
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2021-02-26 21:22:53 +0100
committerAlexei Starovoitov <ast@kernel.org>2021-03-04 17:58:16 -0800
commit7e72aad3a15c06e40e3ccd2352e5010e978f1acf (patch)
tree4eaee9bf7b2d7ed005ea697da74d15ce0ed5efe7 /tools/testing/selftests/bpf/test_btf.h
parentbpf: Add BTF_KIND_FLOAT support (diff)
downloadlinux-dev-7e72aad3a15c06e40e3ccd2352e5010e978f1acf.tar.xz
linux-dev-7e72aad3a15c06e40e3ccd2352e5010e978f1acf.zip
selftest/bpf: Add BTF_KIND_FLOAT tests
Test the good variants as well as the potential malformed ones. Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Yonghong Song <yhs@fb.com> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20210226202256.116518-8-iii@linux.ibm.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_btf.h')
-rw-r--r--tools/testing/selftests/bpf/test_btf.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_btf.h b/tools/testing/selftests/bpf/test_btf.h
index 2023725f1962..e2394eea4b7f 100644
--- a/tools/testing/selftests/bpf/test_btf.h
+++ b/tools/testing/selftests/bpf/test_btf.h
@@ -66,4 +66,7 @@
#define BTF_FUNC_ENC(name, func_proto) \
BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_FUNC, 0, 0), func_proto)
+#define BTF_TYPE_FLOAT_ENC(name, sz) \
+ BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_FLOAT, 0, 0), sz)
+
#endif /* _TEST_BTF_H */