Skip to content

Commit

Permalink
Merge pull request autotest#5292 from chunfuwen/fix_virt_admin_defaul…
Browse files Browse the repository at this point in the history
…t_log_failure

Fix virt_admin_logouts.positive_test.libvirtd_virt_admin_log_output  failure
  • Loading branch information
dzhengfy authored Dec 3, 2023
2 parents a767a31 + 19e9ed9 commit 5047222
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import logging
import os
import re

from avocado.utils import process

Expand Down Expand Up @@ -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))


Expand Down

0 comments on commit 5047222

Please sign in to comment.