mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2025-12-31 21:06:25 +00:00
Fix recursive binops, move failing binops to passing
This commit is contained in:
19
tests/passing_tests/binops.py
Normal file
19
tests/passing_tests/binops.py
Normal file
@ -0,0 +1,19 @@
|
||||
from pythonbpf import compile, bpf, section, bpfglobal
|
||||
from ctypes import c_void_p, c_int64
|
||||
|
||||
|
||||
@bpf
|
||||
@section("tracepoint/syscalls/sys_enter_sync")
|
||||
def sometag(ctx: c_void_p) -> c_int64:
|
||||
a = 1 + 2 + 1
|
||||
print(f"{a}")
|
||||
return c_int64(0)
|
||||
|
||||
|
||||
@bpf
|
||||
@bpfglobal
|
||||
def LICENSE() -> str:
|
||||
return "GPL"
|
||||
|
||||
|
||||
compile()
|
||||
Reference in New Issue
Block a user