Fixup the issue where lcov capture fails due to a long path#4341
Fixup the issue where lcov capture fails due to a long path#4341chunfuwen merged 1 commit intoavocado-framework:masterfrom
Conversation
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a critical issue preventing lcov from successfully capturing coverage data. The problem stemmed from the generation of overly long file paths for coverage output, which caused the lcov command to fail. The solution involves strategically relocating the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
The pull request modifies the postprocess function in virttest/env_process.py to change the creation location of QEMU and libvirt coverage directories (gcov_qemu and gcov_libvirt) from test.debugdir to test_results_dir (one level up from test.debugdir) to avoid long path issues. However, the review comments highlight a critical issue where the change in the current working directory (os.chdir) during compression causes the newly created archives to be placed inside the coverage directories, leading to their immediate deletion when shutil.rmtree is called on those directories.
03104f6 to
f80834c
Compare
8a43d44 to
c2e1d6b
Compare
The full test case name is longer than before. The lcov output file was created in test_result/test_debugdir, which caused the lcov command to fail. Moving the file to test_result to avoid this issue. Add "extra_opts" to collect_lcov_coverage() to accept extra lcov command options. Signed-off-by: Yingshun Cui <yicui@redhat.com>
The full test case name is longer than before. The lcov output
file was created in test_result/test_debugdir, which caused the
lcov command to fail. Moving the file to test_result to avoid this
issue.
Add "extra_opts" to collect_lcov_coverage() to accept extra lcov
command options.
Test result:
lcov tracefiles: