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

[Hyper-v platform] Enabling more testcases to run on Hyper-V platform #3623

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions microsoft/testsuites/cdrom/cdrom.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from lisa import Node, SkippedException, TestCaseMetadata, TestSuite, TestSuiteMetadata
from lisa.operating_system import CBLMariner, Debian, Linux
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.testsuite import simple_requirement
from lisa.tools import Gcc
from lisa.util.logger import Logger
Expand All @@ -34,7 +34,7 @@ class CdromSuite(TestSuite):
""",
priority=2,
requirement=simple_requirement(
supported_os=[Linux], supported_platform_type=[AZURE]
supported_os=[Linux], supported_platform_type=[AZURE, HYPERV]
),
)
def verify_cdrom_device_status_code(self, node: Node) -> None:
Expand Down
36 changes: 18 additions & 18 deletions microsoft/testsuites/core/azure_image_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
SuseRepositoryInfo,
Ubuntu,
)
from lisa.sut_orchestrator import AZURE, READY
from lisa.sut_orchestrator import AZURE, HYPERV, READY
from lisa.sut_orchestrator.azure.features import AzureDiskOptionSettings
from lisa.tools import Cat, Dmesg, Journalctl, Ls, Lsblk, Lscpu, Pgrep, Ssh
from lisa.util import (
Expand Down Expand Up @@ -267,7 +267,7 @@ class AzureImageStandard(TestSuite):
2. Verify that `Defaults targetpw` should be disabled, if present.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_default_targetpw(self, node: Node) -> None:
sudoers_out = (
Expand All @@ -289,7 +289,7 @@ def verify_default_targetpw(self, node: Node) -> None:
""",
priority=1,
requirement=simple_requirement(
supported_platform_type=[AZURE, READY], unsupported_os=[BSD]
supported_platform_type=[AZURE, READY, HYPERV], unsupported_os=[BSD]
),
)
def verify_grub(self, node: Node) -> None:
Expand Down Expand Up @@ -348,7 +348,7 @@ def verify_grub(self, node: Node) -> None:
network manager is not installed.
""",
priority=3,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_network_manager_not_installed(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand Down Expand Up @@ -376,7 +376,7 @@ def verify_network_manager_not_installed(self, node: Node) -> None:
2. Verify that networking is enabled in the file.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_network_file_configuration(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand Down Expand Up @@ -405,7 +405,7 @@ def verify_network_file_configuration(self, node: Node) -> None:
"ONBOOT=yes" is present in network file.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_ifcfg_eth0(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand Down Expand Up @@ -441,7 +441,7 @@ def verify_ifcfg_eth0(self, node: Node) -> None:
files are not present.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_udev_rules_moved(self, node: Node) -> None:
if isinstance(node.os, CoreOs):
Expand Down Expand Up @@ -477,7 +477,7 @@ def verify_udev_rules_moved(self, node: Node) -> None:
2. Verify that DHCLIENT_SET_HOSTNAME="no" is present in the file.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_dhcp_file_configuration(self, node: Node) -> None:
if isinstance(node.os, Suse):
Expand Down Expand Up @@ -510,7 +510,7 @@ def verify_dhcp_file_configuration(self, node: Node) -> None:
present in the file.
""",
priority=2,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_yum_conf(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand All @@ -533,7 +533,7 @@ def verify_yum_conf(self, node: Node) -> None:
2. Reboot the VM and see if the VM is still in good state.
""",
priority=2,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_os_update(self, node: Node) -> None:
if isinstance(node.os, Posix):
Expand All @@ -552,7 +552,7 @@ def verify_os_update(self, node: Node) -> None:
has length greater than zero.
""",
priority=2,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_hv_kvp_daemon_installed(self, node: Node) -> None:
if isinstance(node.os, Debian):
Expand All @@ -576,7 +576,7 @@ def verify_hv_kvp_daemon_installed(self, node: Node) -> None:
1. Verify the repository configuration depending on the distro type.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_repository_installed(self, node: Node) -> None: # noqa: C901
assert isinstance(node.os, Posix)
Expand Down Expand Up @@ -810,7 +810,7 @@ def verify_repository_installed(self, node: Node) -> None: # noqa: C901
2.2. Expected to see 'console=ttyS0' for x86_64.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_serial_console_is_enabled(self, node: Node) -> None:
console_device = {
Expand Down Expand Up @@ -874,7 +874,7 @@ def verify_serial_console_is_enabled(self, node: Node) -> None:
""",
priority=1,
use_new_environment=True,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_bash_history_is_empty(self, node: Node) -> None:
path_bash_history = "/root/.bash_history"
Expand All @@ -898,7 +898,7 @@ def verify_bash_history_is_empty(self, node: Node) -> None:
existing, fail the case.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_boot_error_fail_warnings(self, node: Node) -> None:
dmesg = node.tools[Dmesg]
Expand Down Expand Up @@ -947,7 +947,7 @@ def verify_boot_error_fail_warnings(self, node: Node) -> None:
fail the case.
""",
priority=2,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_cloud_init_error_status(self, node: Node) -> None:
cat = node.tools[Cat]
Expand Down Expand Up @@ -995,7 +995,7 @@ def verify_cloud_init_error_status(self, node: Node) -> None:
3. Pass with warning if the value is not between 0 and 180.
""",
priority=2,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_client_active_interval(self, node: Node) -> None:
ssh = node.tools[Ssh]
Expand All @@ -1016,7 +1016,7 @@ def verify_client_active_interval(self, node: Node) -> None:
3. Fail the case if the key of any user existing.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_no_pre_exist_users(self, node: Node) -> None:
key_pattern = re.compile(
Expand Down
4 changes: 2 additions & 2 deletions microsoft/testsuites/core/debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
TestSuiteMetadata,
simple_requirement,
)
from lisa.sut_orchestrator import AZURE, READY
from lisa.sut_orchestrator import AZURE, HYPERV, READY
from lisa.tools import Cat, Echo, KernelConfig, Mount
from lisa.tools.mkfs import FileSystem

Expand Down Expand Up @@ -44,7 +44,7 @@ class KernelDebug(TestSuite):

""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
def verify_enable_kprobe(self, node: Node) -> None:
if not node.tools[KernelConfig].is_enabled("CONFIG_KPROBE_EVENTS"):
Expand Down
3 changes: 2 additions & 1 deletion microsoft/testsuites/core/hv_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
simple_requirement,
)
from lisa.operating_system import BSD, Redhat
from lisa.sut_orchestrator import AZURE, HYPERV, READY
from lisa.sut_orchestrator.azure.platform_ import AzurePlatform
from lisa.tools import KernelConfig, LisDriver, Lsinitrd, Lsmod, Modinfo, Modprobe
from lisa.util import LisaException, SkippedException
Expand All @@ -32,7 +33,7 @@
It is responsible for ensuring the Hyper V drivers are all present,
are included in initrd, and are all the same version.
""",
requirement=simple_requirement(supported_platform_type=["azure", "ready"]),
requirement=simple_requirement(supported_platform_type=[AZURE, HYPERV, READY]),
)
class HvModule(TestSuite):
@TestCaseMetadata(
Expand Down
4 changes: 2 additions & 2 deletions microsoft/testsuites/core/kvp.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
simple_requirement,
)
from lisa.operating_system import BSD
from lisa.sut_orchestrator import AZURE, READY
from lisa.sut_orchestrator import AZURE, HYPERV, READY
from lisa.sut_orchestrator.azure.tools import KvpClient
from lisa.tools import Pgrep, Stat
from lisa.util import get_matched_str
Expand All @@ -27,7 +27,7 @@
This test suite verify the KVP service runs well on Azure and Hyper-V
platforms. The KVP is used to communicate between Windows host and guest VM.
""",
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
)
class Kvp(TestSuite):
# lrwx------ 1 root root 64 Oct 18 19:05 9 -> /dev/vmbus/hv_kvp
Expand Down
8 changes: 4 additions & 4 deletions microsoft/testsuites/core/lsvmbus.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
SecurityProfileType,
)
from lisa.operating_system import BSD, Windows
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.sut_orchestrator.azure.tools import VmGeneration
from lisa.tools import Cat, Ls, Lscpu, Lsvmbus
from lisa.tools.lsvmbus import VmBusDevice
Expand Down Expand Up @@ -83,7 +83,7 @@ class LsVmBus(TestSuite):
""",
priority=1,
requirement=simple_requirement(
supported_platform_type=[AZURE], supported_os=[BSD]
supported_platform_type=[AZURE, HYPERV], supported_os=[BSD]
),
)
def verify_vmbus_devices_channels_bsd(self, node: Node) -> None:
Expand Down Expand Up @@ -123,7 +123,7 @@ def verify_vmbus_devices_channels_bsd(self, node: Node) -> None:
""",
priority=1,
requirement=simple_requirement(
supported_platform_type=[AZURE], unsupported_os=[BSD, Windows]
supported_platform_type=[AZURE, HYPERV], unsupported_os=[BSD, Windows]
),
)
def verify_vmbus_devices_channels(self, node: Node) -> None:
Expand Down Expand Up @@ -165,7 +165,7 @@ def verify_vmbus_devices_channels(self, node: Node) -> None:
""",
priority=4,
requirement=simple_requirement(
supported_platform_type=[AZURE], unsupported_os=[BSD, Windows]
supported_platform_type=[AZURE, HYPERV], unsupported_os=[BSD, Windows]
),
)
def verify_vmbus_heartbeat_properties(self, node: Node) -> None:
Expand Down
4 changes: 2 additions & 2 deletions microsoft/testsuites/core/msr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
Linux,
Suse,
)
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.tools import Lscpu, Modprobe
from lisa.util import MissingPackagesException

Expand Down Expand Up @@ -109,7 +109,7 @@ def __str__(self) -> str:
on Hyper-V or Azure.
""",
requirement=simple_requirement(
supported_os=[Linux], supported_platform_type=[AZURE]
supported_os=[Linux], supported_platform_type=[AZURE, HYPERV]
),
)
class Msr(TestSuite):
Expand Down
6 changes: 3 additions & 3 deletions microsoft/testsuites/core/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
from lisa.node import Node
from lisa.operating_system import BSD, Posix, Windows
from lisa.schema import DiskControllerType, DiskOptionSettings, DiskType
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.sut_orchestrator.azure.features import AzureDiskOptionSettings, AzureFileShare
from lisa.sut_orchestrator.azure.tools import Waagent
from lisa.tools import Blkid, Cat, Dmesg, Echo, Lsblk, Mount, NFSClient, Swap, Sysctl
Expand Down Expand Up @@ -310,7 +310,7 @@ def verify_nvme_disk_controller_type(self, node: RemoteNode) -> None:
""",
priority=1,
requirement=simple_requirement(
supported_platform_type=[AZURE], unsupported_os=[BSD, Windows]
supported_platform_type=[AZURE, HYPERV], unsupported_os=[BSD, Windows]
),
)
def verify_os_partition_identifier(self, log: Logger, node: RemoteNode) -> None:
Expand Down Expand Up @@ -600,7 +600,7 @@ def after_case(self, log: Logger, **kwargs: Any) -> None:
""",
timeout=TIME_OUT,
requirement=simple_requirement(
supported_platform_type=[AZURE], unsupported_os=[BSD, Windows]
supported_platform_type=[AZURE, HYPERV], unsupported_os=[BSD, Windows]
),
use_new_environment=True,
priority=5,
Expand Down
4 changes: 2 additions & 2 deletions microsoft/testsuites/network/sriov.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from lisa.features import NetworkInterface, SerialConsole, StartStop
from lisa.nic import NicInfo
from lisa.operating_system import BSD, Posix, Windows
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.tools import (
Cat,
Ethtool,
Expand Down Expand Up @@ -267,7 +267,7 @@ def verify_sriov_max_vf_connection_max_cpu(self, environment: Environment) -> No
priority=1,
requirement=simple_requirement(
network_interface=features.Sriov(),
supported_platform_type=[AZURE],
supported_platform_type=[AZURE, HYPERV],
),
)
def verify_sriov_disable_enable(self, environment: Environment) -> None:
Expand Down
4 changes: 2 additions & 2 deletions microsoft/testsuites/xfstests/xfstesting.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
)
from lisa.features import Disk, Nvme
from lisa.operating_system import BSD, CBLMariner, Oracle, Redhat, Windows
from lisa.sut_orchestrator import AZURE
from lisa.sut_orchestrator import AZURE, HYPERV
from lisa.sut_orchestrator.azure.features import AzureFileShare
from lisa.sut_orchestrator.azure.platform_ import AzurePlatform
from lisa.testsuite import TestResult
Expand Down Expand Up @@ -494,7 +494,7 @@ def verify_btrfs_nvme_datadisk(self, log_path: Path, result: TestResult) -> None
""",
requirement=simple_requirement(
min_core_count=16,
supported_platform_type=[AZURE],
supported_platform_type=[AZURE, HYPERV],
unsupported_os=[BSD, Windows],
),
timeout=TIME_OUT,
Expand Down
Loading