Skip to content

Commit

Permalink
fixup! Test execution of projects
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Oct 13, 2024
1 parent a1cb382 commit 0c96d08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ case "${PROG_TYPE}" in
ADDITIONAL_ARGS=(-d fn_name=try_to_wake_up)
;;
"kprobe"|"kretprobe")
ADDITIONAL_ARGS=(-d kprobe=test)
ADDITIONAL_ARGS=(-d kprobe=do_unlinkat)
;;
"lsm")
ADDITIONAL_ARGS=(-d lsm_hook=file_open)
Expand Down
4 changes: 2 additions & 2 deletions {{project-name}}-ebpf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use aya_ebpf::{macros::kprobe, programs::ProbeContext};
use aya_log_ebpf::info;

#[kprobe]
#[kprobe(function = "{{kprobe}}")]
pub fn {{crate_name}}(ctx: ProbeContext) -> u32 {
match try_{{crate_name}}(ctx) {
Ok(ret) => ret,
Expand All @@ -21,7 +21,7 @@ fn try_{{crate_name}}(ctx: ProbeContext) -> Result<u32, u32> {
use aya_ebpf::{macros::kretprobe, programs::RetProbeContext};
use aya_log_ebpf::info;

#[kretprobe]
#[kretprobe(function = "{{kprobe}}")]
pub fn {{crate_name}}(ctx: RetProbeContext) -> u32 {
match try_{{crate_name}}(ctx) {
Ok(ret) => ret,
Expand Down

0 comments on commit 0c96d08

Please sign in to comment.