test/integration-ebpf: added integration tests for kretprobe & uretprobe

Added integration test methods for kretprobe and uretprobe with their
appropriate contexts.
pull/935/merge
tyrone-wu 8 months ago committed by Alessandro Decina
parent b84ede10b9
commit 6988dac159

@ -3,8 +3,8 @@
use aya_ebpf::{
bindings::xdp_action,
macros::{kprobe, tracepoint, uprobe, xdp},
programs::{ProbeContext, TracePointContext, XdpContext},
macros::{kprobe, kretprobe, tracepoint, uprobe, uretprobe, xdp},
programs::{ProbeContext, RetProbeContext, TracePointContext, XdpContext},
};
#[xdp]
@ -24,6 +24,11 @@ pub fn test_kprobe(_ctx: ProbeContext) -> u32 {
0
}
#[kretprobe]
pub fn test_kretprobe(_ctx: RetProbeContext) -> u32 {
0
}
#[tracepoint]
pub fn test_tracepoint(_ctx: TracePointContext) -> u32 {
0
@ -34,6 +39,11 @@ pub fn test_uprobe(_ctx: ProbeContext) -> u32 {
0
}
#[uretprobe]
pub fn test_uretprobe(_ctx: RetProbeContext) -> u32 {
0
}
#[cfg(not(test))]
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {

Loading…
Cancel
Save