diff --git a/libvirt/tests/cfg/daemon/conf_file/libvirtd_conf/virt_admin_logging.cfg b/libvirt/tests/cfg/daemon/conf_file/libvirtd_conf/virt_admin_logging.cfg index f0fb2b1490..4272793407 100644 --- a/libvirt/tests/cfg/daemon/conf_file/libvirtd_conf/virt_admin_logging.cfg +++ b/libvirt/tests/cfg/daemon/conf_file/libvirtd_conf/virt_admin_logging.cfg @@ -18,7 +18,7 @@ str_to_grep = "journal" - libvirtd_virt_admin_log_output: enable_libvirtd_debug_log = "no" - log_outputs = "3:journald" + log_outputs = "3:journald|3:stderr" enable_journal_socket = "no" virt_disk_device_source = "/var/lib/libvirt/images/no_existed_libvirtd.qcow2" log_file_path = "/var/log/messages" diff --git a/libvirt/tests/src/daemon/conf_file/libvirtd_conf/virt_admin_logging.py b/libvirt/tests/src/daemon/conf_file/libvirtd_conf/virt_admin_logging.py index 4341e87282..297d360b9b 100644 --- a/libvirt/tests/src/daemon/conf_file/libvirtd_conf/virt_admin_logging.py +++ b/libvirt/tests/src/daemon/conf_file/libvirtd_conf/virt_admin_logging.py @@ -11,6 +11,7 @@ import logging import os +import re from avocado.utils import process @@ -60,7 +61,7 @@ def check_log_outputs(params, test): log_output = params.get("log_outputs") vp = virt_admin.VirtadminPersistent() virt_admin_log = vp.daemon_log_outputs(ignore_status=True, debug=True).stdout_text.strip() - if log_output not in virt_admin_log: + if not re.search(r'%s' % log_output, virt_admin_log): test.fail("Can not find expected log output: %s from virt admin command output: %s" % (log_output, virt_admin_log))