From 5d9a29ee8ec5f412da990f6a5858b7c8c5f9e319 Mon Sep 17 00:00:00 2001 From: varun-r-mallya Date: Thu, 16 Oct 2025 18:22:25 +0530 Subject: [PATCH] format chore --- pythonbpf/vmlinux_parser/class_handler.py | 13 ++++++++----- tests/failing_tests/xdp_pass.py | 6 ++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/pythonbpf/vmlinux_parser/class_handler.py b/pythonbpf/vmlinux_parser/class_handler.py index 34cdf73..c940711 100644 --- a/pythonbpf/vmlinux_parser/class_handler.py +++ b/pythonbpf/vmlinux_parser/class_handler.py @@ -160,13 +160,18 @@ def process_vmlinux_post_ast( new_dep_node.set_field_ready(elem_name, True) elif handler.has_node(containing_type_name): # Already processed - logger.debug(f"Reusing already processed {containing_type_name}") + logger.debug( + f"Reusing already processed {containing_type_name}" + ) new_dep_node.set_field_ready(elem_name, True) else: # Process recursively - THIS WAS MISSING new_dep_node.add_dependent(containing_type_name) process_vmlinux_post_ast( - containing_type, llvm_handler, handler, processing_stack + containing_type, + llvm_handler, + handler, + processing_stack, ) new_dep_node.set_field_ready(elem_name, True) elif containing_type.__module__ == ctypes.__name__: @@ -185,9 +190,7 @@ def process_vmlinux_post_ast( process_vmlinux_post_ast( elem_type, llvm_handler, handler, processing_stack ) - new_dep_node.set_field_ready( - elem_name, True - ) + new_dep_node.set_field_ready(elem_name, True) else: raise ValueError( f"{elem_name} with type {elem_type} from module {module_name} not supported in recursive resolver" diff --git a/tests/failing_tests/xdp_pass.py b/tests/failing_tests/xdp_pass.py index a470278..1ab4eb2 100644 --- a/tests/failing_tests/xdp_pass.py +++ b/tests/failing_tests/xdp_pass.py @@ -2,13 +2,15 @@ from pythonbpf import bpf, map, section, bpfglobal, compile_to_ir from pythonbpf.maps import HashMap from pythonbpf.helper import XDP_PASS from vmlinux import TASK_COMM_LEN # noqa: F401 -# from vmlinux import struct_qspinlock_0_1 + +# from vmlinux import struct_qspinlock_0_1 # noqa: F401 # from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401 # from vmlinux import struct_posix_cputimers # noqa: F401 from vmlinux import struct_xdp_md + # from vmlinux import struct_trace_event_raw_sys_enter # noqa: F401 # from vmlinux import struct_ring_buffer_per_cpu # noqa: F401 -from vmlinux import struct_request +from vmlinux import struct_request # noqa: F401 from ctypes import c_int64 # Instructions to how to run this program