From cfc246c80d4b753402f8d8e0806345a554b21bf6 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 8 Oct 2025 05:57:17 +0530 Subject: [PATCH] Add explanation notes to failing conditionals tests --- tests/failing_tests/conditionals/helper_cond.py | 5 +++++ tests/failing_tests/conditionals/struct_ptr.py | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/failing_tests/conditionals/helper_cond.py b/tests/failing_tests/conditionals/helper_cond.py index fb13e3a..32473c3 100644 --- a/tests/failing_tests/conditionals/helper_cond.py +++ b/tests/failing_tests/conditionals/helper_cond.py @@ -2,6 +2,11 @@ from pythonbpf import bpf, map, section, bpfglobal from ctypes import c_void_p, c_int64, c_uint64 from pythonbpf.maps import HashMap +# NOTE: Decided against fixing this +# as a workaround is assigning the result of lookup to a variable +# and then using that variable in the if statement. +# Might fix in future. + @bpf @map diff --git a/tests/failing_tests/conditionals/struct_ptr.py b/tests/failing_tests/conditionals/struct_ptr.py index baee3a8..7085f81 100644 --- a/tests/failing_tests/conditionals/struct_ptr.py +++ b/tests/failing_tests/conditionals/struct_ptr.py @@ -1,6 +1,11 @@ from pythonbpf import bpf, struct, section, bpfglobal, compile from ctypes import c_void_p, c_int64, c_uint64 +# NOTE: Decided against fixing this +# as one workaround is to just check any field of the struct +# in the if statement. Ugly but works. +# Might fix in future. + @bpf @struct