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:
929fe14
)
Add a test for broken nested union clang parsing
author
Brenden Blanco
<bblanco@plumgrid.com>
Mon, 2 May 2016 04:27:19 +0000
(21:27 -0700)
committer
Brenden Blanco
<bblanco@plumgrid.com>
Mon, 2 May 2016 04:27:19 +0000
(21:27 -0700)
tests/python/test_clang.py
patch
|
blob
|
history
diff --git
a/tests/python/test_clang.py
b/tests/python/test_clang.py
index
ae19519
..
214ffaa
100755
(executable)
--- a/
tests/python/test_clang.py
+++ b/
tests/python/test_clang.py
@@
-320,5
+320,13
@@
BPF_TABLE("array", int, union emptyu, t3, 1);
with self.assertRaises(Exception):
b = BPF(text="""int failure(void *ctx) { if (); return 0; }""")
+ def test_nested_union(self):
+ text = """
+BPF_TABLE("hash", struct bpf_tunnel_key, int, t1, 1);
+"""
+ b = BPF(text=text)
+ t1 = b["t1"]
+ print(t1.Key().remote_ipv4)
+
if __name__ == "__main__":
main()