Skip to content

Commit fd2412e

Browse files
r41k0uclaude
andcommitted
Tests: Declare xdp_test_1 as a verifier-level expected failure
It generates IR and compiles, and the CO-RE relocations against struct xdp_md resolve correctly, so it must keep passing levels 1 and 2. The kernel rejects it: 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 and the later iph.saddr read fails with invalid access to packet, off=26 size=4, R1(id=0,off=26,r=0) R1 offset is outside of the packet Direct packet access needs bounds checks in a form the verifier can follow. strict = True, so this flags up if that ever lands. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent d66b468 commit fd2412e

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

tests/test_config.toml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,27 @@
22
#
33
# [xfail] — tests expected to fail.
44
# key = path relative to tests/
5-
# value = {reason = "...", level = "ir" | "llc"}
6-
# level "ir" = fails during pythonbpf IR generation (exception or ERROR log)
7-
# level "llc" = IR generates but llc rejects it
5+
# value = {reason = "...", level = "ir" | "llc" | "verifier"}
6+
# level "ir" = fails during pythonbpf IR generation (exception or ERROR log)
7+
# level "llc" = IR generates but llc rejects it
8+
# level "verifier" = IR and llc both succeed, but the kernel verifier rejects it
9+
#
10+
# A failure at one level implies failure at every later one, so the declared
11+
# level marks that level and all later ones xfail.
812
#
913

1014
[xfail]
1115

1216
"failing_tests/conditionals/struct_ptr.py" = {reason = "Struct pointer used directly as boolean condition not supported", level = "ir"}
1317

18+
# Compiles cleanly; rejected by the kernel. The `data + 34 < data_end` guard is
19+
# emitted as a signed compare over values round-tripped through the stack, so the
20+
# verifier never narrows the packet range (it stays r=0) and the later
21+
# `iph.saddr` read fails with "invalid access to packet, off=26 size=4" /
22+
# "R1 offset is outside of the packet". Direct packet access needs bounds checks
23+
# in a form the verifier can follow.
24+
"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"}
25+
1426
"failing_tests/license.py" = {reason = "Missing LICENSE global produces IR that llc rejects — should be caught earlier with a clear error message", level = "llc"}
1527

1628
"failing_tests/undeclared_values.py" = {reason = "Undeclared variable used in f-string — should raise SyntaxError (correct behaviour, test documents it)", level = "ir"}

0 commit comments

Comments
 (0)