Find libbpf-rs in /usr/share/cargo/registry, not in the local checkout --- a/src/test.rs +++ b/src/test.rs @@ -103,10 +103,7 @@ fn validate_bpf_o(path: &Path) { fn get_libbpf_rs_path() -> PathBuf { let cwd = std::env::current_dir().expect("failed to get cwd"); - Path::new(&cwd) - .parent() - .expect("failed to get parent of cwd") - .join("libbpf-rs") + Path::new("/usr/share/cargo/registry/libbpf-rs-0.19.1") .canonicalize() .expect("failed to canonicalize libbpf-rs") }