-
Notifications
You must be signed in to change notification settings - Fork 30
Added automation of Virsh commands #285
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: main
Are you sure you want to change the base?
Added automation of Virsh commands #285
Conversation
|
Please fix the checks |
smuppand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not aligned with the repository standards. Please review the contributions README and update accordingly.
| @@ -0,0 +1,44 @@ | |||
| #!/bin/bash | |||
|
|
|||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please avoid creating a custom folder with your username and sending the pull request.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have deleted the folder
381bdf3 to
9346e9d
Compare
|
Updated the PR with the requested changes. |
9346e9d to
4a8837d
Compare
This PR refactors the Virsh Commands into a modular suite of independent KVM test cases. Key Changes: Modular Architecture: Split the original script into 5 standalone test cases: Kvm-Setup: Defines and starts the VM. Kvm-Reboot: Verifies reboot functionality. Kvm-Suspend: Verifies suspend/pause functionality. Kvm-Resume: Verifies resume functionality. Kvm-UnDefine: Verifies destroy and undefine functionality. Common Library: Created kvm_common.sh to handle shared logic (define, start, clean, state checks) and reduce code duplication. Robust State Verification: Replaced simple exit code checks with a check_vm_state function that parses virsh domstate output to ensure the VM is actually in the expected state (e.g., "running", "paused", "shut off"). Independence: Each test script now manages its own lifecycle (Setup -> Test -> UnDefine), allowing them to be run individually or in any order. Reporting: Added .res file generation (PASS/FAIL) and LAVA-compatible .yaml metadata for automation integration. Signed-off-by: Rohan Dutta <rohadutt@qti.qualcomm.com>
4a8837d to
cc5c15c
Compare
This PR refactors the Virsh Commands into a modular suite of independent KVM test cases.
Key Changes:
Created kvm_common.sh to handle shared logic (define, start, clean, state checks) and reduce code duplication.
Robust State Verification: Replaced simple exit code checks with a check_vm_state function that parses virsh domstate output to ensure the VM is actually in the expected state (e.g., "running", "paused", "shut off").
Independence: Each test script now manages its own lifecycle (Setup -> Test -> Undefine), allowing them to be run individually or in any order.
Reporting: Added .res file generation (PASS/FAIL) and LAVA-compatible .yaml metadata for automation integration.