-
Notifications
You must be signed in to change notification settings - Fork 3.4k
ebpf unit testing -- snat_v4_process test #17147
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
60ccd96
to
0006073
Compare
0c6f00b
to
dfb3ddf
Compare
b96a4fb
to
a01c72a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Xinyuan! Left a minor comment.
7dd7ec5
to
9f61f9f
Compare
9f61f9f
to
c50bca3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Xinyuan!
test-me-please Job 'Cilium-PR-K8s-GKE' failed and has not been observed before, so may be related to your PR: Click to show.Test Name
Failure Output
If it is a flake, comment Job 'Cilium-PR-K8s-1.16-net-next' hit: #17176 (89.57% similarity) |
This commit adds a thorough test on snat_v4_process based on our ebpf unit testing framework. Please note that the variables used in func test_snat_v4_process are defined globally to avoid a problem caused by CMock (issue:ThrowTheSwitch/CMock#364). Signed-off-by: Xinyuan Zhang <zhangxinyuan@google.com>
c50bca3
to
445ca78
Compare
test-me-please |
@xinyuannn I think this PR would benefit from #17227 (comment) too. Moving to draft until resolved. |
We recently added the BPF unit testing framework - https://docs.cilium.io/en/latest/contributing/testing/bpf/. The proposed mocking no longer is needed. |
As discussed with @brb, I wrote a thorough test on func snat_v4_process based on our ebpf unit testing framework #16862. The test covers every line of func snat_v4_process.
Signed-off-by: Xinyuan Zhang zhangxinyuan@google.com