From f4977f1503453383afb5214a0e864b3cdb8c702c Mon Sep 17 00:00:00 2001 From: hholoubk Date: Fri, 3 Jan 2025 14:12:56 +0100 Subject: [PATCH] configuration udpate and better cfg. issue resolution --- .../migration_network_data_transport_tls.cfg | 2 +- provider/migration/base_steps.py | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libvirt/tests/cfg/migration/migration_uri/migration_network_data_transport_tls.cfg b/libvirt/tests/cfg/migration/migration_uri/migration_network_data_transport_tls.cfg index e085a2bb8f..a4b4cb4628 100644 --- a/libvirt/tests/cfg/migration/migration_uri/migration_network_data_transport_tls.cfg +++ b/libvirt/tests/cfg/migration/migration_uri/migration_network_data_transport_tls.cfg @@ -52,7 +52,7 @@ libvirtd_debug_level = "1" libvirtd_debug_filters = "1:*" check_str_local_log = '['"dir":"/etc/pki/qemu","endpoint":"client","verify-peer":true']' - check_str_remote_log = '"dir":"/etc/pki/qemu","endpoint":"server","verify-peer":true' + check_str_remote_log = '['"dir":"/etc/pki/qemu","endpoint":"server","verify-peer":true']' action_during_mig = '[{"func": "libvirt_network.check_established", "after_event": "iteration: \'1\'", "func_param": "params"}, {"func": "set_migrate_speed_to_high", "func_param": "params"}]' - tls_destination: no with_postcopy diff --git a/provider/migration/base_steps.py b/provider/migration/base_steps.py index 19d0085ba5..c5a7c3562d 100644 --- a/provider/migration/base_steps.py +++ b/provider/migration/base_steps.py @@ -368,10 +368,13 @@ def check_local_and_remote_log(self, local_str_in_log=True, remote_str_in_log=Tr :param remote_str_in_log: True if the remote file should include the given string, otherwise, False """ - check_str_local_log = eval(self.params.get("check_str_local_log", "[]")) - check_no_str_local_log = eval(self.params.get("check_no_str_local_log", "[]")) - check_str_remote_log = eval(self.params.get("check_str_remote_log", "[]")) - check_no_str_remote_log = eval(self.params.get("check_no_str_remote_log", "[]")) + try: + check_str_local_log = eval(self.params.get("check_str_local_log", "[]")) + check_no_str_local_log = eval(self.params.get("check_no_str_local_log", "[]")) + check_str_remote_log = eval(self.params.get("check_str_remote_log", "[]")) + check_no_str_remote_log = eval(self.params.get("check_no_str_remote_log", "[]")) + except Exception as e: + self.test.error(f"Wrong test configuration. Unable to eval one or more parameter(s): {str(e)}") log_file = self.params.get("libvirtd_debug_file") runner_on_target = None