Skip to content

tests: fail the percpu instance by its id, prove the dispatch reaches the receiving CPU - #764

Merged
lneto merged 2 commits into
masterfrom
claude_percpu_tests
Sep 3, 2026
Merged

lneto merged 2 commits into
masterfrom
claude_percpu_tests

Conversation

@lneto

@lneto lneto commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Two tests that stand on their own against master, split out of #762.

tests/runtime/percpu_fail counted its runs in _ENV, and the plain run at the end of the test left the counter at 1: on the next run of the suite the error fired on the first instance, so the rollback assertion covered the rollback of nothing. Keying the failure on lunatik.cpu() == 1 needs no state, and the plain run passes because a plain runtime has no id.

tests/xdp gains a case proving the callback of a percpu script runs on the instance of the receiving CPU. The drop case shows a percpu script is dispatched, not which instance takes the packet: a dispatch that always picked instance 0 would pass it. The ping is pinned to the last online CPU, where the veth runs the receive softirq, and the callback must report that CPU as its instance id and no other; only ICMPv4 counts, since the namespace emits IPv6 autoconf traffic from a context the test does not pin. Skipped on a single CPU. Validated by pinning the dispatch to instance 0 and watching it fail.

Tested on 6.8.0-136 (aarch64): runtime 17/17, xdp 6/6, clean dmesg.

🤖 Generated with Claude Code

The failing script counted its runs in _ENV, and the plain run at the
end of the test left the counter at 1: on the next run of the suite the
error fired on the first instance, so the rollback assertion covered
the rollback of nothing. Keying the failure on lunatik.cpu() == 1 needs
no state, and the plain run passes because a plain runtime has no id.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@lneto
lneto force-pushed the claude_percpu_tests branch from 0721b6f to 0fe50fe Compare September 3, 2026 12:46
The drop case shows a percpu script is dispatched, not which instance
takes the packet: a dispatch that always picked instance 0 would pass
it. Pin the ping to the last online CPU, where the veth runs the
receive softirq, and check the callback reports that CPU as its
instance id and no other.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KwNvkpyMhVjn5B8pJBViW5
@lneto
lneto force-pushed the claude_percpu_tests branch from 0fe50fe to 5dd79a1 Compare September 3, 2026 14:23
@lneto
lneto merged commit 95477e7 into master Sep 3, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant