qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Fam Zheng" <fam@euphon.net>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: [PATCH  v1 01/11] tests/vm: write raw console log
Date: Mon, 23 Mar 2020 16:15:04 +0000	[thread overview]
Message-ID: <20200323161514.23952-2-alex.bennee@linaro.org> (raw)
In-Reply-To: <20200323161514.23952-1-alex.bennee@linaro.org>

From: Gerd Hoffmann <kraxel@redhat.com>

Run "tail -f /var/tmp/*/qemu*console.raw" in another terminal
to watch the install console.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20200310083218.26355-2-kraxel@redhat.com>
---
 tests/vm/basevm.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 8400b0e07f6..c53fd354d95 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -213,6 +213,9 @@ class BaseVM(object):
     def console_init(self, timeout = 120):
         vm = self._guest
         vm.console_socket.settimeout(timeout)
+        self.console_raw_path = os.path.join(vm._temp_dir,
+                                             vm._name + "-console.raw")
+        self.console_raw_file = open(self.console_raw_path, 'wb')
 
     def console_log(self, text):
         for line in re.split("[\r\n]", text):
@@ -234,6 +237,9 @@ class BaseVM(object):
         while True:
             try:
                 chars = vm.console_socket.recv(1)
+                if self.console_raw_file:
+                    self.console_raw_file.write(chars)
+                    self.console_raw_file.flush()
             except socket.timeout:
                 sys.stderr.write("console: *** read timeout ***\n")
                 sys.stderr.write("console: waiting for: '%s'\n" % expect)
-- 
2.20.1



  reply	other threads:[~2020-03-23 16:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-23 16:15 [PATCH v1 for 5.0 00/11] testing/next Alex Bennée
2020-03-23 16:15 ` Alex Bennée [this message]
2020-03-24 12:44   ` [PATCH v1 01/11] tests/vm: write raw console log Philippe Mathieu-Daudé
2020-03-23 16:15 ` [PATCH v1 02/11] tests/vm: move vga setup Alex Bennée
2020-03-23 16:33   ` Philippe Mathieu-Daudé
2020-03-23 16:15 ` [PATCH v1 03/11] tests/vm: update FreeBSD to 12.1 Alex Bennée
2020-03-23 16:15 ` [PATCH v1 04/11] tests/vm: update NetBSD to 9.0 Alex Bennée
2020-03-23 16:15 ` [PATCH v1 05/11] tests/vm: fix basevm config Alex Bennée
2020-03-23 16:32   ` Philippe Mathieu-Daudé
2020-03-23 16:15 ` [PATCH v1 06/11] configure: disable MTTCG for MIPS guests Alex Bennée
2020-03-23 16:30   ` Philippe Mathieu-Daudé
2020-03-23 18:17   ` Richard Henderson
2020-03-25 10:53     ` Aleksandar Markovic
2020-03-25 11:08       ` Aleksandar Markovic
2020-03-25 11:21       ` Alex Bennée
2020-03-23 16:15 ` [PATCH v1 07/11] tests/docker: Keep package list sorted Alex Bennée
2020-03-23 18:19   ` Richard Henderson
2020-03-23 16:15 ` [PATCH v1 08/11] tests/docker: Install gcrypt devel package in Debian image Alex Bennée
2020-03-23 18:19   ` Richard Henderson
2020-03-23 16:15 ` [PATCH v1 09/11] tests/docker: Use Python3 PyYAML in the Fedora image Alex Bennée
2020-03-23 18:19   ` Richard Henderson
2020-03-23 16:15 ` [PATCH v1 10/11] tests/docker: Add libepoxy and libudev packages to " Alex Bennée
2020-03-23 18:20   ` Richard Henderson
2020-03-23 16:15 ` [PATCH v1 11/11] .travis.yml: Add a KVM-only s390x job Alex Bennée
2020-03-23 18:21   ` Richard Henderson
2020-03-23 19:58 ` [PATCH v1 for 5.0 00/11] testing/next 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=20200323161514.23952-2-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=fam@euphon.net \
    --cc=kraxel@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).