Skip to content

Commit

Permalink
Merge pull request iovisor#228 from iovisor/bblanco_dev
Browse files Browse the repository at this point in the history
Add a better test case for nested probe reads
  • Loading branch information
4ast committed Sep 17, 2015
2 parents f22a1e0 + 05f60a8 commit 2e081aa
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/cc/test_clang.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,20 @@ def test_probe_read_helper(self):
const char *name = file->f_path.dentry->d_name.name;
bpf_trace_printk("%s\\n", name);
}
int trace_entry(struct pt_regs *ctx, struct file *file) {
static void print_file_name2(int unused, struct file *file) {
print_file_name(file);
}
int trace_entry1(struct pt_regs *ctx, struct file *file) {
print_file_name(file);
return 0;
}
int trace_entry2(struct pt_regs *ctx, int unused, struct file *file) {
print_file_name2(unused, file);
return 0;
}
""")
fn = b.load_func("trace_entry", BPF.KPROBE)
fn = b.load_func("trace_entry1", BPF.KPROBE)
fn = b.load_func("trace_entry2", BPF.KPROBE)

def test_probe_struct_assign(self):
b = BPF(text = """
Expand Down

0 comments on commit 2e081aa

Please sign in to comment.