[WIP]Introduce eBPF prog coverage
What type of PR is this?
/kind enhancement What this PR does / why we need it: Introduce eBPF prog coverage Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
Introduce a new flag `enable-bpf-coverage` to generate eBPF code coverage after Kmesh is exited
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please assign nlgwcy for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
How to generate coverage
(This is a temporary way to generate coverage, and will be optimized in future work)
- Copy all codes in
bpf/toKmesh-pod:/kmesh - Start Kmesh in pod with
--enable-bpf-coverage=trueat directory/kmesh/bpf/kmesh/workload - Run test cases
- Stop
kmesh-deamonprocess - The coverage HTML is at
Kmesh-pod:/kmesh/sockops-cov.html
Coverage HTML sample:
sockops-cov.zip
How to generate coverage
- Start Kmesh with
--enable-bpf-coverage=true- Copy all codes in
bpf/toKmesh-pod:/kmesh- Run test cases
- Get yourself into Kmesh-pod, then stop Kmesh
- The coverage HTML is at
Kmesh-pod:/kmesh/sockops-cov.html
can you introduct it at Thursday's community meeting?
How to generate coverage
- Start Kmesh with
--enable-bpf-coverage=true- Copy all codes in
bpf/toKmesh-pod:/kmesh- Run test cases
- Get yourself into Kmesh-pod, then stop Kmesh
- The coverage HTML is at
Kmesh-pod:/kmesh/sockops-cov.htmlcan you introduct it at Thursday's community meeting?
Sure
/retest
To be discussed:
- Do eBPF test: with Kmesh daemon running OR run the eBPF programs alone? -- do not depend on Kmesh start
- Integrate eBPF coverage with E2E Test? -- do not integrate with E2E
TODO: Integrade with summer-ospp UT framework project