Skip to content
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

block_disk_not_default_options: creates new test case #4209

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mcasquer
Copy link
Contributor

@mcasquer mcasquer commented Nov 18, 2024

Depends on #4219

block_disk_not_default_options: creates new test case

Creates a new test case that boots up a VM with a disk
configured with non-common options such as packed or
page-per-vq. Unplug the disk and hotplugs it again.

Signed-off-by: Mario Casquero [email protected]
ID: 3007

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch 2 times, most recently from 66f362b to 8442610 Compare November 18, 2024 07:52
@mcasquer mcasquer marked this pull request as ready for review November 18, 2024 07:52
@mcasquer
Copy link
Contributor Author

Tests results

 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: STARTED
 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: PASS (68.59 s)
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: STARTED
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: PASS (166.62 s)
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: STARTED
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: PASS (69.51 s)
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: STARTED
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.q35: PASS (156.81 s)
RESULTS    : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch from 8442610 to 9817d33 Compare November 18, 2024 07:54
@mcasquer
Copy link
Contributor Author

@qingwangrh could you review this PR? Thanks !

remove_image_stg0 = yes
force_create_image_stg0 = yes
dd_cmd = "dd if=/dev/urandom of=test.txt bs=1M count=10"
virtio_blk:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is the non-default option comment test, it will evolve to cover other option test. so I suggest considering current test as one variant: example - with_packed_and_ppv

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cfg updated !

image_size_stg0 = 40G
remove_image_stg0 = yes
force_create_image_stg0 = yes
dd_cmd = "dd if=/dev/urandom of=test.txt bs=1M count=10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dd cmd should affect the disk with specified option.

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch 2 times, most recently from 2166cd8 to c955535 Compare November 19, 2024 08:46
session.cmd(params.get("dd_cmd"))

possible_types = {"virtio-blk-device", "virtio-scsi-device"}
verify_non_default_options("packed", possible_types)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can comes from cfg instead of hard code
qtree_check={k1:v1}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qtree verification implemented in cfg side, so the user can configure it to verify any option of a desired device

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch from c955535 to 1400868 Compare November 19, 2024 11:58
dd_cmd = "dd if=/dev/urandom of=test.txt bs=1M count=10"
variants:
- with_packed_and_ppv:
qtree_check = '{"packed" : ["virtio-blk-device", "virtio-scsi-device"], "page-per-vq" : ["virtio-blk-pci", "virtio-scsi-pci"]}'
Copy link
Contributor

@qingwangrh qingwangrh Nov 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. it can be evolved to support different image ,like as
    qtree_check_images=" stg0 stg1...."
    qtree_check_image_stg0='{"packed" : ["virtio-blk-device", "virtio-scsi-device"], "page-per-vq" : ["virtio-...
  2. where is the value definition ?example, I want to check the key1 value is "ABC"?

if qtree_check:
for key in qtree_check:
verify_non_default_options(key, qtree_check[key])
else:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The qtree_check is not mandatory, so I suggest changing it to warn message, otherwise, the case will be looked as failed case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@qingwangrh yeah I thought about that and changed it yesterday :) I will push the new changes asap

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch 2 times, most recently from 564547b to dea631d Compare November 21, 2024 12:33
@mcasquer
Copy link
Contributor Author

@qingwangrh now the qtree check should be fully implemented, still working on the dd cmd improvement

@mcasquer
Copy link
Contributor Author

 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (1/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (79.48 s)
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (2/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (149.51 s)
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (3/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (82.51 s)
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (4/4) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win11.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (152.04 s)
RESULTS    : PASS 4 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch from dea631d to cd1213e Compare November 26, 2024 13:41
@XueqiangWei
Copy link
Contributor

@mcasquer Please don't forget to add -S when pushing the patch. (I.E. commit signature)

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch from cd1213e to 5496417 Compare November 27, 2024 06:23
@mcasquer
Copy link
Contributor Author

@mcasquer Please don't forget to add -S when pushing the patch. (I.E. commit signature)

Sorry for that, it's been a one-time oversight 😅

@mcasquer
Copy link
Contributor Author

Once the dependent patch #4219 gets merged, CI should be green after rebase

@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch 2 times, most recently from c6db2da to e194141 Compare November 29, 2024 07:15
@mcasquer
Copy link
Contributor Author

After applying the dependent patch:
RHEL 9.6 guest with virtio_scsi + virtio_blk

 (1/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (1/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (113.15 s)
 (2/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (2/2) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (85.06 s)
RESULTS    : PASS 2 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Win10 guest with virtio_scsi

 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_scsi.up.virtio_net.Guest.Win10.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (197.42 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Win2025 guest with virtio_blk

 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win2025.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.Win2025.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (297.07 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

@mcasquer
Copy link
Contributor Author

mcasquer commented Dec 5, 2024

This is a kindly reminder, @qingwangrh please could you review again this PR? Thanks !

@mcasquer
Copy link
Contributor Author

mcasquer commented Dec 5, 2024

@yanan-fu @zhencliu @PaulYuuu could you also review this PR? Thanks !

@zhencliu
Copy link
Contributor

zhencliu commented Dec 5, 2024

Added @XueqiangWei

Creates a new test case that boots up a VM with a disk
configured with non-common options such as packed or
page-per-vq. Unplug the disk and hotplugs it again.

Signed-off-by: Mario Casquero <[email protected]>
@mcasquer mcasquer force-pushed the 3007_booting_hotplugging_disk_non_default_options branch from e194141 to bd82563 Compare December 10, 2024 10:45
@mcasquer
Copy link
Contributor Author

With last update on the provider:

 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: STARTED
 (1/1) Host_RHEL.m9.u6.ovmf.qcow2.virtio_blk.up.virtio_net.Guest.RHEL.9.6.0.x86_64.io-github-autotest-qemu.block_disk_not_default_options.with_packed_and_ppv.q35: PASS (79.80 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants