Skip to content

ebpf unit testing -- lxc tests#17245

Closed
xinyuanzzz wants to merge 1 commit intocilium:masterfrom
xinyuanzzz:lxc-tests
Closed

ebpf unit testing -- lxc tests#17245
xinyuanzzz wants to merge 1 commit intocilium:masterfrom
xinyuanzzz:lxc-tests

Conversation

@xinyuanzzz
Copy link
Copy Markdown
Contributor

This PR adds tests for bpf_lxc.c. The first commit contains a test on handle_ipv4_from_lxc, and I am going to wrtite tests for the other functions in the next commits. The test covers nearly every line of the function.

Signed-off-by: Xinyuan Zhang zhangxinyuan@google.com

@xinyuanzzz xinyuanzzz requested a review from a team August 25, 2021 21:34
@xinyuanzzz xinyuanzzz requested a review from a team as a code owner August 25, 2021 21:34
@xinyuanzzz xinyuanzzz requested review from jrfastab and kkourt August 25, 2021 21:34
@xinyuanzzz xinyuanzzz force-pushed the lxc-tests branch 3 times, most recently from e6722c2 to c9570ce Compare September 2, 2021 23:24
This commit adds a thorough test on handle_ipv4_from_lxc based on our ebpf
unit testing framework.

Signed-off-by: Xinyuan Zhang <zhangxinyuan@google.com>
@kkourt
Copy link
Copy Markdown
Contributor

kkourt commented Sep 16, 2021

The approach in this PR is similar to #17227, were an alternative approach is investigated. Moving this PR into draft mode until the investigation concludes.

@kkourt kkourt marked this pull request as draft September 16, 2021 07:30
@brb
Copy link
Copy Markdown
Member

brb commented Jul 4, 2022

We recently added the BPF unit testing framework - https://docs.cilium.io/en/latest/contributing/testing/bpf/. The proposed mocking no longer is needed.

@brb brb closed this Jul 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dont-merge/needs-release-note-label The author needs to describe the release impact of these changes.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants