summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/progs/core_reloc_types.h
diff options
context:
space:
mode:
authorAndrii Nakryiko <andriin@fb.com>2019-08-07 14:40:01 -0700
committerAlexei Starovoitov <ast@kernel.org>2019-08-07 14:43:49 -0700
commit29e1c66872450adba0ad552ff6019932168676f3 (patch)
treed8e0e5c5cd477ddf1ca0af0717623f1f19488972 /tools/testing/selftests/bpf/progs/core_reloc_types.h
parentc1f5e7dd19e71cd3607572bb957def618a33519a (diff)
downloadlinux-stable-29e1c66872450adba0ad552ff6019932168676f3.tar.gz
linux-stable-29e1c66872450adba0ad552ff6019932168676f3.tar.bz2
linux-stable-29e1c66872450adba0ad552ff6019932168676f3.zip
selftests/bpf: add CO-RE relocs misc tests
Add tests validating few edge-cases of capturing offset relocations. Signed-off-by: Andrii Nakryiko <andriin@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/core_reloc_types.h')
-rw-r--r--tools/testing/selftests/bpf/progs/core_reloc_types.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/core_reloc_types.h b/tools/testing/selftests/bpf/progs/core_reloc_types.h
index 5f3ebd4f6dc3..10a252b6da55 100644
--- a/tools/testing/selftests/bpf/progs/core_reloc_types.h
+++ b/tools/testing/selftests/bpf/progs/core_reloc_types.h
@@ -640,3 +640,28 @@ struct core_reloc_ints___err_wrong_sz_64 {
uint32_t u64_field; /* not 64-bit anymore */
int32_t s64_field; /* not 64-bit anymore */
};
+
+/*
+ * MISC
+ */
+struct core_reloc_misc_output {
+ int a, b, c;
+};
+
+struct core_reloc_misc___a {
+ int a1;
+ int a2;
+};
+
+struct core_reloc_misc___b {
+ int b1;
+ int b2;
+};
+
+/* this one extends core_reloc_misc_extensible struct from BPF prog */
+struct core_reloc_misc_extensible {
+ int a;
+ int b;
+ int c;
+ int d;
+};