From: "Alex Bennée" <alex.bennee@linaro.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
"Phil Mathieu-Daudé" <philmd@linaro.org>,
"Beraldo Leal" <bleal@redhat.com>,
"Cleber Rosa" <crosa@redhat.com>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>
Subject: Re: command line, guest console output missing from avocado log
Date: Fri, 12 May 2023 18:03:56 +0100 [thread overview]
Message-ID: <87r0rlwk5a.fsf@linaro.org> (raw)
In-Reply-To: <CAFEAcA_jbxsKrG0T_3Wi1Q-LZePqNqgVsdS8okQP1ADzqrL0hw@mail.gmail.com>
Peter Maydell <peter.maydell@linaro.org> writes:
> On Tue, 9 May 2023 at 19:58, Peter Maydell <peter.maydell@linaro.org> wrote:
>>
>> I just noticed that the guest console output seems to no longer
>> be in the avocado log file. Can it be reinstated, please?
>> The console logs are typically the most useful clue to "why did this
>> test fail" and without it you're just guessing in the dark...
>> The details of what QEMU command line avocado is running
>> also seem to have vanished : that also is among the most
>> useful items of information to have in the log.
>
> Ping? Where can I find these bits of the log for avocado
> test runs now? I tried looking in the individual per-test
> directories but they're not there either...
Hmm they have indeed disappeared. According to the docs doing:
./tests/venv/bin/avocado --show console:DEBUG run tests/avocado/tuxrun_baselines.py:TuxRunBaselineTest.test_arm64
should be enough, and there is another option --store-logging-stream
which takes the format. However I wasn't able to get this to work.
However moving the logging into the avocado name space with the
following:
--8<---------------cut here---------------start------------->8---
modified tests/avocado/avocado_qemu/__init__.py
@@ -138,7 +138,7 @@ def _console_interaction(test, success_message, failure_message,
if vm is None:
vm = test.vm
console = vm.console_socket.makefile(mode='rb', encoding='utf-8')
- console_logger = logging.getLogger('console')
+ console_logger = logging.getLogger('avocado.guest.console')
while True:
if send_string:
vm.console_socket.sendall(send_string.encode())
@@ -407,7 +407,7 @@ class LinuxSSHMixIn:
"""Contains utility methods for interacting with a guest via SSH."""
def ssh_connect(self, username, credential, credential_is_key=True):
- self.ssh_logger = logging.getLogger('ssh')
+ self.ssh_logger = logging.getLogger('avocado.guest.ssh')
res = self.vm.command('human-monitor-command',
command_line='info usernet')
port = get_info_usernet_hostfwd_port(res)
--8<---------------cut here---------------end--------------->8---
then makes things work with --show avocado.guest.console:DEBUG and the
job log automatically get the output in the logs.
I note that:
https://avocado-framework.readthedocs.io/en/101.0/guides/writer/chapters/logging.html
has a big TODO note in it.
Cleber,
Is this the change we should make or should we be able to pick arbitary
name-spaces for logging?
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2023-05-12 17:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-09 18:58 command line, guest console output missing from avocado log Peter Maydell
2023-05-12 15:21 ` Peter Maydell
2023-05-12 17:03 ` Alex Bennée [this message]
2023-05-18 12:08 ` Peter Maydell
2023-05-18 13:22 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87r0rlwk5a.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).