|
|
@ -20,7 +20,7 @@ const RETRY_DURATION_MS: u64 = 10;
|
|
|
|
|
|
|
|
|
|
|
|
#[integration_test]
|
|
|
|
#[integration_test]
|
|
|
|
fn long_name() {
|
|
|
|
fn long_name() {
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/name_test");
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/name_test");
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let name_prog: &mut Xdp = bpf
|
|
|
|
let name_prog: &mut Xdp = bpf
|
|
|
|
.program_mut("ihaveaverylongname")
|
|
|
|
.program_mut("ihaveaverylongname")
|
|
|
@ -38,7 +38,7 @@ fn long_name() {
|
|
|
|
#[integration_test]
|
|
|
|
#[integration_test]
|
|
|
|
fn multiple_btf_maps() {
|
|
|
|
fn multiple_btf_maps() {
|
|
|
|
let bytes =
|
|
|
|
let bytes =
|
|
|
|
include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/multimap-btf.bpf.o");
|
|
|
|
include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/multimap-btf.bpf.o");
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
let map_1: Array<_, u64> = bpf.take_map("map_1").unwrap().try_into().unwrap();
|
|
|
|
let map_1: Array<_, u64> = bpf.take_map("map_1").unwrap().try_into().unwrap();
|
|
|
@ -85,7 +85,7 @@ macro_rules! assert_loaded {
|
|
|
|
|
|
|
|
|
|
|
|
#[integration_test]
|
|
|
|
#[integration_test]
|
|
|
|
fn unload_xdp() {
|
|
|
|
fn unload_xdp() {
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/test");
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/test");
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let prog: &mut Xdp = bpf
|
|
|
|
let prog: &mut Xdp = bpf
|
|
|
|
.program_mut("test_unload_xdp")
|
|
|
|
.program_mut("test_unload_xdp")
|
|
|
@ -115,7 +115,7 @@ fn unload_xdp() {
|
|
|
|
|
|
|
|
|
|
|
|
#[integration_test]
|
|
|
|
#[integration_test]
|
|
|
|
fn unload_kprobe() {
|
|
|
|
fn unload_kprobe() {
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/test");
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/test");
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let prog: &mut KProbe = bpf
|
|
|
|
let prog: &mut KProbe = bpf
|
|
|
|
.program_mut("test_unload_kpr")
|
|
|
|
.program_mut("test_unload_kpr")
|
|
|
@ -150,7 +150,7 @@ fn pin_link() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/test");
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/test");
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let mut bpf = Bpf::load(bytes).unwrap();
|
|
|
|
let prog: &mut Xdp = bpf
|
|
|
|
let prog: &mut Xdp = bpf
|
|
|
|
.program_mut("test_unload_xdp")
|
|
|
|
.program_mut("test_unload_xdp")
|
|
|
@ -185,7 +185,7 @@ fn pin_lifecycle() {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/debug/pass");
|
|
|
|
let bytes = include_bytes_aligned!("../../../../target/bpfel-unknown-none/release/pass");
|
|
|
|
|
|
|
|
|
|
|
|
// 1. Load Program and Pin
|
|
|
|
// 1. Load Program and Pin
|
|
|
|
{
|
|
|
|
{
|
|
|
|