-
Notifications
You must be signed in to change notification settings - Fork 168
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
Virtual_disk: add new cases for disk driver discard_no_unref attribute #5649
Conversation
|
@@ -0,0 +1,42 @@ | |||
- virtual_disks.discard_no_unref: |
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.
can this share with https://github.com/autotest/tp-libvirt/blob/master/libvirt/tests/cfg/virtual_disks/virtual_disks_discard_granularity.cfg file, since they all address discard attribute
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.
They are different attributes. Discard_no_unref is a driver attribute which is in "". But discard_granularity is a blockio attribute which is in "".
from provider.virtual_disk import disk_base | ||
|
||
|
||
def result_check(vm, params, test): |
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.
python method naming convention: verb + noun. ,So maybe change to check_result
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.
Updated.
9e69a8a
to
871576d
Compare
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.
lgtm
libvirt.check_logfile(check_libvirtd_log, libvirtd_log_file) | ||
test.log.info("Check read/write in guest.") | ||
session = vm.wait_for_login() | ||
session.cmd("mkfs.ext4 /dev/%s && mount /dev/%s /mnt" % (target_dev, target_dev)) |
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.
This test for disk IO in VM already has an utility function. Could you have a look at check_virtual_disk_io() in virttest/utils_libvirt/libvirt_disk.py
?
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.
This is an useful function. I've updated to use it.
Automate cases of discard_no_unref attribute: VIRT-301646 VIRT-301647 VIRT-301651 Signed-off-by: Meina Li <meili@redhat.com>
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.
LGTM
Automate cases of discard_no_unref attribute: VIRT-301646 VIRT-301647 VIRT-301651