Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
05f60a83
Commit
05f60a83
authored
Sep 17, 2015
by
Brenden Blanco
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a better test case for nested probe reads
Signed-off-by:
Brenden Blanco
<
bblanco@plumgrid.com
>
parent
f22a1e09
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
tests/cc/test_clang.py
tests/cc/test_clang.py
+10
-2
No files found.
tests/cc/test_clang.py
View file @
05f60a83
...
...
@@ -180,12 +180,20 @@ static void print_file_name(struct file *file) {
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
=
"""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment