Skip to content

Commit bf9635e

Browse files
committed
Fix passing test hash_map_struct to include char array test
1 parent cbe365d commit bf9635e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/passing_tests/hash_map_struct.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pythonbpf import bpf, section, struct, bpfglobal, compile, map
22
from pythonbpf.maps import HashMap
3-
from pythonbpf.helper import pid
3+
from pythonbpf.helper import pid, comm
44
from ctypes import c_void_p, c_int64
55

66

@@ -9,6 +9,7 @@
99
class val_type:
1010
counter: c_int64
1111
shizzle: c_int64
12+
comm: str(16)
1213

1314

1415
@bpf
@@ -22,6 +23,7 @@ def last() -> HashMap:
2223
def hello_world(ctx: c_void_p) -> c_int64:
2324
obj = val_type()
2425
obj.counter, obj.shizzle = 42, 96
26+
comm(obj.comm)
2527
t = last.lookup(obj)
2628
if t:
2729
print(f"Found existing entry: counter={obj.counter}, pid={t}")

0 commit comments

Comments
 (0)