mirror of
https://github.com/varun-r-mallya/Python-BPF.git
synced 2026-12-06 18:08:36 +00:00
Ported faithfully from test_perf_skip.c, which reads the sampled instruction pointer out of a perf_event context: ctx.regs.ip. That is two levels of struct field access and PythonBPF supports one, so this lands as a strict expected failure describing the gap. _allocate_for_attribute in allocation_pass.py declines to allocate unless the attribute's base is a plain Name, so the nested form is skipped. One level on the same context works today -- ctx.sample_period compiles and llc's fine. Worth noting for whoever picks this up: the failure surfaces as 'SyntaxError: Undefined variable actual', naming the assignment target rather than the nested access responsible. The allocation pass declines quietly and the expression pass then trips over the missing symbol. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
41 lines
2.5 KiB
TOML
41 lines
2.5 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 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_ptr.py" = {reason = "Struct pointer used directly as boolean condition not supported", level = "ir"}
|
|
|
|
# Compiles cleanly; rejected by the kernel. The `data + 34 < data_end` guard is
|
|
# emitted as a signed compare over values round-tripped through the stack, so the
|
|
# verifier never narrows the packet range (it stays r=0) and the later
|
|
# `iph.saddr` read fails with "invalid access to packet, off=26 size=4" /
|
|
# "R1 offset is outside of the packet". Direct packet access needs bounds checks
|
|
# in a form the verifier can follow.
|
|
"failing_tests/xdp/xdp_test_1.py" = {reason = "XDP direct packet access: the data/data_end guard does not establish a packet range the verifier can use", level = "verifier"}
|
|
|
|
"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/vmlinux/assignment_handling.py" = {reason = "Assigning vmlinux enum value (XDP_PASS) to a local variable not yet supported", level = "ir"}
|
|
|
|
"failing_tests/xdp_pass.py" = {reason = "XDP program using vmlinux structs (struct_xdp_md) and complex map/struct interaction not yet supported", level = "ir"}
|
|
|
|
"kernel_selftest_equivalent/maps/array_map_lookup_update.py" = {reason = "ArrayMap / BPF_MAP_TYPE_ARRAY support is planned but not implemented yet", 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"}
|