From 8c971b6d7533f16fe14c88c732950c1cba7fd33a Mon Sep 17 00:00:00 2001 From: cliping Date: Tue, 27 Jun 2023 11:28:55 +0800 Subject: [PATCH] migration: Add libvirt version check Signed-off-by: cliping --- .../migration/migration_with_vtpm/migration_with_shared_tpm.cfg | 1 + .../migration/migration_with_vtpm/migration_with_shared_tpm.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/libvirt/tests/cfg/migration/migration_with_vtpm/migration_with_shared_tpm.cfg b/libvirt/tests/cfg/migration/migration_with_vtpm/migration_with_shared_tpm.cfg index 8524dfdd27..330781b12d 100644 --- a/libvirt/tests/cfg/migration/migration_with_vtpm/migration_with_shared_tpm.cfg +++ b/libvirt/tests/cfg/migration/migration_with_vtpm/migration_with_shared_tpm.cfg @@ -29,6 +29,7 @@ libvirtd_debug_level = "1" libvirtd_debug_filters = "1:*" libvirtd_debug_file = '/var/log/libvirt/virtqemud.log' + func_supported_since_libvirt_ver = (9, 0, 0) variants: - persistent_and_p2p: diff --git a/libvirt/tests/src/migration/migration_with_vtpm/migration_with_shared_tpm.py b/libvirt/tests/src/migration/migration_with_vtpm/migration_with_shared_tpm.py index 1fc09641b4..a920f52a47 100644 --- a/libvirt/tests/src/migration/migration_with_vtpm/migration_with_shared_tpm.py +++ b/libvirt/tests/src/migration/migration_with_vtpm/migration_with_shared_tpm.py @@ -4,6 +4,7 @@ from avocado.utils import process from virttest import ceph +from virttest import libvirt_version from virttest import remote from virttest import utils_package from virttest import virsh @@ -268,6 +269,7 @@ def cleanup_ceph(): vm_name = params.get("migrate_main_vm") shared_storage_type = params.get('shared_storage_type', '') + libvirt_version.is_libvirt_feature_supported(params) vm = env.get_vm(vm_name) migration_obj = base_steps.MigrationBase(test, vm, params) setup_test = eval("setup_%s" % shared_storage_type) if "setup_%s" % shared_storage_type in \