From 15de14383d7f194430a1a4fc8d373d7c10f25244 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Wed, 27 Sep 2023 13:21:58 -0400 Subject: [PATCH] integration-test: build eBPF for the proper arch Prior to this change we neglected to build integration-ebpf for the correct target architecture, resulting in test failures on arm64. --- test/integration-test/build.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/integration-test/build.rs b/test/integration-test/build.rs index fec40483..1aee5fea 100644 --- a/test/integration-test/build.rs +++ b/test/integration-test/build.rs @@ -107,7 +107,7 @@ fn main() { } else if arch == "aarch64" { target_arch.push("arm64"); } else { - target_arch.push(arch); + target_arch.push(&arch); }; // NB: libbpf's documentation suggests that vmlinux.h be generated by running `bpftool btf @@ -198,6 +198,8 @@ fn main() { &target, ]); + cmd.env("CARGO_CFG_BPF_TARGET_ARCH", arch); + // Workaround to make sure that the rust-toolchain.toml is respected. for key in ["RUSTUP_TOOLCHAIN", "RUSTC"] { cmd.env_remove(key);