mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 01:48:35 +00:00
retype, helper_cond, direct_assign and globals had no xfail entry and have been passing at every level; their NOTE headers describe limits that have since been lifted, so they are rewritten. xdp_pass was an xfail only because it used the old count().lookup() spelling of a map call; in the current syntax it compiles. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
60 lines
4.2 KiB
TOML
60 lines
4.2 KiB
TOML
# test_config.toml
|
|
#
|
|
# [xfail] — tests expected to fail.
|
|
# key = path relative to tests/
|
|
# value = {reason = "...", level = "ir" | "llc" | "verifier"}
|
|
# level "ir" = fails during pythonbpf IR generation (exception or ERROR log)
|
|
# level "llc" = IR generates but llc rejects it
|
|
# level "verifier" = IR and llc both succeed, but the kernel verifier rejects it
|
|
# A verifier-level entry may add match = "..." : the rejection must contain
|
|
# that text, otherwise the test fails instead of counting as expected.
|
|
#
|
|
# A failure at one level implies failure at every later one, so the declared
|
|
# level marks that level and all later ones xfail.
|
|
#
|
|
|
|
[xfail]
|
|
|
|
"failing_tests/conditionals/struct_value.py" = {reason = "A struct value has no truth value (C rejects `if (s)`): a compile error naming the struct", level = "ir"}
|
|
|
|
"failing_tests/conditionals/oneline.py" = {reason = "A conditional expression used as a statement (`f() if c else g()`) is not lowered: a compile error rather than silently dropping both calls; write it as an if statement", level = "ir"}
|
|
|
|
"failing_tests/return_struct.py" = {reason = "Returning a struct value from an integer function is a type error (nothing to dereference to an integer)", level = "ir"}
|
|
|
|
"failing_tests/license.py" = {reason = "Missing LICENSE global produces IR that llc rejects — should be caught earlier with a clear error message", level = "llc"}
|
|
|
|
"failing_tests/undeclared_values.py" = {reason = "Undeclared variable used in f-string — should raise SyntaxError (correct behaviour, test documents it)", level = "ir"}
|
|
|
|
"failing_tests/vmlinux/args_test.py" = {reason = "struct_trace_event_raw_sys_enter args field access not supported", level = "ir"}
|
|
|
|
|
|
|
|
"failing_tests/globals_read_before_shadow.py" = {reason = "Reading a name above the assignment that makes it a local shadowing a global is UnboundLocalError in Python, and a compile error here", level = "ir"}
|
|
|
|
"failing_tests/globals_undeclared_name.py" = {reason = "`global x` naming something that is not a @bpfglobal is a compile error", level = "ir"}
|
|
|
|
"failing_tests/globals_bad_type.py" = {reason = "Non-integer-scalar globals are not supported in milestone 1 (NotImplementedError by design)", level = "ir"}
|
|
|
|
"failing_tests/globals_augassign_shadowing.py" = {reason = "`x += 1` on a global name without `global` binds a local and reads it unbound: UnboundLocalError in Python, a compile error here", level = "ir"}
|
|
|
|
"failing_tests/globals_parameter_and_global.py" = {reason = "A parameter may not be declared global (Python: name is parameter and global)", level = "ir"}
|
|
|
|
"failing_tests/loops/for_map_items.py" = {reason = "Loops iterate range() only: no sugar over bpf_for_each_map_elem() (a callback subprogram plus a way to capture outer locals) exists yet", level = "ir"}
|
|
|
|
"failing_tests/loops/break_outside_loop.py" = {reason = "`break` outside a loop is a SyntaxError in Python, and a compile error here", level = "ir"}
|
|
|
|
"failing_tests/loops/range_variable_step.py" = {reason = "range() step must be an integer literal: its sign decides the loop test", level = "ir"}
|
|
|
|
"failing_tests/loops/range_step_too_wide.py" = {reason = "range() step must fit the 64-bit counter: 2**64 truncates to 0 and never terminates", level = "ir"}
|
|
|
|
"kernel_selftest_equivalent/ringbuf/reserve_submit_discard.py" = {reason = "RingBuffer reserve/typed record/discard workflow is planned but not implemented yet", level = "ir"}
|
|
|
|
"kernel_selftest_equivalent/vmlinux/perf_skip.py" = {reason = "Nested struct field access (ctx.regs.ip) not supported; one level such as ctx.sample_period works", level = "ir"}
|
|
|
|
# Upstream is a negative fixture: reading xdp_md->egress_ifindex is only legal
|
|
# for programs loaded with expected_attach_type = BPF_XDP_DEVMAP, and the
|
|
# prog_tests driver asserts that a plain load *fails*. The kernel rejects it
|
|
# here with "invalid bpf_context access off=20 size=4", which is the pass
|
|
# condition upstream. PythonBPF has no way to set expected_attach_type yet.
|
|
"kernel_selftest_equivalent/vmlinux/xdp_devmap_helpers.py" = {reason = "Negative fixture: egress_ifindex needs expected_attach_type=BPF_XDP_DEVMAP, which cannot be set yet; the verifier rejection is upstream's pass condition", level = "verifier", match = "invalid bpf_context access"}
|