fix tests

reviewable/pr1396/r3
Sven Cowart 2 weeks ago committed by Michal R
parent d8ba9c9cff
commit d9136a66d9

@ -438,15 +438,13 @@ fn pin_tcx_link() {
let old_link = PinnedLink::from_pin(pin_path).unwrap(); let old_link = PinnedLink::from_pin(pin_path).unwrap();
let link = FdLink::from(old_link).try_into().unwrap(); let link = FdLink::from(old_link).try_into().unwrap();
let link_id = prog.attach_to_link(link).unwrap(); let _link_id = prog.attach_to_link(link).unwrap();
assert_loaded(program_name); assert_loaded(program_name);
// Clean up // Clean up: remove the stale pin file and drop the bpf instance (which drops the program and link)
let link = prog.take_link(link_id).unwrap(); remove_file(pin_path).unwrap();
let fd_link: FdLink = link.try_into().unwrap(); drop(bpf);
fd_link.unpin().unwrap();
drop(fd_link);
assert_unloaded(program_name); assert_unloaded(program_name);
} }

Loading…
Cancel
Save