Use long long in the type_based___diff fixture where the BPF program expects long. On 64-bit targets these have the same size and signedness but different BTF names. Include the comm array in the local task_struct for the kernel case so it checks matching plain char array elements across the BPF and kernel builds. Codex assisted with applying the two test changes from the review and running the CO-RE regression tests. Suggested-by: Alexei Starovoitov Signed-off-by: Haowen Deng --- tools/testing/selftests/bpf/progs/core_reloc_types.h | 2 +- tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/progs/core_reloc_types.h b/tools/testing/selftests/bpf/progs/core_reloc_types.h index 6d758e74b..d8b4b5207 100644 --- a/tools/testing/selftests/bpf/progs/core_reloc_types.h +++ b/tools/testing/selftests/bpf/progs/core_reloc_types.h @@ -990,7 +990,7 @@ struct a_complex_struct___diff { struct a_struct___forward *a; void *b; } x; - volatile long y; + volatile long long y; }; union a_union___diff { diff --git a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c index ee4a601dc..31e6f4ba3 100644 --- a/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c +++ b/tools/testing/selftests/bpf/progs/test_core_reloc_kernel.c @@ -37,6 +37,7 @@ struct mm_struct___wrong { struct task_struct___local { int pid; + char comm[16]; struct mm_struct___wrong *mm; }; -- 2.43.0