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

Add scsi device case #5085

Merged
merged 1 commit into from
Oct 31, 2023
Merged

Conversation

chunfuwen
Copy link
Contributor

@chunfuwen chunfuwen commented Aug 4, 2023

Add more scsi device case

xx-186123: [SCSI] Hot-plug the same scsi device to two guests with shareable element
xx-145209: [scsi] Check the qemu-pr-helper process can be restarted when vm issue pr cmds
xx-98980:  [scsi] [negative] Generate duplicated addresses for scsi devices -- bug 1210587 (fixe

@chunfuwen chunfuwen changed the title Add one scsi device case Add two scsi device case Aug 15, 2023
@chunfuwen
Copy link
Contributor Author

chunfuwen commented Aug 15, 2023

cleaning libvirtd logs...
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
PASS 1-type_specific.io-github-autotest-libvirt.scsi_device_manipulate.coldplug.scsi_hostdev.positive.qemu_pr_helper

Command 'virsh list' finished with 0 after 0.026136258s
cleaning libvirtd logs...
DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
PASS 1-type_specific.io-github-autotest-libvirt.scsi_device_manipulate.hotplug.scsi_hostdev.positive.shared_by_two_guests

DATA (filename=output.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stdout.expected) => NOT FOUND (data sources: variant, test, file)
DATA (filename=stderr.expected) => NOT FOUND (data sources: variant, test, file)
PASS 1-type_specific.io-github-autotest-libvirt.scsi_device_manipulate.coldplug.scsi_hostdev.negative.duplicated_addresses_generate

@chunfuwen chunfuwen force-pushed the add_scsi_device_cases branch 4 times, most recently from ee1f6cc to c5fffff Compare August 21, 2023 08:49
@chunfuwen chunfuwen changed the title Add two scsi device case Add scsi device case Aug 21, 2023
@@ -2,6 +2,7 @@
type = scsi_device
status_error = "no"
start_vm = "no"
vms = avocado-vt-vm1 vm1
Copy link
Contributor

Choose a reason for hiding this comment

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

Ususally we config vm names in our local CI job definition instead of here.

For example, you can change it in shared/cfg/base.cfg or this cfg file
In shared/cfg/base.cfg, there is the definition which we use to configure the vms names

# List of virtual machine object names (whitespace separated)
vms = avocado-vt-vm1

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove vms parameter, and enable it in local CI

vm_names = params.get("vms").split()
for vm_name in vm_names:
vm_output = virsh.dumpxml(vm_name).stdout_text
if 'shareable' not in vm_output:
Copy link
Contributor

Choose a reason for hiding this comment

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

This is to match 'shareable' word in the whole vm xml. How about using more acurate searching by xpath, like using check_guest_xml_by_xpaths() in utils_libvirt/libvirt_vmxml.py ?

Copy link
Contributor Author

@chunfuwen chunfuwen Oct 16, 2023

Choose a reason for hiding this comment

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

updated with getting object attribute method

Copy link
Contributor

@dzhengfy dzhengfy left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@cliping cliping left a comment

Choose a reason for hiding this comment

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

Others LGTM

ignore_status=False)


def check_hostdev_shareable_attr(test, params, env):
Copy link
Contributor

Choose a reason for hiding this comment

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

There is no 'env' parameter to this function.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

test.fail("VM: % failed to find shareable attribute in output: %s" % (vm_name, str(hostdev_xml)))


def test_coldplug_scsi_hostdev_qemu_pr_helper(test, params, env):
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

xx-186123: [SCSI] Hot-plug the same scsi device to two guests with shareable element
xx-145209: [scsi] Check the qemu-pr-helper process can be restarted when vm issue pr cmds
xx-98980:  [scsi] [negative] Generate duplicated addresses for scsi devices -- bug 1210587 (fixed)

Signed-off-by: chunfuwen <[email protected]>
@chunfuwen chunfuwen merged commit c7c091a into autotest:master Oct 31, 2023
5 checks passed
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.

3 participants