ebpf unit testing -- snat_v4_process test#17147
Closed
xinyuanzzz wants to merge 1 commit intocilium:masterfrom
Closed
ebpf unit testing -- snat_v4_process test#17147xinyuanzzz wants to merge 1 commit intocilium:masterfrom
xinyuanzzz wants to merge 1 commit intocilium:masterfrom
Conversation
60ccd96 to
0006073
Compare
0c6f00b to
dfb3ddf
Compare
jrfastab
reviewed
Aug 30, 2021
b96a4fb to
a01c72a
Compare
Weil0ng
reviewed
Sep 3, 2021
Contributor
Weil0ng
left a comment
There was a problem hiding this comment.
Thanks Xinyuan! Left a minor comment.
7dd7ec5 to
9f61f9f
Compare
Weil0ng
reviewed
Sep 3, 2021
9f61f9f to
c50bca3
Compare
Contributor
|
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 NameFailure OutputIf it is a flake, comment Job 'Cilium-PR-K8s-1.16-net-next' hit: #17176 (89.57% similarity) |
This was referenced Sep 3, 2021
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
Contributor
|
test-me-please |
Contributor
Author
Member
|
@xinyuannn I think this PR would benefit from #17227 (comment) too. Moving to draft until resolved. |
Member
|
We recently added the BPF unit testing framework - https://docs.cilium.io/en/latest/contributing/testing/bpf/. The proposed mocking no longer is needed. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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