From patchwork Tue Mar 10 08:32:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gerd Hoffmann X-Patchwork-Id: 11428733 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C331D139A for ; Tue, 10 Mar 2020 08:35:08 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 992702467D for ; Tue, 10 Mar 2020 08:35:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="QdaPFK9B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 992702467D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:55292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBaLz-0008O8-R1 for patchwork-qemu-devel@patchwork.kernel.org; Tue, 10 Mar 2020 04:35:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39920) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBaJO-0004g3-1r for qemu-devel@nongnu.org; Tue, 10 Mar 2020 04:32:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBaJM-0003ZH-Uq for qemu-devel@nongnu.org; Tue, 10 Mar 2020 04:32:25 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:56495 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jBaJM-0003YO-RH for qemu-devel@nongnu.org; Tue, 10 Mar 2020 04:32:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1583829144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=NOcQ63OgzqIDc13B4UUajPYNBSN7JfR6j847LWhFxL8=; b=QdaPFK9Bv+AsrO+GeMp0/VCEfUjP39FeesRKekMXbX7cBj53oYe3fBqtArnrWCwVYZUH30 cH/KEB5raQA8ebHSUiCSk+THAM2XNGbJYH0d6SEWF7cWdRQKHOPnhsq8CzwoNUmdWXpOIl FDzNpr5ZyEsH+9LzHS+FTyyOLbHolgA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-401-gZmO1iEQMpyIbcjJaNg7QQ-1; Tue, 10 Mar 2020 04:32:22 -0400 X-MC-Unique: gZmO1iEQMpyIbcjJaNg7QQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A4C328017CC; Tue, 10 Mar 2020 08:32:21 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-117.ams2.redhat.com [10.36.116.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id E7C475C28F; Tue, 10 Mar 2020 08:32:18 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 27AC39D24; Tue, 10 Mar 2020 09:32:18 +0100 (CET) From: Gerd Hoffmann To: qemu-devel@nongnu.org Subject: [PATCH 1/4] tests/vm: write raw console log Date: Tue, 10 Mar 2020 09:32:15 +0100 Message-Id: <20200310083218.26355-2-kraxel@redhat.com> In-Reply-To: <20200310083218.26355-1-kraxel@redhat.com> References: <20200310083218.26355-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Alex_Benn=C3=A9e?= , Kamil Rytarowski , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Gerd Hoffmann Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Run "tail -f /var/tmp/*/qemu*console.raw" in another terminal to watch the install console. Signed-off-by: Gerd Hoffmann Reviewed-by: Philippe Mathieu-Daudé --- tests/vm/basevm.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 8400b0e07f65..c53fd354d955 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)