-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ci: Don't handle xfrm concurrently in privileged test #32954
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
Conversation
23d3168
to
36509df
Compare
71cfa98
to
ff709dd
Compare
/ci-runtime |
After running ci-runtime for 10 times, I didn't see a single failure from github.com/cilium/cilium/pkg/datapath/linux/ipsec: https://github.com/cilium/cilium/actions/runs/9442804151 2 out 10 failed due to node_linux_test.go:TestNodeChurnXFRMLeaks, I'll open an issue for it. |
Golang runs testcases concurrently, the test code "list xfrm policies" followed by "delete policies" could fail because other goroutines from other testcases could delete the xfrm policies in between. We fix this issue by adding mutex for testcases that are handling xfrm. Fixes: #32902 Signed-off-by: gray <gray.liang@isovalent.com>
ff709dd
to
4c99df6
Compare
/test |
I'm pretty sure that testcases within a single package are not run in parallel, from https://pkg.go.dev/cmd/go#hdr-Testing_flags
Especially the last part "Note that -parallel only applies within a single test binary. And default for "-p":
That would indicate that I think the simplest solution would be to set |
We could execute the IPsec unit tests in separate test namespaces so that global state we create doesn't conflict in parallel runs. We do that in other privileged tests as well, see cilium/pkg/datapath/loader/xdp_test.go Line 144 in fd0b235
|
What's the status of this one? |
Closed as issue has been fixed. |
Golang runs testcases concurrently, the test code "list xfrm policies" followed by "delete policies" could fail because other goroutines from other testcases could delete the xfrm policies in between. We fix this issue by adding mutex for testcases that are handling xfrm.
The ci-runtime has run for 10 times and I didn't see a single failure from github.com/cilium/cilium/pkg/datapath/linux/ipsec: https://github.com/cilium/cilium/actions/runs/9442804151
Fixes: #32902