Conversation
Signed-off-by: pengshanyu <yupengshan@hotmail.com>
Reviewer's GuideAdds a readiness helper for nested podman exec in the ffi-qm container, improves robustness of the memory test by explicitly capturing the nested command’s exit code, and guards cleanup to only run nested podman rm when the qm container is actually running, along with minor shell formatting alignment. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Consider reusing or consolidating
running_container_in_qmandffi_qm_nested_ready, as they are both readiness checks forffi-qmand could share a single, clearer readiness helper. - In
ffi_qm_nested_ready, you might want to short-circuit when theqmcontainer is not running instead of waiting for the full timeout, reusing thepodman inspect qm --format '{{.State.Running}}'logic fromdisk_cleanup. - The indentation in
prepare.shis inconsistent (e.g., 3 vs 4 spaces in functions likeis_ostreeanddisk_cleanup); aligning these to a single convention will keep the script more readable.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider reusing or consolidating `running_container_in_qm` and `ffi_qm_nested_ready`, as they are both readiness checks for `ffi-qm` and could share a single, clearer readiness helper.
- In `ffi_qm_nested_ready`, you might want to short-circuit when the `qm` container is not running instead of waiting for the full timeout, reusing the `podman inspect qm --format '{{.State.Running}}'` logic from `disk_cleanup`.
- The indentation in `prepare.sh` is inconsistent (e.g., 3 vs 4 spaces in functions like `is_ostree` and `disk_cleanup`); aligning these to a single convention will keep the script more readable.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
Hi @Yarboa , @dougsland , could you help to review this PR, thanks. |
There was a problem hiding this comment.
Code Review
This pull request improves the robustness of the FFI test scripts by adding container status checks and implementing timeouts for waiting operations. Key changes include a check in disk_cleanup to verify if the qm container is running before execution, the addition of a ffi_qm_nested_ready function to wait for nested podman readiness, and updates to memory tests to safely capture exit codes. Feedback was provided to replace an infinite loop in running_container_in_qm with a timeout-based check to prevent potential hangs in CI environments.
| fi | ||
| } | ||
|
|
||
| running_container_in_qm() { |
There was a problem hiding this comment.
Consider using timeout here also,
It could wait forever
There was a problem hiding this comment.
Hi @Yarboa , it seems this continuous waiting is intentionally designed, because if ffi-qm does not start, the subsequent test is meaningless, and once the duration (defined in .fmf files) expires, it will terminate this infinite loop.
Changes:
ffi_qm_nested_readyResolve: #970
Summary by Sourcery
Improve ffi test reliability around nested podman execution and memory test handling.
New Features:
Bug Fixes:
Enhancements:
Tests: