Skip to content
Merged
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
55 changes: 37 additions & 18 deletions lisa/microsoft/testsuites/core/azure_image_standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
SuseRepositoryInfo,
Ubuntu,
)
from lisa.sut_orchestrator import AZURE, HYPERV, READY
from lisa.sut_orchestrator import AZURE, HYPERV, QEMU, READY
from lisa.sut_orchestrator.azure.features import AzureDiskOptionSettings
from lisa.sut_orchestrator.azure.tools import Waagent
from lisa.tools import (
Expand Down Expand Up @@ -350,7 +350,9 @@ class AzureImageStandard(TestSuite):
2. Verify that `Defaults targetpw` should be disabled, if present.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_default_targetpw(self, node: Node) -> None:
sudoers_out = (
Expand All @@ -372,7 +374,7 @@ def verify_default_targetpw(self, node: Node) -> None:
""",
priority=1,
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV], unsupported_os=[BSD]
supported_platform_type=[AZURE, READY, HYPERV, QEMU], unsupported_os=[BSD]
),
)
def verify_grub(self, node: Node) -> None:
Expand Down Expand Up @@ -460,7 +462,9 @@ 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, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_network_file_configuration(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand Down Expand Up @@ -534,7 +538,9 @@ 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, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_ifcfg_eth0(self, node: Node) -> None:
if isinstance(node.os, Fedora):
Expand Down Expand Up @@ -592,7 +598,9 @@ def verify_ifcfg_eth0(self, node: Node) -> None:
files are not present.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_udev_rules_moved(self, node: Node) -> None:
if isinstance(node.os, CoreOs):
Expand Down Expand Up @@ -628,7 +636,9 @@ 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, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_dhcp_file_configuration(self, node: Node) -> None:
if isinstance(node.os, Suse):
Expand Down Expand Up @@ -749,7 +759,9 @@ 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, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_repository_installed(self, node: Node) -> None: # noqa: C901
assert isinstance(node.os, Posix)
Expand Down Expand Up @@ -1010,7 +1022,9 @@ def verify_repository_installed(self, node: Node) -> None: # noqa: C901
3.3. Expected to see 'uart0: console (115200,n,8,1)' for FreeBSD.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_serial_console_is_enabled(self, node: Node) -> None:
if isinstance(node.os, CBLMariner):
Expand Down Expand Up @@ -1124,7 +1138,9 @@ def verify_serial_console_is_enabled(self, node: Node) -> None:
""",
priority=1,
use_new_environment=True,
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_bash_history_is_empty(self, node: Node) -> None:
remote_node = cast(RemoteNode, node)
Expand Down Expand Up @@ -1321,7 +1337,9 @@ 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, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_no_pre_exist_users(self, node: Node) -> None:
key_pattern = re.compile(
Expand Down Expand Up @@ -1544,7 +1562,7 @@ def verify_waagent_version(self, node: Node) -> None:
otherwise pass.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE]),
requirement=simple_requirement(supported_platform_type=[AZURE, QEMU]),
)
def verify_python_version(self, node: Node) -> None:
minimum_version = Version("3.9")
Expand Down Expand Up @@ -1574,7 +1592,7 @@ def verify_python_version(self, node: Node) -> None:
and not the versions having extended support, otherwise pass.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE]),
requirement=simple_requirement(supported_platform_type=[AZURE, QEMU]),
)
def verify_openssl_version(self, node: Node) -> None:
minimum_version = Version("3.0.0")
Expand All @@ -1599,7 +1617,7 @@ def verify_openssl_version(self, node: Node) -> None:
3. Fail the test if the architecture is not 64-bit.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE]),
requirement=simple_requirement(supported_platform_type=[AZURE, QEMU]),
)
def verify_azure_64bit_os(self, node: Node) -> None:
uname_tool = node.tools[Uname]
Expand All @@ -1609,8 +1627,9 @@ def verify_azure_64bit_os(self, node: Node) -> None:
# "Architecture .* is not supported" is the failure triage pattern. Please
# be careful when changing this string.
raise LisaException(
f"Architecture '{arch.value}' is not supported. Azure only supports "
f"64-bit architectures: {', '.join(str(a.value) for a in arch_64bit)}."
f"Architecture '{arch.value}' is not supported."
f" Only 64-bit architectures are supported:"
f" {', '.join(str(a.value) for a in arch_64bit)}."
)

@TestCaseMetadata(
Expand All @@ -1634,7 +1653,7 @@ def verify_azure_64bit_os(self, node: Node) -> None:
3. Pass if OMI is not installed or the version is secure.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE]),
requirement=simple_requirement(supported_platform_type=[AZURE, QEMU]),
)
def verify_omi_version(self, node: Node) -> None:
minimum_secure_version = Version("1.6.8.1")
Expand Down Expand Up @@ -1708,7 +1727,7 @@ def verify_omi_version(self, node: Node) -> None:
5. Pass the case if no swap partition is found on the OS disk.
""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE]),
requirement=simple_requirement(supported_platform_type=[AZURE, QEMU]),
)
def verify_no_swap_on_osdisk(self, node: Node) -> None:
swap_tool = node.tools[Swap]
Expand Down
6 changes: 4 additions & 2 deletions lisa/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, HYPERV, READY
from lisa.sut_orchestrator import AZURE, HYPERV, QEMU, READY
from lisa.tools import Cat, Echo, KernelConfig, Mount
from lisa.tools.mkfs import FileSystem

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

""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY, HYPERV]),
requirement=simple_requirement(
supported_platform_type=[AZURE, READY, HYPERV, QEMU]
),
)
def verify_enable_kprobe(self, node: Node) -> None:
if not node.tools[KernelConfig].is_enabled("CONFIG_KPROBE_EVENTS"):
Expand Down
4 changes: 2 additions & 2 deletions lisa/microsoft/testsuites/core/dhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
UnsupportedDistroException,
simple_requirement,
)
from lisa.sut_orchestrator import AZURE, READY
from lisa.sut_orchestrator import AZURE, QEMU, READY
from lisa.tools import Dhclient


Expand All @@ -33,7 +33,7 @@ class Dhcp(TestSuite):

""",
priority=1,
requirement=simple_requirement(supported_platform_type=[AZURE, READY]),
requirement=simple_requirement(supported_platform_type=[AZURE, READY, QEMU]),
)
def verify_dhcp_client_timeout(self, node: Node) -> None:
dhclient = node.tools[Dhclient]
Expand Down
Loading