-
Notifications
You must be signed in to change notification settings - Fork 178
Virtual disk: add new test scenario of discard_granularity #6626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
WalkthroughTest config moved variant-specific error messages from a boundary-level to per-variant. Test code adds debug logging, fixes two scenario name typos, and makes boundary scenario handling version-aware for discard_granularity == '0'. Changes
Sequence Diagram(s)sequenceDiagram
participant Runner as Test Runner
participant Scenario as boundary_vm_start
participant LibvirtVer as libvirt_version
participant Checker as check_vm_dumpxml
Runner->>Scenario: invoke boundary_vm_start(params)
Scenario->>LibvirtVer: version_compare(11,7,0)?
alt discard_granularity == '0' and version >=11.7.0
Scenario-->>Scenario: expected_attribute = True
else discard_granularity == '0' and version <11.7.0
Scenario-->>Scenario: expected_attribute = False
else other values
Scenario-->>Scenario: expected_attribute = params.get(...) or default
end
Scenario->>Checker: check_vm_dumpxml(expected_attribute)
Checker->>Checker: retrieve actual discard_granularity
alt actual == expected
Checker-->>Runner: debug log "discard_granularity matches: <value>"
else mismatch
Checker-->>Runner: raise/report mismatch
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
🔇 Additional comments (3)
Comment |
VIRT-300203 - Define&&Start vm with //disk/blockio[@discard_granularity] boundary values Description: For discard_grabularity=0, from libvirt-11.7.0, it exists in vm dumpxml. Signed-off-by: Meina Li <[email protected]>
3a3e8d9 to
18fe5cd
Compare
Automate case:
VIRT-300203 - Define&&Start vm with //disk/blockio[@discard_granularity] boundary values
Description: For discard_grabularity=0, from libvirt-11.7.0, it exists in vm dumpxml.
Summary by CodeRabbit