Skip to content
Draft
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
52 changes: 52 additions & 0 deletions base/images/images.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ tests.test-suites = [
{ name = "lisa-perf" },
{ name = "lisa-smoke" },
{ name = "lisa-kernel-ltp" },
{ name = "image-read-only-checks" },
]

[images.vm-base.capabilities]
Expand All @@ -57,6 +58,7 @@ tests.test-suites = [
{ name = "lisa-perf" },
{ name = "lisa-smoke" },
{ name = "lisa-kernel-ltp" },
{ name = "image-read-only-checks" },
]

[images.vm-base-dev.capabilities]
Expand Down Expand Up @@ -179,6 +181,56 @@ description = "Lisa cvm tests"
type = "lisa"
description = "Lisa kernel LTP tests"

# LISA qemu read-only checks. azldev generates a runbook
# from the test-cases below, boots a QEMU VM from the built image artifact,
# and runs the cases. Requires a local QEMU/libvirt host with libvirt-python
# and pycdlib available for the qemu platform.
#
# NOTE: the upstream LISA 'libvirt' pip extra is intentionally NOT listed in
# pip-extras below. That extra pins 'libvirt-python ~= 9.3.0', which fails to
# build against a modern host libvirt (e.g. 11.x): its bundled generator.py
# cannot map newer API entries in /usr/share/libvirt/api/libvirt-api.xml and
# aborts the wheel build. libvirt-python must instead match the host libvirt
# version, so install it (plus pycdlib) into the LISA venv out-of-band, e.g.:
# <venv>/bin/pip install "libvirt-python==<host-libvirt-version>" "pycdlib~=1.12"
Comment on lines +193 to +195
# Check the host version with: libvirtd --version (or virsh --version)
#
# Usage: azldev image test vm-base --test-suite image-read-only-checks \
# --image-path base/out/images/vm-base/azl4-vm-base.x86_64-0.1.qcow2
[test-suites.image-read-only-checks]
type = "lisa"
description = "Lisa read-only checks(no reboot, no fresh VM) on QEMU VM"

[test-suites.image-read-only-checks.lisa]
# 'libvirt' is intentionally omitted here — its pin (~= 9.3.0) breaks against a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

issue(blocking): You document this thing about libvirt not being in pip-extras here and above. Pick one please.

# modern host libvirt. Install a host-matching libvirt-python + pycdlib into the
# venv manually instead. See the note above this suite for details.
Comment on lines +205 to +207
pip-extras = ["azure"]
# azldev generates the runbook and inlines the image path (as the qcow2 disk)
# and the admin key. These names are combined into the generated runbook's criteria.
test-cases = [
"verify_l3_cache",
"verify_cpu_count",
"verify_dns_name_resolution",
"verify_floppy_module_is_blacklisted",
"verify_default_targetpw",
"verify_grub",
"verify_udev_rules_moved",
"verify_serial_console_is_enabled",
"verify_no_pre_exist_users",
"verify_python_version",
"verify_openssl_version",
"verify_azure_64bit_os",
"verify_omi_version",
"verify_no_swap_on_osdisk",
"verify_essential_kernel_modules",
"verify_enable_kprobe",
]

[test-suites.image-read-only-checks.lisa.framework]
git-url = "https://github.com/microsoft/lisa.git"
ref = "5ef4eb9a09f9b21f3bca76802151ac2190b6de50"

# Single shared pytest suite for static (offline) image validation.
[test-suites.static-image-checks]
type = "pytest"
Expand Down
Loading