|
|
@ -31,6 +31,13 @@ fn long_name() {
|
|
|
|
// Therefore, as long as we were able to load the program, this is good enough.
|
|
|
|
// Therefore, as long as we were able to load the program, this is good enough.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test_log::test]
|
|
|
|
|
|
|
|
fn memmove() {
|
|
|
|
|
|
|
|
let mut bpf = Ebpf::load(crate::MEMMOVE_TEST).unwrap();
|
|
|
|
|
|
|
|
let prog: &mut Xdp = bpf.program_mut("do_dnat").unwrap().try_into().unwrap();
|
|
|
|
|
|
|
|
prog.load().unwrap();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[test_log::test]
|
|
|
|
#[test_log::test]
|
|
|
|
fn multiple_btf_maps() {
|
|
|
|
fn multiple_btf_maps() {
|
|
|
|
let mut bpf = Ebpf::load(crate::MULTIMAP_BTF).unwrap();
|
|
|
|
let mut bpf = Ebpf::load(crate::MULTIMAP_BTF).unwrap();
|
|
|
@ -240,15 +247,6 @@ fn unload_kprobe() {
|
|
|
|
assert_unloaded("test_kprobe");
|
|
|
|
assert_unloaded("test_kprobe");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#[test_log::test]
|
|
|
|
|
|
|
|
fn memmove() {
|
|
|
|
|
|
|
|
let mut bpf = Ebpf::load(crate::MEMMOVE_TEST).unwrap();
|
|
|
|
|
|
|
|
let prog: &mut Xdp = bpf.program_mut("do_dnat").unwrap().try_into().unwrap();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
prog.load().unwrap();
|
|
|
|
|
|
|
|
assert_loaded("do_dnat");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#[test_log::test]
|
|
|
|
#[test_log::test]
|
|
|
|
fn basic_tracepoint() {
|
|
|
|
fn basic_tracepoint() {
|
|
|
|
let mut bpf = Ebpf::load(crate::TEST).unwrap();
|
|
|
|
let mut bpf = Ebpf::load(crate::TEST).unwrap();
|
|
|
|