diff options
author | Yonghong Song <yhs@fb.com> | 2021-09-15 01:30:47 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-09-15 04:45:52 +0300 |
commit | 35baba7a832fa466b4aa2e0d00473d795cec8f20 (patch) | |
tree | 581b5b258e63a4d5c86c037b711e70e489cf3aa2 /tools/testing/selftests/bpf/test_btf.h | |
parent | 3df3bd68d4811bccc74adc04d4d84512957a1a07 (diff) | |
download | linux-35baba7a832fa466b4aa2e0d00473d795cec8f20.tar.xz |
selftests/bpf: Add BTF_KIND_TAG unit tests
Test good and bad variants of BTF_KIND_TAG encoding.
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/20210914223047.248223-1-yhs@fb.com
Diffstat (limited to 'tools/testing/selftests/bpf/test_btf.h')
-rw-r--r-- | tools/testing/selftests/bpf/test_btf.h | 3 |
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 e2394eea4b7f..0619e06d745e 100644 --- a/tools/testing/selftests/bpf/test_btf.h +++ b/tools/testing/selftests/bpf/test_btf.h @@ -69,4 +69,7 @@ #define BTF_TYPE_FLOAT_ENC(name, sz) \ BTF_TYPE_ENC(name, BTF_INFO_ENC(BTF_KIND_FLOAT, 0, 0), sz) +#define BTF_TAG_ENC(value, type, component_idx) \ + BTF_TYPE_ENC(value, BTF_INFO_ENC(BTF_KIND_TAG, 0, 0), type), (component_idx) + #endif /* _TEST_BTF_H */ |