From 8aa9cf7119787a99d64ae60ee95ac562556b97a9 Mon Sep 17 00:00:00 2001 From: Pragyansh Chaturvedi Date: Wed, 8 Oct 2025 21:36:08 +0530 Subject: [PATCH] Add failing oneline IfExpr conditional test --- tests/failing_tests/conditionals/oneline.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tests/failing_tests/conditionals/oneline.py diff --git a/tests/failing_tests/conditionals/oneline.py b/tests/failing_tests/conditionals/oneline.py new file mode 100644 index 0000000..55cfa42 --- /dev/null +++ b/tests/failing_tests/conditionals/oneline.py @@ -0,0 +1,18 @@ +from pythonbpf import bpf, section, bpfglobal, compile +from ctypes import c_void_p, c_int64 + + +@bpf +@section("tracepoint/syscalls/sys_enter_execve") +def hello_world(ctx: c_void_p) -> c_int64: + print("Hello, World!") if True else print("Goodbye, World!") + return + + +@bpf +@bpfglobal +def LICENSE() -> str: + return "GPL" + + +compile()