Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideRefines FFI memory test cleanup by safely removing large temporary files only when found, simplifying podman exec usage, and ensuring the ffi-asil container is explicitly removed on test exit before running the common disk cleanup routine. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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 enhances the test suite's cleanup mechanisms, particularly for FFI memory tests. It introduces a dedicated function to ensure the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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. Footnotes
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
disk_cleanup, consider usingfind ... -delete(e.g.,find /var/qm -size +2G -delete) instead of capturing paths into a variable and passing them tormto avoid word-splitting issues and potential argument list overflows. - For consistency with the rest of the script and to preserve unified logging/error handling, you might want to run
podman rm -f ffi-asilthroughexec_cmdinsidememory_disk_cleanupinstead of callingpodmandirectly.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `disk_cleanup`, consider using `find ... -delete` (e.g., `find /var/qm -size +2G -delete`) instead of capturing paths into a variable and passing them to `rm` to avoid word-splitting issues and potential argument list overflows.
- For consistency with the rest of the script and to preserve unified logging/error handling, you might want to run `podman rm -f ffi-asil` through `exec_cmd` inside `memory_disk_cleanup` instead of calling `podman` directly.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request significantly improves the cleanup procedures for FFI tests. The changes enhance robustness by preventing rm commands from being executed with empty file lists, which could lead to errors or unexpected behavior. Additionally, interactive flags have been removed from podman exec commands, making them more suitable for automated test environments. A dedicated cleanup trap has also been introduced for memory tests, ensuring specific containers are removed to free resources effectively.
|
Hi @dougsland , @Yarboa , could you help to review this PR, thanks. |
|
|
||
| trap disk_cleanup EXIT | ||
| # Remove ffi-asil to free host RAM, then do disk_cleanup | ||
| memory_disk_cleanup() { |
There was a problem hiding this comment.
Consider moving this to prepare and call it with ARGs
Could be used for other tests
memory_cleanup container_name=ffi-asil disk_cleanup
There was a problem hiding this comment.
Hi @Yarboa , it's a good suggestion, thank you.
Done.
Signed-off-by: pengshanyu <yupengshan@hotmail.com>
8718fec to
9c572f6
Compare
The changes include:
ffi-asilafter test;Resolve: #970
Summary by Sourcery
Tighten FFI test cleanup to more safely remove large temporary files and ensure memory is freed after memory tests.
Bug Fixes:
Enhancements: