From nobody Thu May 16 08:13:54 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=1590735943; cv=none; d=zohomail.com; s=zohoarc; b=FXPrut1+JQBLT2dRjp1ka366q40TP3GKqljZ4O3mEBcEtoBjl6V4fdPN0200xDzOCL8FnKbdLrBct05BesC8/UiKdOQSrbTfDoZ2KmxJIvAJj64718kibV8zxqLkcDcbTe/htaAvSZ95EOA511lvccgUOJndAYyRUOmzMcoFX80= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590735943; 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=Amtj0bngW0zQFmI3Yl2K13zi/M87NITPLEPD+MP8q+Y=; b=hRDm0mU2UHvvq4nDysgOta7Mc2qD6BmiMQn3XwLaWhJZu+nKA+9+KqhtNu95ZTTlpmbdzU9ORWpmNUoRKZd9hTbJSrhQTO8TaIffNJNJEk+FNSnxPTTZGt9z6LO/HIYM9+tuIFPCCx9AveJJkpuD362DZk6h/KmJeE3/fw6UsRI= 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 1590735943867763.2084650293489; Fri, 29 May 2020 00:05:43 -0700 (PDT) Received: from localhost ([::1]:59730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ5K-0004Yt-Hv for importer@patchew.org; Fri, 29 May 2020 03:05:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40724) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4M-0003En-Bv for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:42 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33216) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4L-0000mB-GV for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:42 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 9872DCD461; Fri, 29 May 2020 10:04:39 +0300 (MSK) Subject: [PATCH v3 01/11] tests/acceptance: allow console interaction with specific VMs From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:04:39 +0300 Message-ID: <159073587933.20809.5122618715976660635.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 Thu May 16 08:13:54 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=1590735948; cv=none; d=zohomail.com; s=zohoarc; b=gsWMifPKtQQ5f2bM7vjgyaHqZMwMnx7l0f7Ab6YWWo9Ag/oJ7yeRXItOTsq/kenS45kixWWcTodwY9pbEUBO7VQQo6pz8OUJA1k5Y4GujweeyaYO/Z5XSBxra0U36KBgMCUP/DIzO3U7smNn28MqaxR1KDQ8BwV/nOUQbJFptvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590735948; 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=r/tOb/LqY9kYpvIHHk3p+exHQqtgIFCooBdfVRxiCOw=; b=enhqrhhNExMjaty+vVuiDJS/NjMQvNJHmPPhD0kz3LRIZgyJX/4HN8rEhGseDJPqWM4DdqNcEtZvfR22ORGvNNXMleenuFc7oKjRmg7SSieOvfOA+XScH3nMeSzBR+GOf5pmNqBxKjjMSTV0fqep+59kdeKtLn81f+HZoDmPjuE= 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 1590735948652487.8439384519737; Fri, 29 May 2020 00:05:48 -0700 (PDT) Received: from localhost ([::1]:60240 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ5P-0004ln-5o for importer@patchew.org; Fri, 29 May 2020 03:05:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4R-0003M7-IN for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:47 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33242) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4Q-0000qx-OC for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:47 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 3A68ECD461; Fri, 29 May 2020 10:04:45 +0300 (MSK) Subject: [PATCH v3 02/11] tests/acceptance: refactor boot_linux_console test to allow code reuse From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:04:44 +0300 Message-ID: <159073588490.20809.13942096070255577558.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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..12725d4529 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 LinuxKernelTest(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(LinuxKernelTest): + """ + 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 Thu May 16 08:13:54 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=1590736054; cv=none; d=zohomail.com; s=zohoarc; b=nlDuDG5fjebEFKbxe9yj4w2NddsmSmjPl5Kp+lwNvz3J2bJGEoeRWcUbltTOQ+VVr3fPsYKNBormzNIA+HsI8xAhWIt43cYQSecUOULB0aSAYF7yu3LVMFcAkROvmWrXzuLsj94iLvjm9S4nOiD+M1guQkzQouxP+4foONrAcpc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736054; 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=j3zm6eVEt7AWl2AOC40pBaAVJ0kKz/G15IQO6ZdOlM8=; b=oDHtfivsxcAWvh65/bwcrBfyHAostQYV5AAPIEp2l0Vftx8jc1lKHclKeMwwfLnmGUUO58u3+rjHAMrxRcZ/DWnjvIS/V8sRp1pvhKjgjpkOWMxgh9F3XDTpziYP9UI4x66ZjTBgaTZfeAIjeyeeTE+0tsKfla+niqt4ZKIvu94= 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 1590736054072774.7995511574574; Fri, 29 May 2020 00:07:34 -0700 (PDT) Received: from localhost ([::1]:38172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ76-00080a-SR for importer@patchew.org; Fri, 29 May 2020 03:07:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4X-0003YV-Ct for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:53 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33260) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4W-0000uk-Aq for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:53 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 483FCCD460; Fri, 29 May 2020 10:04:51 +0300 (MSK) Subject: [PATCH v3 03/11] tests/acceptance: add base class record/replay kernel tests From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:04:51 +0300 Message-ID: <159073589099.20809.14078431743098373301.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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) v3: - added logging (suggested by Philippe Mathieu-Daud=C3=A9) 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..77678760be --- /dev/null +++ b/tests/acceptance/replay_kernel.py @@ -0,0 +1,73 @@ +# 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 logging +import time + +from avocado_qemu import wait_for_console_pattern +from avocado.utils import process +from avocado.utils import archive +from boot_linux_console import LinuxKernelTest + +class ReplayKernel(LinuxKernelTest): + """ + 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 + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D1 panic=3D-1 ' + + def run_vm(self, kernel_path, kernel_command_line, console_pattern, + record, shift, args, replay_path): + logger =3D logging.getLogger('replay') + start_time =3D time.time() + vm =3D self.get_vm() + vm.set_console() + if record: + logger.info('recording the execution...') + mode =3D 'record' + else: + logger.info('replaying the execution...') + mode =3D 'replay' + vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % + (shift, mode, replay_path), + '-kernel', kernel_path, + '-append', kernel_command_line, + '-net', 'none', + '-no-reboot') + if args: + vm.add_args(*args) + vm.launch() + self.wait_for_console_pattern(console_pattern, vm) + if record: + vm.shutdown() + logger.info('finished the recording with log size %s bytes' + % os.path.getsize(replay_path)) + else: + vm.wait() + logger.info('successfully fihished the replay') + elapsed =3D time.time() - start_time + logger.info('elapsed time %.2f sec' % elapsed) + return elapsed + + def run_rr(self, kernel_path, kernel_command_line, console_pattern, + shift=3D7, args=3DNone): + replay_path =3D os.path.join(self.workdir, 'replay.bin') + t1 =3D self.run_vm(kernel_path, kernel_command_line, console_patte= rn, + True, shift, args, replay_path) + t2 =3D self.run_vm(kernel_path, kernel_command_line, console_patte= rn, + False, shift, args, replay_path) + logger =3D logging.getLogger('replay') + logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) From nobody Thu May 16 08:13:54 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=1590736068; cv=none; d=zohomail.com; s=zohoarc; b=HB71hvVBa7OIQ3H2MNaCtWge8rOA8ZkNFdfSYZWbCNmmI3D47lVVtx5nJuM/aRlVBbDkJEZ88pdrM25sMnL6lV3hgLM3tSFN3SHxRiy+LL9DHmcEygIxyicooTo7f9o90BeaNDIW4usc/hy0CCf9P9QF3y3kCakPS/0yiEW1TE0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736068; 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=SgswTr9VMInY5ArfUuC129BlNKrIEl46uhfP1Ynbo7A=; b=YNFX+/n7CzEzHF+C9z/7OoRuG6PcMt8Z4kOlnAGKEtAGy4zsG9x+Kt00RTxbRMrMwTmUNTq3f/liZ1O7TX7rc/AXFgXHuqma6v553ZQPQp0DkvmBH2z3HhDCSPtsTFhiLCTsAUStIvQ5kNxDaCBF7Ho1L+hrxWNiUuS8rE4MVug= 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 1590736068661491.51322614559786; Fri, 29 May 2020 00:07:48 -0700 (PDT) Received: from localhost ([::1]:39152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ7L-0008OR-Eb for importer@patchew.org; Fri, 29 May 2020 03:07:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40766) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4c-0003ka-Vc for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:58 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33288) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4c-0000yp-2v for qemu-devel@nongnu.org; Fri, 29 May 2020 03:04:58 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 10CA0CD460; Fri, 29 May 2020 10:04:56 +0300 (MSK) Subject: [PATCH v3 04/11] tests/acceptance: add kernel record/replay test for x86_64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:04:56 +0300 Message-ID: <159073589656.20809.14010247947948822435.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 77678760be..5b32126e27 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -71,3 +71,19 @@ class ReplayKernel(LinuxKernelTest): False, shift, args, replay_path) logger =3D logging.getLogger('replay') logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) + + 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 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) From nobody Thu May 16 08:13:54 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=1590736056; cv=none; d=zohomail.com; s=zohoarc; b=f54WULPU9yBSr70+/FhpAYvEwoeNk8PhB9mRyCTImJqz0KD31nocfXfYKdp3oeOfx8UaWR3iL4BrGWMuo8qzPfX0+FcCgHT6JL/JROXY4mQG044gmzeG/losfzCuiWKMxBa5HD/0PovtRD7gPTMlgt4lYGpRSZjcnkmvZD7iiWw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736056; 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=55G5nl5BnVQwpTnUQZY69gplzg/EeO+P62S+yt2hfFE=; b=UaiF8/VllDVVogz4vVwK9ChRCoLVjsl+ZGrGZLd1dlC5piyUir8T7lf7csPN0vhqnFas59f47Su/95Y1b9QqVdkxyS69WwWUwdGACTLhn8M68OhYXHBxl2swlOcKh3NG6HR+yME7mHBSw2nY4QQ7XNSIh9clNGJKQ+lauHF2erM= 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 1590736056781442.6271220553946; Fri, 29 May 2020 00:07:36 -0700 (PDT) Received: from localhost ([::1]:38422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ79-00086i-H3 for importer@patchew.org; Fri, 29 May 2020 03:07:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4i-0003wB-Hd for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:04 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33308) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4h-00011z-KS for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:04 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 8E6A6CD461; Fri, 29 May 2020 10:05:02 +0300 (MSK) Subject: [PATCH v3 05/11] tests/acceptance: add record/replay test for aarch64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:02 +0300 Message-ID: <159073590231.20809.9842179251741585482.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 -- v3: - added cpu tag for the test (suggested by Philippe Mathieu-Daud=C3=A9) Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index 5b32126e27..616d2dfc33 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -87,3 +87,22 @@ class ReplayKernel(LinuxKernelTest): console_pattern =3D 'VFS: Cannot open root device' =20 self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D5) + + def test_aarch64_virt(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + :avocado: tags=3Dcpu:cortex-a53 + """ + 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 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, + args=3D('-cpu', 'cortex-a53')) From nobody Thu May 16 08:13:54 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=1590736171; cv=none; d=zohomail.com; s=zohoarc; b=YzIKe8OZ/yZ/2qJQ/Z8uTR2ubweWJkvb4Avz+rqaeVrSa2+qqitErAmOMkMi5BmpX52Do66rfLvZaGwh7CAunZ5DRD7t6NlAd4dPqnKqPp3ce/RvRSNCK3FPSti0S1Odb1SSeOusiVG5VL/LCnR6N5m9nKosnXlq1zRFetagOlQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736171; 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=qWBdp+pXC+m6JQaRO2aKt869zh5LjbHmQODa6H+PVVY=; b=nSK0y+IDyqOcXHoQW8NtOv/Yyxfu3NZub/H7VD1yYHi1rV4B82jbLngJ/XC7QwFvKKCB3B/tp1Vy/vxIpmerSOrmA7T/OLGYEwHetF28KyrJ7LJsp3OiqbCSJsKzm3SvM/w/FB8+tWz133jAPAZbWbrFVK0lwfOkHH4xx+KlJzQ= 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 1590736171346199.46014931331035; Fri, 29 May 2020 00:09:31 -0700 (PDT) Received: from localhost ([::1]:45406 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ90-0002tm-4D for importer@patchew.org; Fri, 29 May 2020 03:09:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4o-0004Aj-Ky for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:10 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33316) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4n-00016s-G0 for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:10 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 53E21CD461; Fri, 29 May 2020 10:05:08 +0300 (MSK) Subject: [PATCH v3 06/11] tests/acceptance: add record/replay test for arm From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:07 +0300 Message-ID: <159073590785.20809.17654573764167037499.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 616d2dfc33..382f1248e0 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -106,3 +106,49 @@ class ReplayKernel(LinuxKernelTest): =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 'VFS: Cannot open root device' + + self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D1) + + 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, shi= ft=3D1, + args=3D('-dtb', dtb_path, '-initrd', initrd_path, '-no-reboot'= )) From nobody Thu May 16 08:13:54 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=1590736238; cv=none; d=zohomail.com; s=zohoarc; b=F1mrg5ym1Gbe9qk2hHDnyq+LD6Vc4h+069+Z9FJjbVZCMY4kqVLqch5xa7ENpVAJSPv2HuZ+6Kr+BvwkO0yPDpPUsdru7HMtzV5SxLKSvHd7S8NYjdU/IlRGT/rHG2wVpMZvVxmtf0cYlnWsjajUcWbaCkEALW4Zs7F8AdPHCyk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736238; 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=Kua0XQ4xkixerdsHVUxN+xRo0ksiaXhF4atErt2vXtw=; b=JhS8FmoTIfOF8jwLYpARwmC1DLlGvZhKy6gLzT8yKrDyAYNoURtVJojED+XkxN2F8zlWei+1pQ30meRnxGnILb9R0YifYrC2qhBEq4uJx1n7PQ+nRtVvjng911ni8usp+FewkD4NJ45Mqt7sgSb7r/XJ+0+4McvotXh5w4P1ceg= 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 1590736238096617.6305520896512; Fri, 29 May 2020 00:10:38 -0700 (PDT) Received: from localhost ([::1]:50708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZA4-0005yx-O7 for importer@patchew.org; Fri, 29 May 2020 03:10:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ4u-0004NL-QX for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:16 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33344) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4t-0001Fa-U1 for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:16 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id D264CCD461; Fri, 29 May 2020 10:05:14 +0300 (MSK) Subject: [PATCH v3 07/11] tests/acceptance: add record/replay test for ppc64 From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:13 +0300 Message-ID: <159073591363.20809.15658672985367330140.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 382f1248e0..738367849f 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -152,3 +152,19 @@ class ReplayKernel(LinuxKernelTest): console_pattern =3D 'Boot successful.' self.run_rr(kernel_path, kernel_command_line, console_pattern, shi= ft=3D1, 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' + # icount is not good enough for PPC64 for complete boot yet + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.run_rr(kernel_path, kernel_command_line, console_pattern) From nobody Thu May 16 08:13:54 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=1590736324; cv=none; d=zohomail.com; s=zohoarc; b=AU+hjQbWhMCIa9xVFXYLXOT+AndWSgd/q6255mkBqDF+/2iwsQL467ULCu2YaMU/CYgqj718Sv2urpTFDGsCFJzTF5Xio9S5GPaBgUUiIV4UOTpqIXJuBWjSm/L4XQgjqmN4GOhNfc9R9GtxHAhuLx33SDugvJRvdPUjliiCgiQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736324; 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=6IEvMbq4yvmobuSPG0GtnVdzk26oZP2bY18J1eskAj0=; b=IYHrWdVX+/MthJJ0PTiZ1KQYWd1FE4bQFE6OcRpokc5co6Sdf7vk1JgxcSjUarbIc9/qFEAdlRQz0g6s9P1ZBjH62JjWwVMot8nR1d+4OuQCpz5KuT3XFhP3jPLy4smdCSyhFrJHRe8AlFIHagtUh6QHRZLeRFwptnSyTDN3sMc= 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 1590736324367743.4439750463259; Fri, 29 May 2020 00:12:04 -0700 (PDT) Received: from localhost ([::1]:53744 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZBT-0007KE-73 for importer@patchew.org; Fri, 29 May 2020 03:12:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ51-0004Vb-IM for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:23 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33368) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ4z-0001KV-Ls for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:22 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 9352FCD461; Fri, 29 May 2020 10:05:20 +0300 (MSK) Subject: [PATCH v3 08/11] tests/acceptance: add record/replay test for m68k From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:20 +0300 Message-ID: <159073592033.20809.1838967871297177313.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 Reviewed-by: Laurent Vivier Tested-by: Philippe Mathieu-Daude --- 0 files changed diff --git a/tests/acceptance/replay_kernel.py b/tests/acceptance/replay_ke= rnel.py index 738367849f..c1ec002db6 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -168,3 +168,21 @@ class ReplayKernel(LinuxKernelTest): # icount is not good enough for PPC64 for complete boot yet 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 Thu May 16 08:13:54 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=1590736162; cv=none; d=zohomail.com; s=zohoarc; b=VPpJQrygx6JQTgRYf30NzXLplm2CVJM2rObY3ktBBlG9XmiQ2ItZvjjXqBSmU/2XuBrt6rb5D1bgV1i4pf64fUG3s4ByB3IpM1LGHoSHCVems5CxcBpQyLgdchehprB8r31tKvzG0VGzR6cpaEwqdT2KrRBhKjE2O7XRlxtOM7c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736162; 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=UQte9G8cQdk9sfsbA+RGwFV2kSSY7/a2Svk7JpWPg18=; b=FX3eWIjIjN8QNff8i5zAxSswFkci5DsMFu1rHn7+nxMa9MnKmM77uK4vfyonWtoGZxkXfPbXARP/6ugQ1lpHOm82Qf4JL6ZYqKyorOv6yAwr65infJVpdg/3GYq2kFVcmHCwfHbEwFQgSnzakHwIqErZLAUTBO+LWnva9xgZEJ0= 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 1590736162033248.10584320029352; Fri, 29 May 2020 00:09:22 -0700 (PDT) Received: from localhost ([::1]:44516 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ8q-0002X1-Ql for importer@patchew.org; Fri, 29 May 2020 03:09:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ56-0004hu-Oh for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:28 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33386) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ55-0001R8-G0 for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:28 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 60967CD461; Fri, 29 May 2020 10:05:26 +0300 (MSK) Subject: [PATCH v3 09/11] tests/acceptance: record/replay tests with advcal images From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:25 +0300 Message-ID: <159073592589.20809.5156301499042635614.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 c1ec002db6..bc21ddf082 100644 --- a/tests/acceptance/replay_kernel.py +++ b/tests/acceptance/replay_kernel.py @@ -186,3 +186,108 @@ class ReplayKernel(LinuxKernelTest): '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 Thu May 16 08:13:54 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=1590736230; cv=none; d=zohomail.com; s=zohoarc; b=oF1bzXUI6I4+QR7hAy8pxQVIvTKGy3uT0OVPEiKi/PDi+hh72tZvnmOcI6+hQ4Ayoq9Xms+1Ud8Djr/UvIvG8Y66rakf7s8iKjzzJj8Wf5EZfACYWSAPiOi357M0AlgrK97MDrjBNZw8lwImiubJAhyIy9vtG6MKiQ+4sdWitL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736230; 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=iH7mZEimpnIHr5+S7xD3x23l9H6ty+06WZkCgrgmtJA6wfVYhJHYblSNzlk75RoFibQAFqG1lumpDojkgmbfJR/aUB06IT86UID4txkexZJscULGuB3wZD9K1bcsV4wRdJ997Fu2mk2j9ZEhRB1Hr0WhtwBbkN4OhcNstaP79xs= 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 1590736230232594.1510496990984; Fri, 29 May 2020 00:10:30 -0700 (PDT) Received: from localhost ([::1]:50146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ9w-0005bI-Tu for importer@patchew.org; Fri, 29 May 2020 03:10:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ5D-0004z6-4H for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:35 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ5B-0001Ve-BA for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:34 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id 35540CD461; Fri, 29 May 2020 10:05:32 +0300 (MSK) Subject: [PATCH v3 10/11] tests/acceptance: refactor boot_linux to allow code reuse From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:31 +0300 Message-ID: <159073593167.20809.17582679291556188984.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: Philippe Mathieu-Daude Tested-by: Philippe Mathieu-Daud=C3=A9 --- 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 Thu May 16 08:13:54 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=1590736432; cv=none; d=zohomail.com; s=zohoarc; b=hkRH+7LyrtGEKHkfAt1WGpAvZDhm2KVHBwgYCoVb7KsQeU8satS/nL7nj5+RKIf8KUXh6jnCe+btNig3ePkbBP7vnnx3kjSl/784zN8YvtRbBOpDnH5Ty9Q+1Q+xg2PDpJMajwcCUiGQ9VZtetwdCz2QF/M7g31Qhf4C+CgeMHo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590736432; 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=N+axBw0waGw1SijRXjARwDozhAOIpvJ/S5Ks6nAlDFY=; b=MEltnGZNMtGXN0Z/ndREW5HjbH3DAuQ/xairwCAOgvN7Md+La+pDWtqzPRaVyyTyv38SPEBs9cccgjRtgAAxzEMbYpz0vHgPXTpoM+WJp/qYaD5k56yXJYsLoep7tSDQRVI/VhQQOtsQV6A3khwf7+4SaJhng3XZYXfH3DfDdMg= 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 1590736432727993.047656768671; Fri, 29 May 2020 00:13:52 -0700 (PDT) Received: from localhost ([::1]:58726 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZDD-0000zr-AF for importer@patchew.org; Fri, 29 May 2020 03:13:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jeZ5I-0005Gc-Iy for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:40 -0400 Received: from mail.ispras.ru ([83.149.199.45]:33430) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jeZ5G-0001cY-Rq for qemu-devel@nongnu.org; Fri, 29 May 2020 03:05:40 -0400 Received: from [127.0.1.1] (unknown [62.118.151.149]) by mail.ispras.ru (Postfix) with ESMTPSA id C016CCD461; Fri, 29 May 2020 10:05:37 +0300 (MSK) Subject: [PATCH v3 11/11] tests/acceptance: Linux boot test for record/replay From: Pavel Dovgalyuk To: qemu-devel@nongnu.org Date: Fri, 29 May 2020 10:05:37 +0300 Message-ID: <159073593747.20809.8077489762546010193.stgit@pasha-ThinkPad-X280> In-Reply-To: <159073587336.20809.5404476664125786279.stgit@pasha-ThinkPad-X280> References: <159073587336.20809.5404476664125786279.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/29 01:56:22 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, ehabkost@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..328b03bb33 --- /dev/null +++ b/tests/acceptance/replay_linux.py @@ -0,0 +1,114 @@ +# 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 +import logging +import time + +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) + logger =3D logging.getLogger('replay') + if record: + logger.info('recording the execution...') + mode =3D 'record' + else: + logger.info('replaying the execution...') + mode =3D 'replay' + replay_path =3D os.path.join(self.workdir, 'replay.bin') + vm.add_args('-icount', 'shift=3D%s,rr=3D%s,rrfile=3D%s' % + (shift, mode, replay_path)) + + start_time =3D time.time() + + vm.set_console() + vm.launch() + console_drainer =3D datadrainer.LineLogger(vm.console_socket.filen= o(), + logger=3Dself.log.getChild('console'), + stop_check=3D(lambda : not vm.is_runni= ng())) + console_drainer.start() + if record: + cloudinit.wait_for_phone_home(('0.0.0.0', self.phone_home_port= ), + self.name) + vm.shutdown() + logger.info('finished the recording with log size %s bytes' + % os.path.getsize(replay_path)) + else: + vm.wait() + logger.info('successfully fihished the replay') + elapsed =3D time.time() - start_time + logger.info('elapsed time %.2f sec' % elapsed) + return elapsed + + def run_rr(self, args=3DNone, shift=3D7): + t1 =3D self.launch_and_wait(True, args, shift) + t2 =3D self.launch_and_wait(False, args, shift) + logger =3D logging.getLogger('replay') + logger.info('replay overhead {:.2%}'.format(t2 / t1 - 1)) + +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)