You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/test/integration-test/src/tests/ksyms.rs

15 lines
391 B
Rust

use aya::{
Btf, Ebpf,
programs::{BtfTracePoint, TracePoint, Xdp},
};
use test_log::test;
#[test]
fn test_ksyms_c() {
let mut ebpf = Ebpf::load(crate::KSYMS).unwrap();
let prog: &mut BtfTracePoint = ebpf.program_mut("sys_enter").unwrap().try_into().unwrap();
let btf = Btf::from_sys_fs().unwrap();
prog.load("sys_enter", &btf).unwrap();
prog.attach().unwrap();
}