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 case for virt-xml-validate for virsh domcap #6080

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

Conversation

nanli1
Copy link
Contributor

@nanli1 nanli1 commented Dec 19, 2024

xxxx-17141:validate libvirt XML files against a virsh domcap schema

Signed-off-by: nanli [email protected]

avocado run --vt-type libvirt virt_xml_validate.domcapabilities
 (1/1) type_specific.io-github-autotest-libvirt.virt_xml_validate.domcapabilities: PASS (7.28 s)

Copy link
Contributor

@Yingshun Yingshun left a comment

Choose a reason for hiding this comment

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

Do you need to set the supported libvirt version for this case? It looks like a new change.

@nanli1
Copy link
Contributor Author

nanli1 commented Jan 22, 2025

Do you need to set the supported libvirt version for this case? It looks like a new change.

Thanks yingshun : D , Updated

@nanli1 nanli1 requested a review from Yingshun January 22, 2025 12:04
    xxxx-17141:validate libvirt XML files against a virsh domcap schema
Signed-off-by: nanli <[email protected]>
@nanli1 nanli1 force-pushed the add_case_for_virt_xml_validate_the_virsh_domcapabilities branch from 718d617 to 8866594 Compare January 24, 2025 09:22
@@ -230,6 +241,10 @@ def run(test, params, env):
secret_validate(test, secret_volume, file=output_path, **virsh_dargs)
elif schema == "interface":
interface_validate(test, file=output_path, **virsh_dargs)
elif schema == "domcapabilities":
libvirt_version.is_libvirt_feature_supported(params)
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you @nanli1 for adding version check! I'm thinking it'll be better if we could move version checking to the beginning of all tests. In this way, if the existing libvirt version doesn't support a function, it could stop the test as early as possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks yingshun, but other scenarios are not influenced by this libvirt version checking , I could not find a better line to check version

Copy link
Contributor

Choose a reason for hiding this comment

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

I usually put it in the first few lines of run(). For other tests, t'll skip the version checking if there's no func_supported_since_libvirt_ver.

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.

2 participants