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

sriov: Add 3 cases #4073

Merged
merged 1 commit into from Apr 14, 2022
Merged

sriov: Add 3 cases #4073

merged 1 commit into from Apr 14, 2022

Conversation

Yingshun
Copy link
Contributor

@Yingshun Yingshun commented Mar 1, 2022

This PR adds below cases:
RHEL-288445: Hotplug hostdev interface with 'unassigned'
address type
RHEL-288444: Start vm with hostdev interface with 'unassigned'
address type
RHEL-134143: Hotplug hostdev interface with duplicate custom alias

Signed-off-by: Yingshun Cui yicui@redhat.com

depends on avocado-framework/avocado-vt#3362
Test results: 2 cases are failed due to a known BZ.

 (1/5) type_specific.io-github-autotest-libvirt.sriov.attach_hostdev.unassigned_address.hostdev_device.cold_plug: PASS (35.28 s)
 (2/5) type_specific.io-github-autotest-libvirt.sriov.attach_hostdev.unassigned_address.hostdev_device.hot_plug: FAIL: hostdev xml(address) comparison failed.Expected "{'type': 'unassigned'}",got "{'bus': '0x01', 'domain': '0x0000', 'function': '0x0', 'slot': '0x00', 'type': 'pci'}". (21.71 s)
 (3/5) type_specific.io-github-autotest-libvirt.sriov.attach_hostdev.unassigned_address.hostdev_interface.cold_plug: PASS (43.05 s)
 (4/5) type_specific.io-github-autotest-libvirt.sriov.attach_hostdev.unassigned_address.hostdev_interface.hot_plug: FAIL: hostdev xml(address) comparison failed.Expected "{'type': 'unassigned'}",got "{'bus': '0x01', 'domain': '0x0000', 'function': '0x0', 'slot': '0x00', 'type': 'pci'}". (22.34 s)
 (5/5) type_specific.io-github-autotest-libvirt.sriov.attach_hostdev.deplicate_cust_alias.hot_plug: PASS (40.60 s)
RESULTS    : PASS 3 | ERROR 0 | FAIL 2 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 164.73 s

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.

Others LGTM

:raise: TestFail if comparison fails
"""
vm_hostdev = vm_xml.VMXML.new_from_dumpxml(vm.name)\
.devices.by_device_tag(device_type)[0]
Copy link
Contributor

Choose a reason for hiding this comment

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

I am just wondering if [0] must be what you want? Shall we also consider multiple devices existing? If not, could we add prerequisite in docstring for special usage?

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 the docstring, seems we don't need multiple hostdev devices for now.

hostdev_dict = {'type': 'pci', 'address': {'attrs':{'type': 'unassigned'}}, 'mode': 'subsystem', 'managed': 'yes', 'source': {'untyped_address': %s}}
- hostdev_interface:
hostdev_iface_dict = {'managed': 'yes', 'hostdev_address': {'attrs': %s}, 'address': {'attrs':{'type': 'unassigned'}}}
- deplicate_cust_alias:
Copy link
Contributor

Choose a reason for hiding this comment

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

duplicate_cust_alias?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Thank you for pointing it out. Updated.

if p_iface:
test.fail("There should be no interface, but got %s." % p_iface)

def test_deplicate_cust_alias():
Copy link
Contributor

Choose a reason for hiding this comment

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

typo. test_duplicate_cust_alias

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.

This PR adds below cases:
   1. RHEL-288445: Hotplug hostdev interface with 'unassigned'
          address type
   2. RHEL-288444: Start vm with hostdev interface with 'unassigned'
          address type
   3. RHEL-134143: Hotplug hostdev interface with duplicate custom alias

Signed-off-by: Yingshun Cui <yicui@redhat.com>
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.

LGTM

@dzhengfy dzhengfy merged commit 9a2d9b4 into autotest:master Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depend on The PR has dependency on other PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants