-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
bpf: port verifier test to Go #24538
Conversation
e4cd070
to
6decf63
Compare
6decf63
to
e99f7b7
Compare
2606a7f
to
51e8017
Compare
/test |
24dfbb0
to
f972891
Compare
f972891
to
30f8bab
Compare
@aanm Thanks! Removed the commit and the label. New workflows ran successfully: https://github.com/cilium/cilium/actions/runs/4565504149?pr=24538. |
/test Job 'Cilium-PR-K8s-1.16-kernel-4.19' failed: Click to show.Test Name
Failure Output
If it is a flake and a GitHub issue doesn't already exist to track it, comment |
As documented in the code, since we quadruple the buffer in the loop, the next step up from 4MiB is 16MiB, which would overshoot the limit of <5.2 kernels by one byte. I did not opt for doubling instead of quadrupling the buffer, since that means logs over 8MiB would also fail to load on kernels <5.2. Signed-off-by: Timo Beckers <timo@isovalent.com>
Before this patch, getCIKernelVersion would only be run if -ci-kernel-version was not specified, but on CI, it always is. This function also outputs the running kernel version to the test log. Make it so the function is always run, outputting the kernel version, and handle the flag parsing logic in the function as well. Signed-off-by: Timo Beckers <timo@isovalent.com>
This commit switches package test/verifier over from running verifier-test.sh to loading programs using Go natively. A few modifications are made to the CollectionSpec before loading: - Remove map pinning flags so each ELF gets its own copies of maps that would normally be shared across multiple ELFs by pinning them. - Run some probes over ProgramType/AttachType combinations to make sure we don't try to load cgroup programs on kernels that don't support specific attach types. verifier_test.go now tests bpf_sock as well. Also converted each line in bpf/complexity-tests/*/*.txt to run its own subtest so it's easier to spot which configuration in the list caused an error, and specific subtests can be run using go test -run=... Signed-off-by: Timo Beckers <timo@isovalent.com>
30f8bab
to
70bdb5a
Compare
/test |
I think this depends on #22754, which was not marked for backporting. Dropping the labels here until we decide what to do |
Only backporting af5d551 to v1.13 |
The verifier complexity test no longer uses the patched iproute2 tools since it was ported to Go, see cilium/cilium#24538 Signed-off-by: Tobias Klauser <tobias@cilium.io>
The verifier complexity test no longer uses the iproute2 tools since it was ported to Go, see cilium/cilium#24538 Signed-off-by: Tobias Klauser <tobias@cilium.io>
The verifier complexity test no longer uses the iproute2 tools since it was ported to Go, see cilium/cilium#24538 Signed-off-by: Tobias Klauser <tobias@cilium.io>
The verifier complexity test no longer uses the iproute2 tools since it was ported to Go, see cilium/cilium#24538 Signed-off-by: Tobias Klauser <tobias@cilium.io>
Supersedes #24526.
Description taken from the main commit:
Closes #24522