We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1cce49f commit 2de2809Copy full SHA for 2de2809
1 file changed
tests/passing_tests/conditionals/var.py
@@ -0,0 +1,22 @@
1
+from pythonbpf import bpf, section, bpfglobal, compile
2
+from ctypes import c_void_p, c_int64
3
+
4
5
+@bpf
6
+@section("tracepoint/syscalls/sys_enter_execve")
7
+def hello_world(ctx: c_void_p) -> c_int64:
8
+ x = 0
9
+ if x:
10
+ print("Hello, World!")
11
+ else:
12
+ print("Goodbye, World!")
13
+ return
14
15
16
17
+@bpfglobal
18
+def LICENSE() -> str:
19
+ return "GPL"
20
21
22
+compile()
0 commit comments