Skip to content

Commit

Permalink
integration-test: build eBPF for the proper arch
Browse files Browse the repository at this point in the history
Prior to this change we neglected to build integration-ebpf for the
correct target architecture, resulting in test failures on arm64.
  • Loading branch information
tamird committed Sep 27, 2023
1 parent ad46087 commit 15de143
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/integration-test/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 15de143

Please sign in to comment.