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
2e081aa6
Commit
2e081aa6
authored
Sep 17, 2015
by
4ast
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #228 from iovisor/bblanco_dev
Add a better test case for nested probe reads
parents
f22a1e09
05f60a83
Changes
1
Show 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 @
2e081aa6
...
@@ -180,12 +180,20 @@ static void print_file_name(struct file *file) {
...
@@ -180,12 +180,20 @@ static void print_file_name(struct file *file) {
const char *name = file->f_path.dentry->d_name.name;
const char *name = file->f_path.dentry->d_name.name;
bpf_trace_printk("%s
\
\
n", 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);
print_file_name(file);
return 0;
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
):
def
test_probe_struct_assign
(
self
):
b
=
BPF
(
text
=
"""
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