From 8b2f65faa1c6a54df760678082492fce32b056c6 Mon Sep 17 00:00:00 2001 From: Misbah Anjum N Date: Wed, 26 Feb 2025 17:27:22 +0530 Subject: [PATCH 1/8] Add lop-devops/avocado-vt link to KVMCI branch Update the env.conf file to add lop-devops/avocado-vt repo link to bootstrap KVMCI related changes in KVMCI branch Signed-off-by: Misbah Anjum N --- config/wrapper/env.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/wrapper/env.conf b/config/wrapper/env.conf index f3b7ddb6..278a54f7 100644 --- a/config/wrapper/env.conf +++ b/config/wrapper/env.conf @@ -4,7 +4,7 @@ # ('avocado-framework', 80.0) -- Installs specificed version, make sure you change other entries aswell # ('avocado-framework', 'git+https://github.com/avocado-framework/avocado.git') -- Install version from the given git repo base = [('avocado-framework', ''), ('avocado-framework-plugin-varianter-yaml-to-mux', '')] -kvm = [('avocado-framework-plugin-vt', 'git+https://github.com/avocado-framework/avocado-vt.git')] +kvm = [('avocado-framework-plugin-vt', 'git+https://github.com/lop-devops/avocado-vt.git@KVMCI')] optional = [('avocado-framework-plugin-result-html', '')] [tests] From 39c5dc358292af3fe06ab9518cf37d20799e6a52 Mon Sep 17 00:00:00 2001 From: Tasmiya Nalatwad Date: Wed, 5 Mar 2025 18:40:32 +0530 Subject: [PATCH 2/8] Updated the pci_passthrough.cfg test bucket with the latest configs 1. Added missing configs to run the existing tests 2. Added new configs to run the newly added tests for pci passthrough Signed-off-by: Tasmiya Nalatwad --- .../tests/guest/libvirt/pci_passthrough.cfg | 40 ++++++++++++++++++- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/config/tests/guest/libvirt/pci_passthrough.cfg b/config/tests/guest/libvirt/pci_passthrough.cfg index 96930b03..27aa54d5 100644 --- a/config/tests/guest/libvirt/pci_passthrough.cfg +++ b/config/tests/guest/libvirt/pci_passthrough.cfg @@ -44,6 +44,34 @@ pf_filter = "ENTER.YOUR.PCI.LABEL" libvirt_pci_net_ip = "ENTER.YOUR.IP" libvirt_pci_server_ip = "ENTER.YOUR.SERVER.IP" libvirt_pci_net_mask = "ENTER.YOUR.NETMASK" +# Eg: 0000:05:00.0 +libvirt_pci_net_dev_name = "ENTER.YOUR.PCI.LABEL" +libvirt_pci_storage_dev_label = "ENTER.YOUR.PCI.LABEL" +# enter timeout value +timeout = "ENTER.YOUR.TIMEOUT" +# model is dependent on architecture +# for power architecture it is pci-root +# index should be other than default VPHB i.e 0 +model = "ENTER.YOUR.DEVICE.MODEL" +# enter value for how many times hotplug/unplug will happen +# except stress test remaining all tests it will be 1 +stress_val = "1" +# Please enter the PCI device label for +# a network device. We will attach this +# device to guest. Then this network device +# will be unavailable on host. +# E.g: 0000:05:00.0 +libvirt_pci_net_dev_label = "ENTER.YOUR.PCI.LABEL" +# enter the ioa system bus info +# this value wil be based on the system bus info +# if your system is 32-bit then use ioa-bus-error +# if your system is 64-bit then use ioa-bus-error-64 +ioa_system_info = "ioa-bus-error" +# enter the functioninjection values your system supports 4 or 6 +func = "6" +# enter the number of eeh hits you want to trigger +# after this the device will be permanently disabled +max_freeze = "5" variants: - guest_import: @@ -51,8 +79,16 @@ variants: - device_passthrough: only libvirt_pci_passthrough - only NIC - only SRIOV + # removing below tests now as they are already covered in the above test. + # No need to explictly add them again. + # only NIC + # only SRIOV + + - hotplug_hotunplug_passthrough: + only libvirt_pci_passthrough_hotplug + + - pci_passthrough_eeh: + only libvirt_pci_passthrough_eeh - guest_remove: only remove_guest.without_disk From 882589ea0e7ea97594a7b36a0b97c06d4ea88bb2 Mon Sep 17 00:00:00 2001 From: Misbah Anjum N Date: Thu, 8 Jan 2026 14:35:09 +0530 Subject: [PATCH 3/8] Fix avocado-misc-tests repo check issue The command to check if the avocado-misc-tests repo is correct and matches the name was failing due to trailing and extra quote characters. Replacing the same with brackets is solving the issue Signed-off-by: Misbah Anjum N --- avocado-setup.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avocado-setup.py b/avocado-setup.py index 056c21eb..87e31653 100644 --- a/avocado-setup.py +++ b/avocado-setup.py @@ -257,8 +257,8 @@ def get_repo(repo, basepath): if not os.path.isdir(repo_path): cmd = "%s && cd %s" % (cmd_clone, repo_path) else: - cmd = "cd %s && [ %s = \"$(git remote get-url origin)\" ] && echo \"Repo matches\" && exit 0 \" \ - || echo \"Repo does not match\" && exit 1 \"" % (repo_path, repo[0]) + cmd = "cd %s && [ %s = \"$(git remote get-url origin)\" ] && (echo \"Repo matches\" && exit 0) \ + || (echo \"Repo does not match\" && exit 1)" % (repo_path, repo[0]) helper.runcmd(cmd, err_str="Failed to clone %s repository:, Please clean environment" % repo_name) From 219c38874c919567998709042625597dced82d17 Mon Sep 17 00:00:00 2001 From: Anushree-Mathur Date: Thu, 4 Jun 2026 14:42:01 +0530 Subject: [PATCH 4/8] avocado-setup: Support minor version-specific package dependencies Currently, bootstrap only supports major version package definitions. This prevents handling packages that exist only in specific minor versions of an OS. This commit adds minor version support by: - Tracking both major and full version identifiers - Checking version-specific sections first (e.g., deps__) - Falling back to major version sections if not found - Applying same logic to environment-type packages (kvm, NV, pHyp) Example config usage: [deps_rhel9_3] packages = version-specific-package Signed-off-by: Anushree-Mathur --- avocado-setup.py | 36 +++++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-) diff --git a/avocado-setup.py b/avocado-setup.py index 6475da2b..74185b94 100644 --- a/avocado-setup.py +++ b/avocado-setup.py @@ -139,16 +139,27 @@ def env_check(enable_kvm): (env_ver, env_type, cmd_pat) = helper.get_env_type(enable_kvm) # try to check base packages using major version numbers env_ver = env_ver.split('.')[0] + env_ver_full = env_ver.replace('.', '_') # Full version with underscore env_deps = [] - if not CONFIGFILE.has_section('deps_%s' % env_ver): + # Try full version first (e.g., deps_sles16_1) + if CONFIGFILE.has_section('deps_%s' % env_ver_full): + packages = CONFIGFILE.get('deps_%s' % env_ver_full, 'packages') + if packages != '': + env_deps = packages.split(',') + # Fallback to major version (e.g., deps_sles16) + elif CONFIGFILE.has_section('deps_%s' % env_ver_major): + packages = CONFIGFILE.get('deps_%s' % env_ver_major, 'packages') + if packages != '': + env_deps = packages.split(',') + else: # Fallback to base name if specific version is not found dist = helper.get_dist() - env_ver = dist[0] + env_ver_major = dist[0] + if CONFIGFILE.has_section('deps_%s' % env_ver_major): + packages = CONFIGFILE.get('deps_%s' % env_ver_major, 'packages') + if packages != '': + env_deps = packages.split(',') - if CONFIGFILE.has_section('deps_%s' % env_ver): - packages = CONFIGFILE.get('deps_%s' % env_ver, 'packages') - if packages != '': - env_deps = packages.split(',') for dep in env_deps: if dep[-1] == "$": # Substrings @@ -165,12 +176,19 @@ def env_check(enable_kvm): not_found.append(original_dep) env_deps = [] - # try to check env specific packages - if CONFIGFILE.has_section('deps_%s_%s' % (env_ver, env_type)): + # try to check env specific packages (with full version first) + if CONFIGFILE.has_section('deps_%s_%s' % (env_ver_full, env_type)): packages = CONFIGFILE.get('deps_%s_%s' % - (env_ver, env_type), 'packages') + (env_ver_full, env_type), 'packages') if packages != '': env_deps = packages.split(',') + # Fallback to major version with env_type + elif CONFIGFILE.has_section('deps_%s_%s' % (env_ver_major, env_type)): + packages = CONFIGFILE.get('deps_%s_%s' % + (env_ver_major, env_type), 'packages') + if packages != '': + env_deps = packages.split(',') + for dep in env_deps: if helper.runcmd(cmd_pat % dep, ignore_status=True)[0] != 0: not_found.append(dep) From 3383a564096a287c7aa6ab56acc7d09fd921eeca Mon Sep 17 00:00:00 2001 From: Anushree-Mathur2 Date: Fri, 18 Sep 2026 13:59:05 +0530 Subject: [PATCH 5/8] Add SLES 16.1 specific package dependencies Define SLES 16.1 specific packages in [deps_sles16_1] section. These packages are only available or required for SLES 16.1 and will not be installed on other SLES 16.x versions. Signed-off-by: Anushree-Mathur --- config/wrapper/env.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/config/wrapper/env.conf b/config/wrapper/env.conf index 32ffd726..d558fd2f 100644 --- a/config/wrapper/env.conf +++ b/config/wrapper/env.conf @@ -154,7 +154,9 @@ packages = [deps_sles15_kvm] packages = tcpdump,qemu [deps_sles16] -packages = gcc,python3-devel,7zip,xz-devel,python3-setuptools,tcpdump,numactl +packages = gcc,python311-devel,7zip,xz-devel,python311-setuptools,tcpdump,numactl +[deps_sles16_1] +packages = numa-preplace,gcc,python313-devel,7zip,xz-devel,python313-setuptools,tcpdump,numactl,nfs-client,nfs-kernel-server [deps_slesbe] packages = gcc,python3-devel,xz-devel,python3-setuptools,tcpdump,numactl [deps_slesbe_NV] From 83ed9541cfb093442164a57803d3f993c65a652e Mon Sep 17 00:00:00 2001 From: Anushree-Mathur2 Date: Fri, 18 Sep 2026 14:14:14 +0530 Subject: [PATCH 6/8] docs: document minor version-specific package dependencies in README Currently, bootstrap only supports major version package definitions. This prevents handling packages that exist only in specific minor versions of an OS. This commit adds documentation for the minor version support by: - Explaining how the wrapper checks minor version-specific sections first (e.g., [deps_sles16_1]) before falling back to the major version section (e.g., [deps_sles16]) - Documenting the same fallback logic for environment-type packages (e.g., [deps_sles16_1_kvm] -> [deps_sles16_kvm]) - Providing a clear example config usage in config/wrapper/env.conf - Highlighting that packages in [deps_sles16_1] are pre-requisite packages only for SLES 16.1 and will not affect other SLES 16.x versions Signed-off-by: Anushree-Mathur --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/README.md b/README.md index 1b9b12ac..bec376d1 100644 --- a/README.md +++ b/README.md @@ -262,6 +262,58 @@ $ ./avocado-setup.py -h 19. `--config-norun`: > Path to a custom NORUNTEST File path +20. `--resume`: + > Use this option to resume a test run that was interrupted due to a system crash or reboot. + > The wrapper scans the results directory (from `--output-dir` or the default `results/` path) + > and automatically determines the state of each suite: + > + > | Suite state in prior run | Action on resume | + > |---|---| + > | Completed cleanly | Skipped — not re-run | + > | Was running at time of crash/reboot | Replayed via `avocado replay ` — only not-passed tests re-run | + > | Never started (system crashed before it was reached) | Normal fresh run | + > + > **Usage — first run:** + > ``` + > ./avocado-setup.py --run-suite host_a,host_b,host_c + > ``` + > + > **After system reboot/crash — same command with `--resume`:** + > ``` + > ./avocado-setup.py --run-suite host_a,host_b,host_c --resume + > ``` + > + > If a custom `--output-dir` was used in the original run, pass it again with `--resume`: + > ``` + > ./avocado-setup.py --run-suite host_a,host_b,host_c --output-dir /path/to/output --resume + > ``` + > + > NOTE: The `--run-suite` list must be identical to the original run so the wrapper can + > correctly identify which suites ran, which was interrupted, and which never started. + > Works for both host and guest test suites. + +### Minor Version-Specific Package Dependencies: + + By default, the wrapper checks for OS-level dependency packages using the **major version** of the detected OS + (e.g., `[deps_sles16]`). The wrapper also supports **minor version-specific** sections that take priority over + the major version section. + + **How it works:** + 1. The wrapper first checks for a minor version-specific section (e.g., `[deps_sles16_1]`) + 2. If not found, it falls back to the major version section (e.g., `[deps_sles16]`) + 3. The same lookup logic applies to environment-type packages (e.g., `[deps_sles16_1_kvm]` → `[deps_sles16_kvm]`) + + **Example** — add packages only for SLES 16.1 in `config/wrapper/env.conf`: + ``` + [deps_sles16] + packages = gcc,python311-devel,xz-devel + + [deps_sles16_1] + packages = version-specific-package + ``` + + > **Note:** Packages in `[deps_sles16_1]` will **only** be the pre-requisite packages that need to be installed on SLES 16.1 and will not affect other SLES 16.x versions. + ### Customizing Test Suites: The Host and Guest sanity suites were created to include a varied collection of tests to validate new Host OS installations. From 8bc894dc78e5f9af8a42a6da60b28deea47001f2 Mon Sep 17 00:00:00 2001 From: Anushree-Mathur2 Date: Thu, 8 Oct 2026 14:39:08 +0530 Subject: [PATCH 7/8] avocado-setup: fix UnboundLocalError for env_ver_major in env_check env_ver_major was used before being assigned because env_ver was being truncated to just the major part before env_ver_full was derived, leaving env_ver_full with no minor version info and env_ver_major never set. Fix by deriving both env_ver_full and env_ver_major from the original env_ver before any truncation, and removing the now-dead else fallback block that redundantly reassigned env_ver_major. Signed-off-by: Anushree-Mathur --- avocado-setup.py | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/avocado-setup.py b/avocado-setup.py index 74185b94..afef445e 100644 --- a/avocado-setup.py +++ b/avocado-setup.py @@ -137,9 +137,9 @@ def env_check(enable_kvm): logger.info("Check for environment") not_found = [] (env_ver, env_type, cmd_pat) = helper.get_env_type(enable_kvm) - # try to check base packages using major version numbers - env_ver = env_ver.split('.')[0] - env_ver_full = env_ver.replace('.', '_') # Full version with underscore + # Derive major and full version identifiers + env_ver_full = env_ver.replace('.', '_') # e.g., sles16_1 + env_ver_major = env_ver.split('.')[0] # e.g., sles16 env_deps = [] # Try full version first (e.g., deps_sles16_1) if CONFIGFILE.has_section('deps_%s' % env_ver_full): @@ -151,14 +151,6 @@ def env_check(enable_kvm): packages = CONFIGFILE.get('deps_%s' % env_ver_major, 'packages') if packages != '': env_deps = packages.split(',') - else: - # Fallback to base name if specific version is not found - dist = helper.get_dist() - env_ver_major = dist[0] - if CONFIGFILE.has_section('deps_%s' % env_ver_major): - packages = CONFIGFILE.get('deps_%s' % env_ver_major, 'packages') - if packages != '': - env_deps = packages.split(',') for dep in env_deps: if dep[-1] == "$": From e87f8cf5d10e56102da313487552de89b369b5fe Mon Sep 17 00:00:00 2001 From: Aniket Sahu Date: Wed, 14 Oct 2026 12:25:32 +0530 Subject: [PATCH 8/8] tests/config: add create_vm_libvirt=no args Some tests on the network suite try to redefine the already existing vm as there is logic in the test code to define the vm if create_vm_libvirt is set to yes in the tp_libvirt config. Our test environment doesn't need to do that, as we already define the VM once. This patch helps with mitigating these issues. Signed-off-by: Aniket Sahu --- config/tests/guest/libvirt/network.cfg | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/tests/guest/libvirt/network.cfg b/config/tests/guest/libvirt/network.cfg index bc617f4f..f5e675d4 100644 --- a/config/tests/guest/libvirt/network.cfg +++ b/config/tests/guest/libvirt/network.cfg @@ -72,7 +72,7 @@ variants: only virsh.net_info - net_virsh_net_list: only virsh.net_list - - net_virsh_net_event: + - net_virsh_net_event: only virsh.net_event - net_virsh_net_name: only virsh.net_name @@ -108,6 +108,8 @@ variants: - net_virsh_domiflist: only virsh.domiflist - net_virsh_domif_setlink_getlink: + create_vm_libvirt=no + kill_vm_libvirt=no only virsh.domif_setlink_getlink - net_virtual_network.iface_ovs: only virtual_network.iface_ovs @@ -157,6 +159,8 @@ variants: no virtual_network.iface_network.net_portgroup.specific_portgroup no virtual_network.iface_network.net_portgroup.overwriting_bandwidth - net_virtual_network_iface_options: + create_vm_libvirt=no + kill_vm_libvirt=no only virtual_network.iface_options no virtual_network.iface_options.iface_macvtap.driver_qemu.mode_bridge no virtual_network.iface_options.iface_macvtap.driver_qemu.mode_passthrough