From 84edddb6850692e5025c3e7b3f943b63f6e1e8d4 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Sun, 23 Nov 2025 06:27:01 +0530 Subject: [PATCH] Fix passing test hash_map_struct to include char array test --- tests/passing_tests/hash_map_struct.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/passing_tests/hash_map_struct.py b/tests/passing_tests/hash_map_struct.py index 9f6cbac..4252dd0 100644 --- a/tests/passing_tests/hash_map_struct.py +++ b/tests/passing_tests/hash_map_struct.py @@ -1,6 +1,6 @@ from pythonbpf import bpf, section, struct, bpfglobal, compile, map from pythonbpf.maps import HashMap -from pythonbpf.helper import pid +from pythonbpf.helper import pid, comm from ctypes import c_void_p, c_int64 @@ -9,6 +9,7 @@ from ctypes import c_void_p, c_int64 class val_type: counter: c_int64 shizzle: c_int64 + comm: str(16) @bpf @@ -22,6 +23,7 @@ def last() -> HashMap: def hello_world(ctx: c_void_p) -> c_int64: obj = val_type() obj.counter, obj.shizzle = 42, 96 + comm(obj.comm) t = last.lookup(obj) if t: print(f"Found existing entry: counter={obj.counter}, pid={t}")