summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIlya Leoshkevich <iii@linux.ibm.com>2021-03-09 01:56:49 +0100
committerAlexei Starovoitov <ast@kernel.org>2021-03-09 10:59:46 -0800
commitccb0e23ca27445e2408f52944660f9e5e5d1c4b1 (patch)
tree86e58ea5bbd923777daf8088c876475a62550202 /tools
parent3fcd50d6f9a963a21e142d71be135eff6a374d2d (diff)
downloadlinux-ccb0e23ca27445e2408f52944660f9e5e5d1c4b1.tar.bz2
selftests/bpf: Add BTF_KIND_FLOAT to btf_dump_test_case_syntax
Check that dumping various floating-point types produces a valid C code. Suggested-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20210309005649.162480-3-iii@linux.ibm.com
Diffstat (limited to 'tools')
-rw-r--r--tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
index 31975c96e2c9..12b40dc81e14 100644
--- a/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
+++ b/tools/testing/selftests/bpf/progs/btf_dump_test_case_syntax.c
@@ -205,6 +205,12 @@ struct struct_with_embedded_stuff {
int t[11];
};
+struct float_struct {
+ float f;
+ const double *d;
+ volatile long double *ld;
+};
+
struct root_struct {
enum e1 _1;
enum e2 _2;
@@ -219,6 +225,7 @@ struct root_struct {
union_fwd_t *_12;
union_fwd_ptr_t _13;
struct struct_with_embedded_stuff _14;
+ struct float_struct _15;
};
/* ------ END-EXPECTED-OUTPUT ------ */