summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_btf.h
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2021-11-11 17:26:30 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-11-11 17:41:11 -0800
commit6aa5dabc9d0ef722905e4ca4f9751d70cf3ec8a4 (patch)
treea5027874823e8ab51508cb7f4e06899fc0695292 /tools/testing/selftests/bpf/test_btf.h
parent0dc85872203bf7b15c56c7eb228b8f3fabb17ac2 (diff)
selftests/bpf: Add BTF_KIND_TYPE_TAG unit tests
Add BTF_KIND_TYPE_TAG unit tests. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211112012630.1506095-1-yhs@fb.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 32c7a57867da..128989bed8b7 100644
--- a/tools/testing/selftests/bpf/test_btf.h
+++ b/tools/testing/selftests/bpf/test_btf.h
@@ -72,4 +72,7 @@
#define BTF_DECL_TAG_ENC(value, type, component_idx) \
BTF_TYPE_ENC(value, BTF_INFO_ENC(BTF_KIND_DECL_TAG, 0, 0), type), (component_idx)
+#define BTF_TYPE_TAG_ENC(value, type) \
+ BTF_TYPE_ENC(value, BTF_INFO_ENC(BTF_KIND_TYPE_TAG, 0, 0), type)
+
#endif /* _TEST_BTF_H */