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

m #5176

Closed
wants to merge 3 commits into from
Closed

m #5176

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions libvirt/tests/src/virsh_cmd/interface/virsh_iface.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

from avocado.utils import process
from avocado.utils import path as utils_path
from avocado.utils import distro

from virttest import utils_net
from virttest import virsh
Expand Down Expand Up @@ -127,6 +128,12 @@ def run(test, params, env):
device by default. You can specify the interface which you want, but be
careful.
"""
"""
Cancelling testcase if distro version is rhel 9 and above
"""
detected_distro = distro.detect()
if detected_distro.name == "rhel" and int(detected_distro.version) >= 9:
test.cancel("virsh iface-* commands are unsupported in rhel 9")

iface_name = params.get("iface_name", "ENTER.BRIDGE.NAME")
iface_xml = params.get("iface_xml")
Expand Down
8 changes: 7 additions & 1 deletion libvirt/tests/src/virsh_cmd/interface/virsh_iface_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging as log

from avocado.utils import process

from avocado.utils import distro
from avocado.utils import path as utils_path

from virttest import utils_net
Expand All @@ -27,6 +27,12 @@ def run(test, params, env):
(1) Bridge an existing network device(iface-bridge).
(2) Unbridge a network device(iface-unbridge).
"""
"""
Cancelling the testcase if distro version is rhel 9 and above
"""
detected_distro = distro.detect()
if detected_distro.name == "rhel" and int(detected_distro.version) >= 9:
test.cancel("virsh iface-* commands are unsupported in rhel 9")

bridge_name = params.get("bridge_name")
ping_ip = params.get("ping_ip", "")
Expand Down
6 changes: 6 additions & 0 deletions libvirt/tests/src/virsh_cmd/interface/virsh_iface_edit.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import aexpect

from avocado.utils import process
from avocado.utils import distro

from virttest import remote
from virttest import data_dir
Expand Down Expand Up @@ -58,6 +59,11 @@ def run(test, params, env):

Edit interface start mode in this case.
"""
"""Cancelling testcase if distro version is rhel 9 and above"""
detected_distro = distro.detect()
if detected_distro.name == "rhel" and int(detected_distro.version) >= 9:
test.cancel("virsh iface-* commands are unsupported in rhel 9")

iface_name = params.get("iface_name", "lo")
status_error = "yes" == params.get("status_error", "no")
if not libvirt.check_iface(iface_name, "exists", "--all"):
Expand Down
6 changes: 6 additions & 0 deletions libvirt/tests/src/virsh_cmd/interface/virsh_iface_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import re

from avocado.utils import process, astring
from avocado.utils import distro
from virttest import virsh


Expand All @@ -33,6 +34,11 @@ def run(test, params, env):
(3) Get interface MAC address by interface name
(4) Get interface name by interface MAC address
"""
"""Cancelling testcase if distro version is rhel 9 and above"""
detected_distro = distro.detect()
if detected_distro.name == "rhel" and int(detected_distro.version) >= 9:
test.cancel("virsh iface-* commands are unsupported in rhel 9")

vm_name = params.get("main_vm")
vm = env.get_vm(vm_name)
opt = params.get('opt', '')
Expand Down
7 changes: 7 additions & 0 deletions libvirt/tests/src/virsh_cmd/interface/virsh_iface_trans.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from avocado.utils import process
from avocado.utils import path as utils_path
from avocado.core import exceptions
from avocado.utils import distro

from virttest import virsh
from virttest import utils_libvirtd
Expand Down Expand Up @@ -195,6 +196,12 @@ def run(test, params, env):
2.3.1 begin and commit testing with libvirtd restart
2.3.2 begin and rollback testing with libvirtd restart
"""
"""
Cancelling testcase if distro version is rhel 9 and above
"""
detected_distro = distro.detect()
if detected_distro.name == "rhel" and int(detected_distro.version) >= 9:
test.cancel("virsh iface-* commands are unsupported in rhel 9")

if not utils_package.package_install(["mlocate"]):
test.cancel("Failed to install dependency package mlocate"
Expand Down
4 changes: 2 additions & 2 deletions libvirt/tests/src/virsh_cmd/snapshot/virsh_snapshot_disk.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ def run(test, params, env):
session.close()

# Test delete snapshot without "--metadata", delete external disk
# snapshot will fail for now.
# snapshot deletion with external disk unsupported in libvirt version lower than 9.0.0
# Only do this when snapshot create succeed which filtered in cfg file.
if snapshot_del_test:
if snapshot_name:
Expand All @@ -439,7 +439,7 @@ def run(test, params, env):
test.fail("Snapshot xml file %s missing"
% snap_xml_path)
else:
if status_error:
if (not libvirt_version.version_compare(9,0,0)) and status_error:
err_msg = "Snapshot delete succeed but expect fail."
test.fail(err_msg)
else:
Expand Down
Loading