-
Notifications
You must be signed in to change notification settings - Fork 3.4k
CI: fix broken BPF complexity tests #29510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Egress Gateway only supports IPv4 so enabling it on IPv6-only tests doesn't make a lot of sense. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
/ci-verifier |
…heck Compiling the BPF complexity tests currently bails out in tail_nodeport_nat_egress_ipv4 and tail_nodeport_nat_egress_ipv6. The error for the v4 case is the following: ; return map_lookup_elem(map, tuple); 169: (18) r1 = 0xffff9dfb4d0f9800 ; R1_w=map_ptr(off=0,ks=14,vs=40,imm=0) 171: (85) call bpf_map_lookup_elem#1 172: (bf) r5 = r0 173: (07) r5 += 32 R5 pointer arithmetic on map_value_or_null prohibited, null-check it first The problem is easier to spot when looking at the disassembly of the function: ; return map_lookup_elem(map, tuple); 169: r1 = 0x0 ll 171: call 0x1 172: r5 = r0 173: r5 += 0x20 174: r3 = r0 175: r3 += 0x24 ; if (*state) 176: if r0 != 0x0 goto +0x6da <LBB9_167> It seems like clang has decided that it can hoist the address calculation based on r0 before checking that r0 != 0. Work around this issue by inserting a barrier_data() call. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
TestVerifier is accidentally reusing the result of previous subtest compilations. This means that only the first set of configurations was tested. Invoke clean for every new compilation. The generated object files are moved to the test directory to make them accessible as artifacts from CI. Fixes: d3ef5b2 ("test/verifier: Avoid pruning object files before testing the next file") Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Include the command invoked to compile the BPF and the output of the command in the test output by default. Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
53ee2a3
to
1edeb5d
Compare
/test |
This might need a manual backport to v1.14, I think that reverting the offending commit is probably the best option. |
christarazi
approved these changes
Nov 30, 2023
This was referenced Nov 30, 2023
nbusseneau
approved these changes
Nov 30, 2023
dylandreimerink
approved these changes
Dec 1, 2023
@lmb If it affects v1.14, shouldn't we backport there? |
Yes, I'll do that once this is in |
@lmb I was referring to the labels :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects/v1.14
This issue affects v1.14 branch
area/CI
Continuous Integration testing issue or flake
area/loader
Impacts the loading of BPF programs into the kernel.
backport/author
The backport will be carried out by the author of the PR.
backport-done/1.14
The backport for Cilium 1.14.x for this PR is done.
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/misc
This PR makes changes that have no direct user impact.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
complexity-tests: remove Egress Gateway from IPv6-only tests
bpf: prevent clang from reordering address calculations before NULL check
test/verifier: fix complexity tests not being recompiled
test/verifier: improve log output