From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575794; cv=none; d=zohomail.com; s=zohoarc; b=UbeWE8GE0r0oPKThdqxqONlSJdYS0EPItQc/LyULob9Sus2po4Vi5texMxag4pXsU7w7zxIjlTSD1lZVX2dZ92g3a3Zxf/OUqHLX4k9lg3/Q18ye5gZZwlnkVeKQnrG9y1nB55pU2brXPVUbcmX0vcQCMyy2SAx7W5XjxxUxX1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575794; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=gzSA3T3D3bjUS+27t5Vd7zmn0tcQoGXycn9jKRemVzU=; b=L1xRLeufIJ43o6Uod/IgboHeVFOrArQvlDPN2Ny/g8dGYQevnbV8v+o2OFp8aOvH/JRLhm+v4sIm7yZoAR9MA/XVXl8kP8UsUXQB9FvU/hUfuATN5ts190WBwJTtUeH/X4UtveNXXCB5JfgWBt+7cblOOUxU9+VI+328D/dWd+s= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575794708359.7493363015251; Wed, 27 May 2020 03:36:34 -0700 (PDT) Received: from localhost ([::1]:36570 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtQH-0002kz-8S for importer@patchew.org; Wed, 27 May 2020 06:36:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56078) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtKg-0000ah-8y for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:46 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33476) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtKf-0001dR-Dq for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:45 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 6CD19CD463; Wed, 27 May 2020 13:30:44 +0300 (MSK) Subject: [PATCH v2 01/11] tests/acceptance: allow console interaction with specific VMs From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:30:44 +0300 Message-ID: <159057544414.16818.6329438674514481731.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Console interaction in avocado scripts was possible only with single default VM. This patch modifies the function parameters to allow passing a specific VM as a parameter to interact with it. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Willian Rampazzo Reviewed-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index 59e7b4f763..77d1c1d9ff 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -69,13 +69,15 @@ def pick_default_qemu_bin(arch=3DNone): =20 =20 def _console_interaction(test, success_message, failure_message, - send_string, keep_sending=3DFalse): + send_string, keep_sending=3DFalse, vm=3DNone): assert not keep_sending or send_string - console =3D test.vm.console_socket.makefile() + if vm is None: + vm =3D test.vm + console =3D vm.console_socket.makefile() console_logger =3D logging.getLogger('console') while True: if send_string: - test.vm.console_socket.sendall(send_string.encode()) + vm.console_socket.sendall(send_string.encode()) if not keep_sending: send_string =3D None # send only once msg =3D console.readline().strip() @@ -115,7 +117,8 @@ def interrupt_interactive_console_until_pattern(test, s= uccess_message, _console_interaction(test, success_message, failure_message, interrupt_string, True) =20 -def wait_for_console_pattern(test, success_message, failure_message=3DNone= ): +def wait_for_console_pattern(test, success_message, failure_message=3DNone, + vm=3DNone): """ Waits for messages to appear on the console, while logging the content =20 @@ -125,7 +128,7 @@ def wait_for_console_pattern(test, success_message, fai= lure_message=3DNone): :param success_message: if this message appears, test succeeds :param failure_message: if this message appears, test fails """ - _console_interaction(test, success_message, failure_message, None) + _console_interaction(test, success_message, failure_message, None, vm= =3Dvm) =20 def exec_command_and_wait_for_pattern(test, command, success_message, failure_message=3DN= one): From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575605; cv=none; d=zohomail.com; s=zohoarc; b=QclPiI9WGaKEouiK6byN06Z5AUWnvXiNF6Il1wtcMYWG9+eeHyUXIVT/z1Gbo5tW9uo2J2NNr2paqDZ3H2WMpuP+zzM0sBKjUhgNtjqUVmvRZ1anKAILDkhPjbbDISShXTv9d8JY/ofPFjx14FWGgHJbITHO2GzJC9mq4MpACJo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575605; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yNMzFIKAbxGCn576srx+pzboriJ7LepsG4EG95f3uQY=; b=Bi8r9pwYdd3h7+NXFKIyWtZSd/F/259pYBkZ2Wtuw5knctaQtHyy3NKTLPp4sPVu+4jf8ySSxGfTM3Bm0XGvLnzUNo2Wmyjs8d3e0pXHvyHMfkNPenMy7GGzE793Lk8P8ql7dEaGw7bB9VPY7LVViJkl7OFcOS5n4dCy/p4qoi0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575605567742.1181088271236; Wed, 27 May 2020 03:33:25 -0700 (PDT) Received: from localhost ([::1]:48898 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtNE-0004jx-Bm for importer@patchew.org; Wed, 27 May 2020 06:33:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56100) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtKm-0000he-Ko for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:53 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33504) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtKl-0001m5-RR for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:52 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id E8EDFCD463; Wed, 27 May 2020 13:30:49 +0300 (MSK) Subject: [PATCH v2 02/11] tests/acceptance: refactor boot_linux_console test to allow code reuse From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:30:49 +0300 Message-ID: <159057544969.16818.6615283542905717210.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch splits code in BootLinuxConsole class into two different classes to allow reusing it by record/replay tests. Signed-off-by: Pavel Dovgalyuk Reviewed-by: Alex Benn=C3=A9e Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index c6b06a1a13..f23c5833b7 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -28,19 +28,13 @@ try: except CmdNotFoundError: P7ZIP_AVAILABLE =3D False =20 -class BootLinuxConsole(Test): - """ - Boots a Linux kernel and checks that the console is operational and the - kernel command line is properly passed from QEMU to the kernel - """ - - timeout =3D 90 - +class LinuxKernelUtils(Test): KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 - def wait_for_console_pattern(self, success_message): + def wait_for_console_pattern(self, success_message, vm=3DNone): wait_for_console_pattern(self, success_message, - failure_message=3D'Kernel panic - not syn= cing') + failure_message=3D'Kernel panic - not syn= cing', + vm=3Dvm) =20 def extract_from_deb(self, deb, path): """ @@ -79,6 +73,13 @@ class BootLinuxConsole(Test): os.chdir(cwd) return os.path.normpath(os.path.join(self.workdir, path)) =20 +class BootLinuxConsole(LinuxKernelUtils): + """ + Boots a Linux kernel and checks that the console is operational and the + kernel command line is properly passed from QEMU to the kernel + """ + timeout =3D 90 + def test_x86_64_pc(self): """ :avocado: tags=3Darch:x86_64 From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575699; cv=none; d=zohomail.com; s=zohoarc; b=Q/yIJBs1wVPfSDfyVtbg0DDd9kZmTb5EsyDb+BooaYUFNfkyv8FRthPoCpU2775FfXZqYsJ2sHhuMkKFUOKmTaXna8MnefbBENckKwXa0+pOw+Sp+S9nrXyEv0dxw6vXLr/HqDwtyLR/O7rjoTn2farBlENs/x65p51f+cerd1g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575699; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=0WrDC9PAHot1E3GiZBRpVcQ+68Myk+WwlGoEgOEKzc8=; b=T5DBy2Z+NY4yugmetU4vrbhPa0FHvLKw0wV8cAxUiLh0zeY1y1I1bNYLxkzQ14z9Oeadg5Pb5g0wmGMRbfzWXO6duT0bXKCAqCrGqfIIm5zm1p3v543sFbl2UpwHhawMZi4uMXxjH6YOhFHbzjKRaXQPtj5uiAnk04yq12G0FP4= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575699065502.96816177051016; Wed, 27 May 2020 03:34:59 -0700 (PDT) Received: from localhost ([::1]:57476 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtOj-00089Z-Rt for importer@patchew.org; Wed, 27 May 2020 06:34:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56128) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtKs-0000k5-NS for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:59 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33520) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtKr-0001pr-QE for qemu-devel@nongnu.org; Wed, 27 May 2020 06:30:58 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id E0D34CD462; Wed, 27 May 2020 13:30:55 +0300 (MSK) Subject: [PATCH v2 03/11] tests/acceptance: add base class record/replay kernel tests From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:30:55 +0300 Message-ID: <159057545565.16818.10615781697342502198.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a base for testing kernel boot recording and replaying. Each test has the phase of recording and phase of replaying. Virtual machines just boot the kernel and do not interact with the network. Structure and image links for the tests are borrowed from boot_linux_consol= e.py Testing controls the message pattern at the end of the kernel boot for both record and replay modes. In replay mode QEMU is also intended to finish the execution automatically. Signed-off-by: Pavel Dovgalyuk -- v2: - changed default value of args to None (suggested by Willian Rampazzo) - inherited common functions from boot_linux_console (suggested by Willian= Rampazzo) Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/MAINTAINERS b/MAINTAINERS index 47ef3139e6..e9a9ce4f66 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2497,6 +2497,7 @@ F: net/filter-replay.c F: include/sysemu/replay.h F: docs/replay.txt F: stubs/replay.c +F: tests/acceptance/replay_kernel.py =20 IOVA Tree M: Peter Xu diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py new file mode 100644 index 0000000000..b8b277ad2f --- /dev/null +++ b/tests/acceptance/replay_kernel.py @@ -0,0 +1,57 @@ +# Record/replay test that boots a Linux kernel +# +# Copyright (c) 2020 ISP RAS +# +# Author: +# Pavel Dovgalyuk +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os +import gzip + +from avocado_qemu import wait_for_console_pattern +from avocado.utils import process +from avocado.utils import archive +from boot_linux_console import LinuxKernelUtils + +class ReplayKernel(LinuxKernelUtils): + """ + Boots a Linux kernel in record mode and checks that the console + is operational and the kernel command line is properly passed + from QEMU to the kernel. + Then replays the same scenario and verifies, that QEMU correctly + terminates. + """ + + timeout =3D 90 + + def run_vm(self, kernel_path, kernel_command_line, console_pattern, + record, shift, args): + vm =3D self.get_vm() + vm.set_console() + if record: + mode =3D 'record' + else: + mode =3D 'replay' + vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % + (shift, mode, os.path.join(self.workdir, 'replay.bin')= ), + '-kernel', kernel_path, + '-append', kernel_command_line, + '-net', 'none') + if args: + vm.add_args(*args) + vm.launch() + self.wait_for_console_pattern(console_pattern, vm) + if record: + vm.shutdown() + else: + vm.wait() + + def run_rr(self, kernel_path, kernel_command_line, console_pattern, + shift=3D7, args=3DNone): + self.run_vm(kernel_path, kernel_command_line, console_pattern, + True, shift, args) + self.run_vm(kernel_path, kernel_command_line, console_pattern, + False, shift, args) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575683; cv=none; d=zohomail.com; s=zohoarc; b=I64+Ns+dgd2ZL/s+XqR4T76XIEMhoJ6fQXTGzHq1x9OzT4dSNdpyn/+D0S9OVShc7bc8WYHM5TUsIKPrTbBOz5fFYY7zN4pH6jR+U8/vMK6plQnfdmAnVrzajQS4nB+NbvCIiHOZsRBvbeE0sYkaR7NhlCcUWrxYkqQ7g+9hMuA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575683; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Kx+onVzGQBDk4Pkimrl4VM0N9e1WtBFAcj2F9HjuQtg=; b=L762lynMJCY/Dpry3J/51KuxWgGfFvi0bYxhUczqv2vMeP81EkOa7xOhOMXYsg69ImddvdwIkWTshZtmedwvuXIPMRxgtYN6lvBaMMfps8KgotC3Y6ltUSNZX2XW4VzY/0yi2ta1byDNKo45tVd9afZGJtPF25ZQbQaApt1JTNE= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575683225876.5424294613126; Wed, 27 May 2020 03:34:43 -0700 (PDT) Received: from localhost ([::1]:55748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtOU-0007TO-0J for importer@patchew.org; Wed, 27 May 2020 06:34:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56134) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtKx-0000mR-Pq for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:04 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33544) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtKw-0001qa-QQ for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:03 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 6BE23CD462; Wed, 27 May 2020 13:31:01 +0300 (MSK) Subject: [PATCH v2 04/11] tests/acceptance: add kernel record/replay test for x86_64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:01 +0300 Message-ID: <159057546117.16818.15607496040935344350.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay an execution of x86_64 machine. Execution scenario includes simple kernel boot, which allows testing basic hardware interaction in RR mode. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index b8b277ad2f..c7526f1aba 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -55,3 +55,19 @@ class ReplayKernel(LinuxKernelUtils): True, shift, args) self.run_vm(kernel_path, kernel_command_line, console_pattern, False, shift, args) + + def test_x86_64_pc(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ + kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' + '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' + '/vmlinuz') + kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + + self.run_rr(kernel_path, kernel_command_line, console_pattern) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575805; cv=none; d=zohomail.com; s=zohoarc; b=k+VgdNYqy8eQqytFdbGfT6rHEd+5BSeAX1GTDy7dQhCixQhMPrMopzHQ80j/JV/TipVhuJqKhpsicrCVO/eEj6XWK3dSVSWHq6OS88sTmx3/z4yTIBClU3pmYLJHFKsxgIj/kuzSMTGVweKhZz4WYkLC6bryvAac7V0ERxHZsdw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575805; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=RLLM9k8gI3w3JKHPjGr6er8uRgrMJ6IFatT2ARIhLwY=; b=BhMaizBsYX7pBnF0aEEZmZlhuZsgqr3aCNPxEpdzEiP4JJuRn0BDx60IdaXqY77wqUs5z9Sl3ebYXImYxuusASvGLjIt8iqWW0DtnmDaJLiX/WyaGxMyev4UAkfLQdw58f7PCQUbipKlINgQsdaV1dzXP16GN3DeWGaQrCNRgck= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575805840839.4708756462534; Wed, 27 May 2020 03:36:45 -0700 (PDT) Received: from localhost ([::1]:37960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtQS-0003JF-CX for importer@patchew.org; Wed, 27 May 2020 06:36:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtL3-0000t7-1S for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:09 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33564) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtL2-0001rH-4J for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:08 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 2988ECD463; Wed, 27 May 2020 13:31:07 +0300 (MSK) Subject: [PATCH v2 05/11] tests/acceptance: add record/replay test for aarch64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:06 +0300 Message-ID: <159057546689.16818.17382569698039249168.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay of the kernel image boot for aarch64 platform. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index c7526f1aba..deca69d6cb 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -71,3 +71,21 @@ class ReplayKernel(LinuxKernelUtils): console_pattern =3D 'Kernel command line: %s' % kernel_command_line =20 self.run_rr(kernel_path, kernel_command_line, console_pattern) + + def test_aarch64_virt(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + """ + kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' + '/linux/releases/29/Everything/aarch64/os/images/pxe= boot' + '/vmlinuz') + kernel_hash =3D '8c73e469fc6ea06a58dc83a628fc695b693b8493' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyAMA0') + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + + self.run_rr(kernel_path, kernel_command_line, console_pattern, + args=3D('-cpu', 'cortex-a53')) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575766; cv=none; d=zohomail.com; s=zohoarc; b=Lya+SWeE+6NxjRoTdAHXlxFYZZladdYLfgJxoFCvwuSV7sYpBhV8JOtKaKqBSGL18gBYjCXSHzvOd3hsq3lUkE8zJQOpnIjqIJrGftIaHtPY2l3ifhPMmGrX9knGNiYqubkewCliQnYl3CJANSAaPz5Bhkj/4gvf/SbOjrzglbY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575766; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=vnCA8V7SbsUFhaCOBfhlmac3NQ9jsDcZLCtX2tHC8Uo=; b=EypDAxLfD2qignXYRvFVk7RRwWlR8swigVz3W28gqqkZl7vScsimKlzPq/JtycPYI/JPeRM1iPMdGq1dnJYuDCYEcVz/TTI771XknuHUG0m4xtQ9eba06Ah2DLQtZlHWHkpqQitHA0NB0B6FOA551n8FEf4+oJ4k6PBa7/4r+fk= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575766875193.66482588573092; Wed, 27 May 2020 03:36:06 -0700 (PDT) Received: from localhost ([::1]:35850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtPp-0002SI-Dd for importer@patchew.org; Wed, 27 May 2020 06:36:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56174) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtL8-000174-OK for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:14 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33592) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtL7-0001ts-OC for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:14 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 9D25ACD463; Wed, 27 May 2020 13:31:12 +0300 (MSK) Subject: [PATCH v2 06/11] tests/acceptance: add record/replay test for arm From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:12 +0300 Message-ID: <159057547239.16818.850423603268442335.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay of the kernel image boot for two different arm platforms. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index deca69d6cb..d715ee7ca9 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -89,3 +89,49 @@ class ReplayKernel(LinuxKernelUtils): =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, args=3D('-cpu', 'cortex-a53')) + + def test_arm_virt(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:virt + """ + kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' + '/linux/releases/29/Everything/armhfp/os/images/pxeb= oot' + '/vmlinuz') + kernel_hash =3D 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyAMA0') + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + + self.run_rr(kernel_path, kernel_command_line, console_pattern) + + def test_arm_cubieboard_initrd(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:cubieboard + """ + deb_url =3D ('https://apt.armbian.com/pool/main/l/' + 'linux-4.20.7-sunxi/linux-image-dev-sunxi_5.75_armhf.de= b') + deb_hash =3D '1334c29c44d984ffa05ed10de8c3361f33d78315' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.20.7-sunxi') + dtb_path =3D '/usr/lib/linux-image-dev-sunxi/sun4i-a10-cubieboard.= dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.cpio.gz') + initrd_hash =3D '2b50f1873e113523967806f4da2afe385462ff9b' + initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) + initrd_path =3D os.path.join(self.workdir, 'rootfs.cpio') + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0,115200 ' + 'usbcore.nousb ' + 'panic=3D-1 noreboot') + console_pattern =3D 'Boot successful.' + self.run_rr(kernel_path, kernel_command_line, console_pattern, + args=3D('-dtb', dtb_path, '-initrd', initrd_path, '-no-reboot'= )) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575899; cv=none; d=zohomail.com; s=zohoarc; b=iQVEzrp4QoLfMpCkq0n7K2tbkMz5C64tp1i8NrmMQPppTg3HgI/FZJvXrj9r39Oz66wxUcSbEvUEJQ6MwqRrn45J6gaxat5OnyvX6QJ2LtarKCB4qbhQfzAgjtLhWOI1zY8aI8HwZHXrjiR/z86EqfWscq+Gjvp80dchcWzx+3o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575899; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g2QeTiJMW6hCWr6FQJMtLHfDC0I2vNhBTlKVm+i8j+4=; b=KkRTT8PbDsu49TJEePC+JMlRu6QZqyhsyshQg2YjwcDGWkEGX1w0KDRck+Z96rNBJMfiNa/YDtQf9r6JT6fT9gCwyc4YpPALURlPc0ODUEmwhqsJJ42QXRG3zeCtPy3+ArP2yI6lDb7k1AxuWjbAddJIjONuGaJirHeaoGc1OPs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575899437343.5000423286118; Wed, 27 May 2020 03:38:19 -0700 (PDT) Received: from localhost ([::1]:44066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtRx-0006NU-SB for importer@patchew.org; Wed, 27 May 2020 06:38:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56200) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtLE-0001Kf-2h for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:20 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33620) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtLD-0001vk-8X for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:19 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 31DEBCD463; Wed, 27 May 2020 13:31:18 +0300 (MSK) Subject: [PATCH v2 07/11] tests/acceptance: add record/replay test for ppc64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:17 +0300 Message-ID: <159057547791.16818.17603822675594700330.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay of the kernel image boot for ppc64 platform. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index d715ee7ca9..7ac046b822 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -135,3 +135,18 @@ class ReplayKernel(LinuxKernelUtils): console_pattern =3D 'Boot successful.' self.run_rr(kernel_path, kernel_command_line, console_pattern, args=3D('-dtb', dtb_path, '-initrd', initrd_path, '-no-reboot'= )) + + def test_ppc64_pseries(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + """ + kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' + '/fedora-secondary/releases/29/Everything/ppc64le/os' + '/ppc/ppc64/vmlinuz') + kernel_hash =3D '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.run_rr(kernel_path, kernel_command_line, console_pattern) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575909; cv=none; d=zohomail.com; s=zohoarc; b=cP/5ibN5rEa/CP1C3B/MUm5JL/KCFW3WTrP2yWZ8NT+j1npeIxUAav52evSUixrtk6E4PCHzWdpbcaj0uhgOkMRUIb4F23oyvDW8tgHBW7VJCdrm681g7BWX/2A6hDmyxWFRYxCKQsGuZovOafOAlt1YvZWk/kvtccqzabz9ERg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575909; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=yOy75sLGUJ9qNnCpU/ZCugse7V7VzWeYErumCjCb29c=; b=e73KPbpz29nj49T6wj1BTDM3q8/GLurnVjkUOYyx6Mnn96JvzbfsnI8n7qj9VYNflmwGYISrhI27QwOahXs/4jl0CqURzr3CIHmkXIzDu/56W/hE926lZToXayGBJibJhqD71cmYUZQhh5hF5fhV7nI7QPqPsSN/Pb11SNG1YGw= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 15905759096641013.0179770608004; Wed, 27 May 2020 03:38:29 -0700 (PDT) Received: from localhost ([::1]:44998 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtS8-0007Cm-D2 for importer@patchew.org; Wed, 27 May 2020 06:38:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtLJ-0001YI-Ka for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:25 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33660) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtLI-0001yK-Pr for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:25 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id B08B8CD463; Wed, 27 May 2020 13:31:23 +0300 (MSK) Subject: [PATCH v2 08/11] tests/acceptance: add record/replay test for m68k From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:23 +0300 Message-ID: <159057548345.16818.11231148033171120978.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay of the kernel image boot for m68k platform. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index 7ac046b822..0d629d1ee7 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -150,3 +150,21 @@ class ReplayKernel(LinuxKernelUtils): kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.run_rr(kernel_path, kernel_command_line, console_pattern) + + def test_m68k_q800(self): + """ + :avocado: tags=3Darch:m68k + :avocado: tags=3Dmachine:q800 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian-ports' + '/20191021T083923Z/pool-m68k/main' + '/l/linux/kernel-image-5.3.0-1-m68k-di_5.3.7-1_m68k.ude= b') + deb_hash =3D '044954bb9be4160a3ce81f8bc1b5e856b75cccd1' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-5.3.0-1-m68k') + + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 vga=3Doff') + console_pattern =3D 'No filesystem could mount root' + self.run_rr(kernel_path, kernel_command_line, console_pattern) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575697; cv=none; d=zohomail.com; s=zohoarc; b=LUIkDDrYvzO/GHQp1PIAQ0+4GQlvmvmkbaa7rIgm3VQm+RTWp84V/UwrV0sPSKnYKagM0W4u7DM19pqfaUIAzWtakTWXbhd9cDUwzlMv8NR4a1hNI+WdpP0f+He9TiGZT/VLosKWNsDS+vOQAzrMYYhEtYgvl3kWwDCSwCOVFWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575697; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=J+sUcoBXiXLzvisTDVAg4dFqTWAN2GrsMl9HbElpgOo=; b=IVxQArXK52Mx9cdDsN5zG+WdcFgeOgBlHeSF6StDFlgm+zKtEtaP08skKvdK/MPiMN8cxWO4uo75f+K9Qh7HC5Tc2IFpww69lvsWoyIWMQHQo+EVtk+0ptrVS4oFjFbI4ClNBY5hHW03anflKVduLingTg8ql6mpSg2a07QeHC0= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 159057569749362.69539147762066; Wed, 27 May 2020 03:34:57 -0700 (PDT) Received: from localhost ([::1]:57396 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtOi-00087d-9c for importer@patchew.org; Wed, 27 May 2020 06:34:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtLP-0001mc-CL for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:31 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33686) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtLO-00021w-95 for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:31 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 33EB6CD463; Wed, 27 May 2020 13:31:29 +0300 (MSK) Subject: [PATCH v2 09/11] tests/acceptance: record/replay tests with advcal images From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:28 +0300 Message-ID: <159057548896.16818.10761568499206774337.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds more record/replay tests with kernel images. Signed-off-by: Pavel Dovgalyuk -- v2: - make download path fixed to allow pre-test downloading (suggested by Wil= lian Rampazzo) Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index 0d629d1ee7..cbc6e9742e 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -168,3 +168,108 @@ class ReplayKernel(LinuxKernelUtils): 'console=3DttyS0 vga=3Doff') console_pattern =3D 'No filesystem could mount root' self.run_rr(kernel_path, kernel_command_line, console_pattern) + + def do_test_advcal_2018(self, file_path, kernel_name, args=3DNone): + archive.extract(file_path, self.workdir) + + for entry in os.scandir(self.workdir): + if entry.name.startswith('day') and entry.is_dir(): + kernel_path =3D entry.path + '/' + kernel_name + break + + kernel_command_line =3D '' + console_pattern =3D 'QEMU advent calendar' + self.run_rr(kernel_path, kernel_command_line, console_pattern, + args=3Dargs) + + def test_arm_vexpressa9(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:vexpress-a9 + """ + tar_hash =3D '32b7677ce8b6f1471fb0059865f451169934245b' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day16.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'winter.zImage', + ('-dtb', self.workdir + '/day16/vexpress-v2p-ca9.dtb')) + + def test_m68k_mcf5208evb(self): + """ + :avocado: tags=3Darch:m68k + :avocado: tags=3Dmachine:mcf5208evb + """ + tar_hash =3D 'ac688fd00561a2b6ce1359f9ff6aa2b98c9a570c' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day07.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'sanity-clause.elf') + + def test_microblaze_s3adsp1800(self): + """ + :avocado: tags=3Darch:microblaze + :avocado: tags=3Dmachine:petalogix-s3adsp1800 + """ + tar_hash =3D '08bf3e3bfb6b6c7ce1e54ab65d54e189f2caf13f' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day17.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'ballerina.bin') + + def test_ppc64_e500(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:ppce500 + """ + tar_hash =3D '6951d86d644b302898da2fd701739c9406527fe1' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day19.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'uImage', ('-cpu', 'e5500')) + + def test_ppc_g3beige(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:g3beige + """ + tar_hash =3D 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day15.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'invaders.elf', + ('-M', 'graphics=3Doff')) + + def test_ppc_mac99(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:mac99 + """ + tar_hash =3D 'e0b872a5eb8fdc5bed19bd43ffe863900ebcedfc' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day15.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'invaders.elf', + ('-M', 'graphics=3Doff')) + + def test_sparc_ss20(self): + """ + :avocado: tags=3Darch:sparc + :avocado: tags=3Dmachine:SS-20 + """ + tar_hash =3D 'b18550d5d61c7615d989a06edace051017726a9f' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day11.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'zImage.elf') + + def test_xtensa_lx60(self): + """ + :avocado: tags=3Darch:xtensa + :avocado: tags=3Dmachine:lx60 + """ + tar_hash =3D '49e88d9933742f0164b60839886c9739cb7a0d34' + tar_url =3D ('https://www.qemu-advent-calendar.org' + '/2018/download/day02.tar.xz') + file_path =3D self.fetch_asset(tar_url, asset_hash=3Dtar_hash) + self.do_test_advcal_2018(file_path, 'santas-sleigh-ride.elf', + ('-cpu', 'dc233c')) From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590575978; cv=none; d=zohomail.com; s=zohoarc; b=JouCYAOIRNbj/L4uruWjj2OkJkfvyFSNfi3+yIJpAgom7iebb+asB1hDGOnb2S212xUHX6WMIZ6aZcP+EQDxJix5MCvP04uPNPt4x8SfNQ/JpVqjIdDDlURBk9/KAJztaB2zvneQlRzG2NL5XsnvzpSp9GJs1Kuw4FPTMBdEazQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590575978; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q3cyX4z4vDb24pgXcE0f7kOk+nSloH6K4MyBoWdDVCU=; b=cmFm8thcDdjQhCCRjjjnq+eaZA+nwqPaINtkS6okddh4cI19pFjugniEJbS4Safu7YUNeYybz5GEMVla8kXSANXvQdiPKCAkFKg/WI0mHU9Y459aro+20c7v9ckb6Qzc2fgqJn+xgIkDr4yuH7WwgY5aXIKyQzUtkgmTOGRs0fI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590575978843220.75873182323346; Wed, 27 May 2020 03:39:38 -0700 (PDT) Received: from localhost ([::1]:50752 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtTF-00014w-M1 for importer@patchew.org; Wed, 27 May 2020 06:39:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56288) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtLV-000200-5o for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:37 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33718) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtLU-000252-2p for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:36 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id EC0F3CD463; Wed, 27 May 2020 13:31:34 +0300 (MSK) Subject: [PATCH v2 10/11] tests/acceptance: refactor boot_linux to allow code reuse From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:34 +0300 Message-ID: <159057549448.16818.934643360089121728.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 17 X-Spam_score: 1.7 X-Spam_bar: + X-Spam_report: (1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, FROM_WORDY=1, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, T_FILL_THIS_FORM_SHORT=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch moves image downloading functions to the separate class to allow reusing them from record/replay tests. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py index 075a386300..3aa57e88b0 100644 --- a/tests/acceptance/boot_linux.py +++ b/tests/acceptance/boot_linux.py @@ -26,22 +26,8 @@ KVM_NOT_AVAILABLE =3D ACCEL_NOT_AVAILABLE_FMT % "KVM" TCG_NOT_AVAILABLE =3D ACCEL_NOT_AVAILABLE_FMT % "TCG" =20 =20 -class BootLinux(Test): - """ - Boots a Linux system, checking for a successful initialization - """ - - timeout =3D 900 - chksum =3D None - - def setUp(self): - super(BootLinux, self).setUp() - self.vm.add_args('-smp', '2') - self.vm.add_args('-m', '1024') - self.prepare_boot() - self.prepare_cloudinit() - - def prepare_boot(self): +class BootLinuxBase(Test): + def download_boot(self): self.log.debug('Looking for and selecting a qemu-img binary to be ' 'used to create the bootable snapshot image') # If qemu-img has been built, use it, otherwise the system wide one @@ -60,17 +46,17 @@ class BootLinux(Test): if image_arch =3D=3D 'ppc64': image_arch =3D 'ppc64le' try: - self.boot =3D vmimage.get( + boot =3D vmimage.get( 'fedora', arch=3Dimage_arch, version=3D'31', checksum=3Dself.chksum, algorithm=3D'sha256', cache_dir=3Dself.cache_dirs[0], snapshot_dir=3Dself.workdir) - self.vm.add_args('-drive', 'file=3D%s' % self.boot.path) except: self.cancel('Failed to download/prepare boot image') + return boot.path =20 - def prepare_cloudinit(self): + def download_cloudinit(self): self.log.info('Preparing cloudinit image') try: cloudinit_iso =3D os.path.join(self.workdir, 'cloudinit.iso') @@ -81,9 +67,32 @@ class BootLinux(Test): # QEMU's hard coded usermode router address phone_home_host=3D'10.0.2.2', phone_home_port=3Dself.phone_home_port) - self.vm.add_args('-drive', 'file=3D%s,format=3Draw' % cloudini= t_iso) except Exception: self.cancel('Failed to prepared cloudinit image') + return cloudinit_iso + +class BootLinux(BootLinuxBase): + """ + Boots a Linux system, checking for a successful initialization + """ + + timeout =3D 900 + chksum =3D None + + def setUp(self): + super(BootLinux, self).setUp() + self.vm.add_args('-smp', '2') + self.vm.add_args('-m', '1024') + self.prepare_boot() + self.prepare_cloudinit() + + def prepare_boot(self): + path =3D self.download_boot() + self.vm.add_args('-drive', 'file=3D%s' % path) + + def prepare_cloudinit(self): + cloudinit_iso =3D self.download_cloudinit() + self.vm.add_args('-drive', 'file=3D%s,format=3Draw' % cloudinit_is= o) =20 def launch_and_wait(self): self.vm.set_console() From nobody Wed May 15 00:30:16 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1590576043; cv=none; d=zohomail.com; s=zohoarc; b=fTl/jdGK0nDdDvmDY+1It2WSvFZsU7Ou9vktGPhJPjvvTxhpwHF8LOHEVeBnorAJgjkfC1el3NgviBizZehf+v6ZZJKwFsmwsbYdmN3K3/DKpNAtzogGJBZZOD2l/JhwVDTQLySzkSFkhMmn7M5hxFudP2kVqegAulLBABFPTaI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590576043; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=azZYnfLjh8SfWFCK2Qz2IYzGs7n807xUPntP8/R5Zrk=; b=Y8kiFFPqojO2Jgb9bKKKjvXg7bL2aKdRkxC9P8jqt35I54/nsuT+5XiLHPrfhVz4MvWnxRBor1NGMm1Bm3R+eh1GtxIpL9iJIWUFuZmSEiLKm1oYSl2lk/3ngVoGe/WFIHUqCcp+XWW3sQ+rnI2tyQP+pmFUQQlUWdENsNcAL64= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1590576043886147.9094170697706; Wed, 27 May 2020 03:40:43 -0700 (PDT) Received: from localhost ([::1]:54510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtUI-0002zs-L4 for importer@patchew.org; Wed, 27 May 2020 06:40:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdtLa-0002Cn-Nn for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:42 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33742) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdtLZ-00028V-Iy for qemu-devel@nongnu.org; Wed, 27 May 2020 06:31:42 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 800E3CD463; Wed, 27 May 2020 13:31:40 +0300 (MSK) Subject: [PATCH v2 11/11] tests/acceptance: Linux boot test for record/replay From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Wed, 27 May 2020 13:31:40 +0300 Message-ID: <159057550026.16818.11665839081165803832.stgit@pasha-ThinkPad-X280> In-Reply-To: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> References: <159057543840.16818.14393433996899521784.stgit@pasha-ThinkPad-X280> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: softfail client-ip=83.149.199.45; envelope-from=Pavel.Dovgaluk@gmail.com; helo=mail.ispras.ru X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/27 06:30:39 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=0.9, SPF_SOFTFAIL=0.665, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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: wrampazz@redhat.com, alex.bennee@linaro.org, dovgaluk@ispras.ru, pavel.dovgaluk@ispras.ru, crosa@redhat.com, pbonzini@redhat.com, philmd@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" This patch adds a test for record/replay, which boots Linux image from the disk and interacts with the network. The idea and code of this test is borrowed from boot_linux.py However, currently record/replay works only for x86_64, therefore other tests were excluded. Each test consists of the following phases: - downloading the disk image - recording the execution - replaying the execution Replay does not validates the output, but waits until QEMU finishes the execution. This is reasonable, because QEMU usually hangs when replay goes wrong. Signed-off-by: Pavel Dovgalyuk Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/MAINTAINERS b/MAINTAINERS index e9a9ce4f66..97f066a9b2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2498,6 +2498,7 @@ F: include/sysemu/replay.h F: docs/replay.txt F: stubs/replay.c F: tests/acceptance/replay_kernel.py +F: tests/acceptance/replay_linux.py =20 IOVA Tree M: Peter Xu diff --git a/tests/acceptance/replay_linux.py b/tests/acceptance/replay_lin= ux.py new file mode 100644 index 0000000000..7c5971f156 --- /dev/null +++ b/tests/acceptance/replay_linux.py @@ -0,0 +1,97 @@ +# Record/replay test that boots a complete Linux system via a cloud image +# +# Copyright (c) 2020 ISP RAS +# +# Author: +# Pavel Dovgalyuk +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os + +from avocado.utils import cloudinit +from avocado.utils import network +from avocado.utils import vmimage +from avocado.utils import datadrainer +from avocado.utils.path import find_command +from boot_linux import BootLinuxBase + +class ReplayLinux(BootLinuxBase): + """ + Boots a Linux system, checking for a successful initialization + """ + + timeout =3D 1800 + chksum =3D None + hdd =3D 'ide-hd' + cd =3D 'ide-cd' + bus =3D 'ide' + + def setUp(self): + super(ReplayLinux, self).setUp() + self.boot_path =3D self.download_boot() + self.cloudinit_path =3D self.download_cloudinit() + + def vm_add_disk(self, vm, path, id, device): + bus_string =3D '' + if self.bus: + bus_string =3D ',bus=3D%s.%d' % (self.bus, id,) + vm.add_args('-drive', 'file=3D%s,snapshot,id=3Ddisk%s,if=3Dnone' %= (path, id)) + vm.add_args('-drive', 'driver=3Dblkreplay,id=3Ddisk%s-rr,if=3Dnone= ,image=3Ddisk%s' % (id, id)) + vm.add_args('-device', '%s,drive=3Ddisk%s-rr%s' % (device, id, bus= _string)) + + def launch_and_wait(self, record, args, shift): + vm =3D self.get_vm() + vm.add_args('-smp', '1') + vm.add_args('-m', '1024') + vm.add_args('-object', 'filter-replay,id=3Dreplay,netdev=3Dhub0por= t0') + if args: + vm.add_args(*args) + self.vm_add_disk(vm, self.boot_path, 0, self.hdd) + self.vm_add_disk(vm, self.cloudinit_path, 1, self.cd) + if record: + mode =3D 'record' + else: + mode =3D 'replay' + vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % + (shift, mode, os.path.join(self.workdir, 'replay.bin')= )) + + vm.set_console() + vm.launch() + console_drainer =3D datadrainer.LineLogger(vm.console_socket.filen= o(), + logger=3Dself.log.getChil= d('console'), + stop_check=3D(lambda : no= t vm.is_running())) + console_drainer.start() + if record: + self.log.info('VM launched, waiting for boot confirmation from= guest') + cloudinit.wait_for_phone_home(('0.0.0.0', self.phone_home_port= ), self.name) + vm.shutdown() + else: + self.log.info('VM launched, waiting the recorded execution to = be replayed') + vm.wait() + + def run_rr(self, args=3DNone, shift=3D7): + self.launch_and_wait(True, args, shift) + self.launch_and_wait(False, args, shift) + +class ReplayLinuxX8664(ReplayLinux): + """ + :avocado: tags=3Darch:x86_64 + """ + + chksum =3D 'e3c1b309d9203604922d6e255c2c5d098a309c2d46215d8fc026954f3c= 5c27a0' + + def test_pc_i440fx(self): + """ + :avocado: tags=3Dmachine:pc + :avocado: tags=3Daccel:tcg + """ + self.run_rr(shift=3D1) + + def test_pc_q35(self): + """ + :avocado: tags=3Dmachine:q35 + :avocado: tags=3Daccel:tcg + """ + self.run_rr(shift=3D3)