Add libbpf-tool profile tests - #4598
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends the existing LibbpfToolsSuite with new test coverage for the bpf-profile tool (profiling, stack filtering, resource cleanup, and edge-case handling) to validate libbpf-tools functionality beyond basic install/binary execution checks.
Changes:
- Added helper methods to locate
bpf-profile, start a CPU workload, and clean it up. - Added multiple new
bpf-profiletest cases covering stack capture,-K/-Ufiltering, leak checks viabpftool, and edge cases. - (PR hygiene) The PR description is still the default template placeholders and should be filled in before approval.
fd62af5 to
d8fd1ba
Compare
d8fd1ba to
99b1043
Compare
99b1043 to
054bd87
Compare
054bd87 to
2b38bc0
Compare
2b38bc0 to
b45aaa1
Compare
b45aaa1 to
8bf986a
Compare
8bf986a to
823e13c
Compare
Signed-off-by: Mayank Singh <mayansingh@microsoft.com>
823e13c to
b145889
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 9 comments.
Comments suppressed due to low confidence (1)
lisa/microsoft/testsuites/bpf/libbpf_tools.py:411
139and-11are magic numbers here. Add an inline comment (or use a named constant) to clarify that these exit codes commonly map to SIGSEGV so the intent of this assertion stays clear.
).is_not_in(139, -11)
log.info("Target exit mid-profile handled gracefully")
|
@mayankfz
|
Yes @LiliDeng , the update package still needs to be released the changes are under review. So, that is why tested with the copying the package rpm locally as well. For now, it will get skipped if the tool is not present. Have mentioned the same in the description as well. Thanks. |
Thanks for the explanation. |
The current libbpf-tools package in the Azure Linux 3 repo (0.29.1-4) does not include the bpf-profile binary, it is being added in version 0.29.1-5, which is still under review. That is why the package installs successfully but the command is not found. The test handles this gracefully, it checks if bpf-profile is available and skips with a clear message if not. Once the updated package (0.29.1-5) is published to the repo, the test will pick it up automatically without any code changes. |


Description
Add libbpf-tool profile tests
Related Issue
Add libbpf-tool profile tests
Type of Change
Checklist
Test Validation
Key Test Cases:
Impacted LISA Features:
Tested Azure Marketplace Images:
Test Results