projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8216464
)
skip include of kernel bpf.h in test, forward declare instead
author
Brenden Blanco
<bblanco@plumgrid.com>
Mon, 2 May 2016 04:24:29 +0000
(21:24 -0700)
committer
Brenden Blanco
<bblanco@plumgrid.com>
Mon, 2 May 2016 04:24:29 +0000
(21:24 -0700)
tests/python/test_histogram.py
patch
|
blob
|
history
diff --git
a/tests/python/test_histogram.py
b/tests/python/test_histogram.py
index
b76ab07
..
27425e0
100755
(executable)
--- a/
tests/python/test_histogram.py
+++ b/
tests/python/test_histogram.py
@@
-12,7
+12,7
@@
class TestHistogram(TestCase):
def test_simple(self):
b = BPF(text="""
#include <uapi/linux/ptrace.h>
-#include <linux/bpf.h>
+struct bpf_map;
BPF_HISTOGRAM(hist1);
BPF_HASH(stub);
int kprobe__htab_map_delete_elem(struct pt_regs *ctx, struct bpf_map *map, u64 *k) {
@@
-35,7
+35,7
@@
int kprobe__htab_map_delete_elem(struct pt_regs *ctx, struct bpf_map *map, u64 *
def test_struct(self):
b = BPF(text="""
#include <uapi/linux/ptrace.h>
-#include <linux/bpf.h>
+struct bpf_map;
typedef struct { void *map; u64 slot; } Key;
BPF_HISTOGRAM(hist1, Key, 1024);
BPF_HASH(stub1);