[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v2 02/12] tests/vm: write raw console log
From: |
Alex Bennée |
Subject: |
[PULL v2 02/12] tests/vm: write raw console log |
Date: |
Fri, 27 Mar 2020 18:13:10 +0000 |
From: Gerd Hoffmann <address@hidden>
Run "tail -f /var/tmp/*/qemu*console.raw" in another terminal
to watch the install console.
Signed-off-by: Gerd Hoffmann <address@hidden>
Signed-off-by: Alex Bennée <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Message-Id: <address@hidden>
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
- [PULL v2 for 5.0 00/12] testing updates (+ one mttcg change), Alex Bennée, 2020/03/27
- [PULL v2 01/12] qemu/atomic.h: add #ifdef guards for stdatomic.h, Alex Bennée, 2020/03/27
- [PULL v2 03/12] tests/vm: move vga setup, Alex Bennée, 2020/03/27
- [PULL v2 02/12] tests/vm: write raw console log,
Alex Bennée <=
- [PULL v2 04/12] tests/vm: update FreeBSD to 12.1, Alex Bennée, 2020/03/27
- [PULL v2 05/12] tests/vm: update NetBSD to 9.0, Alex Bennée, 2020/03/27
- [PULL v2 07/12] configure: disable MTTCG for MIPS guests, Alex Bennée, 2020/03/27
- [PULL v2 09/12] tests/docker: Install gcrypt devel package in Debian image, Alex Bennée, 2020/03/27
- [PULL v2 06/12] tests/vm: fix basevm config, Alex Bennée, 2020/03/27
- [PULL v2 08/12] tests/docker: Keep package list sorted, Alex Bennée, 2020/03/27
- [PULL v2 10/12] tests/docker: Use Python3 PyYAML in the Fedora image, Alex Bennée, 2020/03/27
- [PULL v2 12/12] .travis.yml: Add a KVM-only s390x job, Alex Bennée, 2020/03/27
- [PULL v2 11/12] tests/docker: Add libepoxy and libudev packages to the Fedora image, Alex Bennée, 2020/03/27
- Re: [PULL v2 for 5.0 00/12] testing updates (+ one mttcg change), Peter Maydell, 2020/03/27