|
@@ -15,7 +15,7 @@ const RETRY_DURATION_MS: u64 = 10;
|
|
|
|
|
|
#[test]
|
|
|
fn long_name() {
|
|
|
- let mut bpf = Bpf::load(integration_test::NAME_TEST).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::NAME_TEST).unwrap();
|
|
|
let name_prog: &mut Xdp = bpf
|
|
|
.program_mut("ihaveaverylongname")
|
|
|
.unwrap()
|
|
@@ -31,7 +31,7 @@ fn long_name() {
|
|
|
|
|
|
#[test]
|
|
|
fn multiple_btf_maps() {
|
|
|
- let mut bpf = Bpf::load(integration_test::MULTIMAP_BTF).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::MULTIMAP_BTF).unwrap();
|
|
|
|
|
|
let map_1: Array<_, u64> = bpf.take_map("map_1").unwrap().try_into().unwrap();
|
|
|
let map_2: Array<_, u64> = bpf.take_map("map_2").unwrap().try_into().unwrap();
|
|
@@ -67,7 +67,7 @@ macro_rules! assert_loaded {
|
|
|
|
|
|
#[test]
|
|
|
fn unload_xdp() {
|
|
|
- let mut bpf = Bpf::load(integration_test::TEST).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::TEST).unwrap();
|
|
|
let prog: &mut Xdp = bpf
|
|
|
.program_mut("test_unload_xdp")
|
|
|
.unwrap()
|
|
@@ -96,7 +96,7 @@ fn unload_xdp() {
|
|
|
|
|
|
#[test]
|
|
|
fn unload_kprobe() {
|
|
|
- let mut bpf = Bpf::load(integration_test::TEST).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::TEST).unwrap();
|
|
|
let prog: &mut KProbe = bpf
|
|
|
.program_mut("test_unload_kpr")
|
|
|
.unwrap()
|
|
@@ -131,7 +131,7 @@ fn pin_link() {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- let mut bpf = Bpf::load(integration_test::TEST).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::TEST).unwrap();
|
|
|
let prog: &mut Xdp = bpf
|
|
|
.program_mut("test_unload_xdp")
|
|
|
.unwrap()
|
|
@@ -168,7 +168,7 @@ fn pin_lifecycle() {
|
|
|
|
|
|
// 1. Load Program and Pin
|
|
|
{
|
|
|
- let mut bpf = Bpf::load(integration_test::PASS).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::PASS).unwrap();
|
|
|
let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap();
|
|
|
prog.load().unwrap();
|
|
|
prog.pin("/sys/fs/bpf/aya-xdp-test-prog").unwrap();
|
|
@@ -202,7 +202,7 @@ fn pin_lifecycle() {
|
|
|
|
|
|
// 4. Load a new version of the program, unpin link, and atomically replace old program
|
|
|
{
|
|
|
- let mut bpf = Bpf::load(integration_test::PASS).unwrap();
|
|
|
+ let mut bpf = Bpf::load(crate::PASS).unwrap();
|
|
|
let prog: &mut Xdp = bpf.program_mut("pass").unwrap().try_into().unwrap();
|
|
|
prog.load().unwrap();
|
|
|
|