From nobody Sun May 19 11:31:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248299; cv=none; d=zoho.com; s=zohoarc; b=Gg8p2/8imq7ytmKmSOqTygTHeFb96JLtQcHbkXgHcTl/Fjt2i8x2631c30NxQsVDynjJ7xMsmhSySMAOgdsK93v0Wn7y1Iq9hQR1LPn/RVcE09Yplb0PX+S4piqyUkOc5a/t5PIe2pKfUGewwQ2rtACgspqhiPRMj3SJCh1XIgs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248299; 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=Yvw2J3ollyMphZf82vDph7Fzyi7IG8VsyilfeuEc+RI=; b=CnM7iNBvDuwaGkhHTMqAHMXOD4H/rQ9QnpzJso4EEfnMUPIqroTvt/05MzlyR7QxORJuwMGNoqXlPjy5H0WeTMog2leQMhyjyP3q7HGfjE0AyY76Rq+UjS4D2gABDCu2D0C7KfE2DOQw6aqECqhJvfTE87B9gtBR+ImtfzXNqIA= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248299896115.62382924847418; Mon, 28 Oct 2019 00:38:19 -0700 (PDT) Received: from localhost ([::1]:51390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbW-0006dC-CQ for importer@patchew.org; Mon, 28 Oct 2019 03:38:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46442) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzYT-00010X-8W for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzYS-0001ya-4o for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:09 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:49262 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzYS-0001yD-16 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:08 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-39-BRlYsK8HOcqhInEkyZH1nA-1; Mon, 28 Oct 2019 03:35:02 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 49D0480183E; Mon, 28 Oct 2019 07:35:01 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E8AAD19C69; Mon, 28 Oct 2019 07:34:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Yvw2J3ollyMphZf82vDph7Fzyi7IG8VsyilfeuEc+RI=; b=REvqimc7HS0JSk/hZ7SoTGmrHK4aAPkoKm6H+d6lMCbt5Zifj8vOQKVdbkV8ZblrXnP9BL EJmIhLTbpU99rq1NLI7NzrmxgEskORUJ1Y1h+A1vAV8gy4vbHdloTOTM75VqCCtNmSCc4f WUFfWwb1l4F5QqIZf3nXHeT6oL9lbGE= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 01/26] python/qemu/machine: Allow to use other serial consoles than default Date: Mon, 28 Oct 2019 08:34:16 +0100 Message-Id: <20191028073441.6448-2-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: BRlYsK8HOcqhInEkyZH1nA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Currently the QEMU Python module limits the QEMUMachine class to use the first serial console. Some machines/guest might use another console than the first one as the 'boot console'. For example the Raspberry Pi uses the second (AUX) console. To be able to use the Nth console as default, we simply need to connect all the N - 1 consoles to the null chardev. Add an index argument, so we can use a specific serial console as default. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: - renamed 'console_index', added docstring (Cleber) - reworded description (pm215) --- python/qemu/machine.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 128a3d1dc2..6fa68fa35a 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -235,6 +235,8 @@ class QEMUMachine(object): '-display', 'none', '-vga', 'none'] if self._machine is not None: args.extend(['-machine', self._machine]) + for i in range(self._console_index): + args.extend(['-serial', 'null']) if self._console_set: self._console_address =3D os.path.join(self._temp_dir, self._name + "-console.so= ck") @@ -495,7 +497,7 @@ class QEMUMachine(object): """ self._machine =3D machine_type =20 - def set_console(self, device_type=3DNone): + def set_console(self, device_type=3DNone, console_index=3D0): """ Sets the device type for a console device =20 @@ -516,9 +518,14 @@ class QEMUMachine(object): chardev:console" command line argument will be used instead, resorting to the machine's default device type. + @param console_index: the index of the console device to use. + If not zero, the command line will create + 'index - 1' consoles and connect them to + the 'null' backing character device. """ self._console_set =3D True self._console_device_type =3D device_type + self._console_index =3D console_index =20 @property def console_socket(self): --=20 2.21.0 From nobody Sun May 19 11:31:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248487; cv=none; d=zoho.com; s=zohoarc; b=Eiqpv6YN3XmVWytCV2UQfwlxYndrM/R23+MIKRwz/rfZTVBDhzBQwaG3xPKo4mUn2nGoDWZn4xEGoXk/DQ850C0xAAiYrn15z+htxMUV2zxBJvd0MrmzjR13UgLJ9u5UKJxQCzyNVNEHkcbYBz0HtrZ1vpMum+U9KHsoU4ewpoQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248487; 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=RKoqjwESQJSXm60q5qIxM6TUqfeUYMlXxlzdFU4HRg4=; b=G4BAp02RmSHEuMkUwLAVOuIdak9YWnwgEjs1sYrnFYb5dXhHstXWxwMfHPEk7EOSjvViWELvRmdICgvJsORnrAyG/8luaApXhAoSZJaE0BPvipzvkKIdjgEPUEyiVYDgpeCQB1C72lEzwiGICeG+XVEZKRZmLsTwSbIdTPZw5U8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248487285460.9834074954499; Mon, 28 Oct 2019 00:41:27 -0700 (PDT) Received: from localhost ([::1]:51442 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzeU-0002m0-TN for importer@patchew.org; Mon, 28 Oct 2019 03:41:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46475) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzYh-0001c2-Hz for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzYg-00029I-1s for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:23 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:54076 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzYf-00028x-TT for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:22 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-DdUtgpYLMk-lxZEQO3BidQ-1; Mon, 28 Oct 2019 03:35:17 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D05D7476; Mon, 28 Oct 2019 07:35:15 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0D74419C69; Mon, 28 Oct 2019 07:35:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248121; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=RKoqjwESQJSXm60q5qIxM6TUqfeUYMlXxlzdFU4HRg4=; b=TyPilkxN57PAj/7Hx94uyI9rtEIi24nYOcmR5c26TX65RMJqfdqaFCjNkWuCb1vLC8kJpZ 2bqZ632PHEoc+AC1hVSBlCRrXi6sf9UdPhUlEltR7eMkbbkXgiikqv3aGZ5/w83CdmcUVm Q864iKo/12u1D+cPrC/1R4RC7yJ4UTE= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 02/26] Acceptance tests: refactor wait_for_console_pattern Date: Mon, 28 Oct 2019 08:34:17 +0100 Message-Id: <20191028073441.6448-3-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: DdUtgpYLMk-lxZEQO3BidQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Cleber Rosa The same utility method is already present in two different test files, so let's consolidate it into a single utility function. Signed-off-by: Cleber Rosa Message-Id: <20190916164011.7653-1-crosa@redhat.com> Reviewed-by: Philippe Mathieu-Daud=C3=A9 [PMD: failure_message is optional] Reviewed-by: David Gibson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 25 +++++++++++++++++++++ tests/acceptance/boot_linux_console.py | 27 +++++------------------ tests/acceptance/linux_ssh_mips_malta.py | 18 +++------------ 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index bd41e0443c..e3101cba30 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -8,6 +8,7 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 +import logging import os import sys import uuid @@ -53,6 +54,30 @@ def pick_default_qemu_bin(arch=3DNone): return qemu_bin_from_src_dir_path =20 =20 +def wait_for_console_pattern(test, success_message, failure_message=3DNone= ): + """ + Waits for messages to appear on the console, while logging the content + + :param test: an Avocado test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`avocado_qemu.Test` + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + console =3D test.vm.console_socket.makefile() + console_logger =3D logging.getLogger('console') + while True: + msg =3D console.readline().strip() + if not msg: + continue + console_logger.debug(msg) + if success_message in msg: + break + if failure_message and failure_message in msg: + fail =3D 'Failure message found in console: %s' % failure_mess= age + test.fail(fail) + + class Test(avocado.Test): def setUp(self): self._vms =3D {} diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 8a9a314ab4..8897e0c253 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -9,12 +9,12 @@ # later. See the COPYING file in the top-level directory. =20 import os -import logging import lzma import gzip import shutil =20 from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive =20 @@ -29,31 +29,14 @@ class BootLinuxConsole(Test): =20 KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 - def wait_for_console_pattern(self, success_message, - failure_message=3D'Kernel panic - not syn= cing'): - """ - Waits for messages to appear on the console, while logging the con= tent - - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - """ - console =3D self.vm.console_socket.makefile() - console_logger =3D logging.getLogger('console') - while True: - msg =3D console.readline().strip() - if not msg: - continue - console_logger.debug(msg) - if success_message in msg: - break - if failure_message in msg: - fail =3D 'Failure message found in console: %s' % failure_= message - self.fail(fail) + def wait_for_console_pattern(self, success_message): + wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing') =20 def exec_command_and_wait_for_pattern(self, command, success_message): command +=3D '\n' self.vm.console_socket.sendall(command.encode()) - self.wait_for_console_pattern(success_message) + wait_for_console_pattern(self, success_message) =20 def extract_from_deb(self, deb, path): """ diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index aa12001942..fc13f9e4d4 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -13,6 +13,7 @@ import time =20 from avocado import skipUnless from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive from avocado.utils import ssh @@ -69,19 +70,6 @@ class LinuxSSH(Test): def setUp(self): super(LinuxSSH, self).setUp() =20 - def wait_for_console_pattern(self, success_message, - failure_message=3D'Oops'): - console =3D self.vm.console_socket.makefile() - console_logger =3D logging.getLogger('console') - while True: - msg =3D console.readline() - console_logger.debug(msg.strip()) - if success_message in msg: - break - if failure_message in msg: - fail =3D 'Failure message found in console: %s' % failure_= message - self.fail(fail) - def get_portfwd(self): res =3D self.vm.command('human-monitor-command', command_line=3D'info usernet') @@ -137,7 +125,7 @@ class LinuxSSH(Test): =20 self.log.info('VM launched, waiting for sshd') console_pattern =3D 'Starting OpenBSD Secure Shell server: sshd' - self.wait_for_console_pattern(console_pattern) + wait_for_console_pattern(self, console_pattern, 'Oops') self.log.info('sshd ready') =20 self.ssh_connect('root', 'root') @@ -145,7 +133,7 @@ class LinuxSSH(Test): def shutdown_via_ssh(self): self.ssh_command('poweroff') self.ssh_disconnect_vm() - self.wait_for_console_pattern('Power down') + wait_for_console_pattern(self, 'Power down', 'Oops') =20 def ssh_command_output_contains(self, cmd, exp): stdout, _ =3D self.ssh_command(cmd) --=20 2.21.0 From nobody Sun May 19 11:31:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248671; cv=none; d=zoho.com; s=zohoarc; b=Fl86Dm4XvUceaEi9Lzumm6Yb3hk/ySh0mfyGrr9Pco3FoiKwZ7BpgQ5UYvlbso47oXGSOXRbR9yhXCRbIGGogaiNbVRgvpGXClfOnYVUbh+ZWJ5NJ+pcJ1whvr5AzHcO4s2LRSCzG4+WyueQtI1CvlKe2o/92LDgIBTrsmbGyVI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248671; 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=fg11aaXaqHLxSJIZyJTQtX0Qnlb6bB7YA2Bzgn6hS9o=; b=CC0AezmuYeXUdFWe2ZwE853NCkukEJplb4KIG3KjeGgAqz4n8DUjAAPaoO5uinR1DZkRus3yU34fPQsuKvyH561fotmsWOjYrh3Uj459craHtAfMNxUsyh5Gm19KybZzrND26tLBLrSVQHAvom2uG8lD9dZYWLXsOtE8vfxb92M= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 157224867131776.99350506228507; Mon, 28 Oct 2019 00:44:31 -0700 (PDT) Received: from localhost ([::1]:51466 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzhT-0000DR-0W for importer@patchew.org; Mon, 28 Oct 2019 03:44:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46492) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzYl-0001mw-K4 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzYk-0002Ax-LL for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:27 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:49799 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzYk-0002Aa-HX for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:26 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-354-r3Cvr07bNgSJYn_rXgmeDA-1; Mon, 28 Oct 2019 03:35:22 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 88486800D41; Mon, 28 Oct 2019 07:35:21 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 91F6119C69; Mon, 28 Oct 2019 07:35:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fg11aaXaqHLxSJIZyJTQtX0Qnlb6bB7YA2Bzgn6hS9o=; b=bRIBHArj9K09zSs+0+si27Ip971guMahmktQmj2IeeUV0RyWuOEKLMNAXoVohjr/262aj6 8JhhQDHWLENX7JSNo/QUH/kvWTrbWa5/HkibUIx/A3fvX65hvqbtexREVEMjST8G6ezXZS VQsaicLJGB+vCqImxZokUc3n6wnhgRQ= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 03/26] tests/acceptance: Fixe wait_for_console_pattern() hangs Date: Mon, 28 Oct 2019 08:34:18 +0100 Message-Id: <20191028073441.6448-4-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: r3Cvr07bNgSJYn_rXgmeDA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Because of a possible deadlock (QEMU waiting for the socket to become writable) let's close the console socket as soon as we stop to use it. Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index e3101cba30..a0450e5263 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -74,6 +74,7 @@ def wait_for_console_pattern(test, success_message, failu= re_message=3DNone): if success_message in msg: break if failure_message and failure_message in msg: + console.close() fail =3D 'Failure message found in console: %s' % failure_mess= age test.fail(fail) =20 --=20 2.21.0 From nobody Sun May 19 11:31:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248891; cv=none; d=zoho.com; s=zohoarc; b=Mc074uhiuDpN2RKQTAve7pra3dDh3V/YcHvKhURnmwmqvrCyzrZk1/Wt+Mag3UFE9thZ3lQqpX2Ifv6x6AXoMhFC8sFNUK1dVtRr2X79iFDwZ3qMyGK4HYRJPdFBsarhVjvgTEDQRBv7FD6AXNo9udcgZ3FsQoTVHaC1lkwICpE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248891; 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=7GxrTUQOCLeI+XFVHO5OYeZmEqpcRFfy51AxyDKx1nM=; b=it3Oa2Ubt9xdK8czUpapq7JnUZK5Mo6b5N+S549NwGM7e4YuxHw7SOpxj5Q/YJP7Djr5AlPcuVUManWmqOUELYUNaGO8n0NmqJt5OoTrSFaehVG+N2rvUBd6xEsrY9tHUkU8ORKEuH4w358goGa421wzEA+oViUozs8aHDCHn2s= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248891073215.97937616263118; Mon, 28 Oct 2019 00:48:11 -0700 (PDT) Received: from localhost ([::1]:51498 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzl3-0006nb-7x for importer@patchew.org; Mon, 28 Oct 2019 03:48:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46517) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzYt-0002Fz-BM for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzYs-0002HL-Aq for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:35 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35126 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzYs-0002Gy-6b for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:34 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-168-zgF8X7oMOm6aLPxGdUBLBg-1; Mon, 28 Oct 2019 03:35:29 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 13CA0476; Mon, 28 Oct 2019 07:35:28 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 49DAC19C69; Mon, 28 Oct 2019 07:35:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248133; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7GxrTUQOCLeI+XFVHO5OYeZmEqpcRFfy51AxyDKx1nM=; b=XhNnu9tQm6AEQ9MEjWjOLyGNH8RvJiLhqLZ/kP4TvaOY6pKji/RsV+lh8QfoQnYNGhTmtC HKGqXTkx47pPbZXCj1evH9kFJcTDC6agzuglp7rq3xibtQKsfuIJnRhL8H9shJ9S3YUbi8 SiD9B9/XsFV+MxcESxeFbpXfWq4Fkz8= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 04/26] tests/acceptance: Send on serial lines Date: Mon, 28 Oct 2019 08:34:19 +0100 Message-Id: <20191028073441.6448-5-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: zgF8X7oMOm6aLPxGdUBLBg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Some firmwares don't parse the control character and expect a . Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- since previous: do not send NewLine --- tests/acceptance/boot_linux_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 8897e0c253..f9b77af359 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -34,7 +34,7 @@ class BootLinuxConsole(Test): failure_message=3D'Kernel panic - not syn= cing') =20 def exec_command_and_wait_for_pattern(self, command, success_message): - command +=3D '\n' + command +=3D '\r' self.vm.console_socket.sendall(command.encode()) wait_for_console_pattern(self, success_message) =20 --=20 2.21.0 From nobody Sun May 19 11:31:03 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248239; cv=none; d=zoho.com; s=zohoarc; b=Td6Ph1j/rkjo6sGgGTaBnp/wOGNzoP0nXDjwoEoBtWnJEmZmRKFSwgVpGyTW31VDALunnsJAbJZjMThUyyWfPN1aMFKU0M1qooWeGdCW7apdFX0GlXH0zceQb1Z9U2l6YYXLTkjgwNWOT+tFa1jmGyn+2tUMGeAFEy4yu8qw8JA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248239; 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=qdlzS2f9QS5to3RqqnJkrW+4/KuEVpCzWPZ19K1R0TU=; b=aAxa55J0CIuSW5tfynh+Csq07Z0LNausciGpp2SW1nWEJEZTpb1sS5Max3w07ZbkmtT9DLVjQF9FXMbMbG2+2UtnO2Q0fUfb6D1EyZE/GhbhhrPlsYpKkrAvmf9QP5PtCbZYVh2hopGAaDPkJnrhaOEphgTZZeGth9xXv0054f4= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248239059321.35862047695605; Mon, 28 Oct 2019 00:37:19 -0700 (PDT) Received: from localhost ([::1]:51374 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzaX-0004Yh-Ka for importer@patchew.org; Mon, 28 Oct 2019 03:37:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46542) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZ5-0002eB-7K for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZ3-0002S2-U6 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:47 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:41281 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZ3-0002R0-Q7 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:45 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-ICEuQP9JOvuvltOmXZ_35w-1; Mon, 28 Oct 2019 03:35:40 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5663107AD29; Mon, 28 Oct 2019 07:35:38 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B674519C69; Mon, 28 Oct 2019 07:35:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248145; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qdlzS2f9QS5to3RqqnJkrW+4/KuEVpCzWPZ19K1R0TU=; b=dMhO/xYTV5XVl8XSFacDLpO64LbyvmfN0R3WMHnn+iFsapC7ftUcliRPoG9YJIqJgVIgHa uK1Y284U6itXOiaJASFIDfpzKrPx0D0srdz3i76DC5gTBntNHPJEPSFhWPxo755Db3PrAk 1pZm2WXAu1Iz8zqfPNshd9VdQqnAkDQ= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 05/26] tests/acceptance: Refactor exec_command_and_wait_for_pattern() Date: Mon, 28 Oct 2019 08:34:20 +0100 Message-Id: <20191028073441.6448-6-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ICEuQP9JOvuvltOmXZ_35w-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Refactor the exec_command_and_wait_for_pattern() utility method so we can reuse it in other files. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- v2: fix self -> test, failure_message is optional, added doc v3: reword because after rebasing only 1 file has to be modified --- tests/acceptance/avocado_qemu/__init__.py | 19 +++++++++++++++++++ tests/acceptance/boot_linux_console.py | 18 +++++++----------- 2 files changed, 26 insertions(+), 11 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index a0450e5263..bdece76723 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -79,6 +79,25 @@ def wait_for_console_pattern(test, success_message, fail= ure_message=3DNone): test.fail(fail) =20 =20 +def exec_command_and_wait_for_pattern(test, command, + success_message, failure_message=3DN= one): + """ + Send a command to a console (appending CRLF characters), then wait + for success_message to appear on the console, while logging the. + content. Mark the test as failed if failure_message is found instead. + + :param test: an Avocado test containing a VM that will have its console + read and probed for a success or failure message + :type test: :class:`avocado_qemu.Test` + :param command: the command to send + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + command +=3D '\r' + test.vm.console_socket.sendall(command.encode()) + wait_for_console_pattern(test, success_message, failure_message) + + class Test(avocado.Test): def setUp(self): self._vms =3D {} diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index f9b77af359..4b419b0559 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -14,6 +14,7 @@ import gzip import shutil =20 from avocado_qemu import Test +from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive @@ -33,11 +34,6 @@ class BootLinuxConsole(Test): wait_for_console_pattern(self, success_message, failure_message=3D'Kernel panic - not syn= cing') =20 - def exec_command_and_wait_for_pattern(self, command, success_message): - command +=3D '\r' - self.vm.console_socket.sendall(command.encode()) - wait_for_console_pattern(self, success_message) - def extract_from_deb(self, deb, path): """ Extracts a file from a deb package into the test workdir @@ -166,12 +162,12 @@ class BootLinuxConsole(Test): self.vm.launch() self.wait_for_console_pattern('Boot successful.') =20 - self.exec_command_and_wait_for_pattern('cat /proc/cpuinfo', - 'BogoMIPS') - self.exec_command_and_wait_for_pattern('uname -a', - 'Debian') - self.exec_command_and_wait_for_pattern('reboot', - 'reboot: Restarting system') + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'BogoMIPS') + exec_command_and_wait_for_pattern(self, 'uname -a', + 'Debian') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') =20 def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249048; cv=none; d=zoho.com; s=zohoarc; b=nGqObiEMylNP+H9kKPbpiQFVDXF7tNe1LpGKLDVKP1wQjhLxrx0JZmii7EBBpwgurdgiPwe5yhJbUs9Zmi87QtArCprn3Sz5IKryPnkJsAGmznZ4gQ5/zMjx5D/8pmmdphlCYEk3TdXpfFPPN/Q44KEpFeh8CV/aLvfbevsToyE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249048; 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=92ttrv4sh+t2xi9m+s8iAvluECykVdfEeL14/WUnnb0=; b=DiviPj757udNwuWZXXEDlMij427fFA3XChCg0OUhWR3yuTzch+7UUKupU2rjLCFoOOlSGZoYakScdSICZMgLtjAKQGCnBfGXFykAFy+M5bD4xO6IPl2ev5wtualkfaro3KvNDcdU2FbEdH+E/3zTLvNvQ4MndiJy1+2zqTii0s8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249048939609.4197632260567; Mon, 28 Oct 2019 00:50:48 -0700 (PDT) Received: from localhost ([::1]:51520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOznb-0004KZ-Hj for importer@patchew.org; Mon, 28 Oct 2019 03:50:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46554) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZA-0002oL-L2 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZ8-0002X1-Sa for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:52 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:55879 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZ8-0002WZ-OD for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-MTa3pYHcPQGPwv9UtGXTZA-1; Mon, 28 Oct 2019 03:35:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1421180183E; Mon, 28 Oct 2019 07:35:45 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C27C919C69; Mon, 28 Oct 2019 07:35:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=92ttrv4sh+t2xi9m+s8iAvluECykVdfEeL14/WUnnb0=; b=gsalv8MCssOwI8AckWb6mmY94yZ0aySeO3Fm4YVv8VHCme2pYu4319aTl2EVHDNEl2YGp8 nwkRJL2zhTpxEAmjqWw8uciP1gnXW6VtqRzZk8ExifP3UN+GD12wvETNSIxG7ixzGmRxpJ VzIopCM6wXqzh1eGGHLgqGPQtRZyfbo= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 06/26] tests/acceptance: Rename avocado_qemu.Test as MachineTest Date: Mon, 28 Oct 2019 08:34:21 +0100 Message-Id: <20191028073441.6448-7-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: MTa3pYHcPQGPwv9UtGXTZA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This class is used to test QEMU machines, rename it as MachineTest. This will allow us to add a UserTest class for qemu-user tests. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- docs/devel/testing.rst | 8 ++++---- tests/acceptance/avocado_qemu/__init__.py | 7 ++++++- tests/acceptance/boot_linux_console.py | 4 ++-- tests/acceptance/cpu_queries.py | 4 ++-- tests/acceptance/empty_cpu_model.py | 4 ++-- tests/acceptance/linux_initrd.py | 4 ++-- tests/acceptance/linux_ssh_mips_malta.py | 4 ++-- tests/acceptance/migration.py | 4 ++-- tests/acceptance/version.py | 4 ++-- tests/acceptance/virtio_version.py | 4 ++-- tests/acceptance/vnc.py | 4 ++-- 11 files changed, 28 insertions(+), 23 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 8e981e062d..d9fab83458 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -601,7 +601,7 @@ class. Here's a simple usage example: from avocado_qemu import Test =20 =20 - class Version(Test): + class Version(MachineTest): """ :avocado: tags=3Dquick """ @@ -625,7 +625,7 @@ in the current directory, tagged as "quick", run: =20 avocado run -t quick . =20 -The ``avocado_qemu.Test`` base test class +The ``avocado_qemu.MachineTest`` base test class ----------------------------------------- =20 The ``avocado_qemu.Test`` class has a number of characteristics that @@ -646,10 +646,10 @@ and hypothetical example follows: =20 .. code:: =20 - from avocado_qemu import Test + from avocado_qemu import MachineTest =20 =20 - class MultipleMachines(Test): + class MultipleMachines(MachineTest): """ :avocado: enable """ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index bdece76723..a2cc3d689b 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -100,7 +100,6 @@ def exec_command_and_wait_for_pattern(test, command, =20 class Test(avocado.Test): def setUp(self): - self._vms =3D {} arches =3D self.tags.get('arch', []) if len(arches) =3D=3D 1: arch =3D arches.pop() @@ -113,6 +112,12 @@ class Test(avocado.Test): if self.qemu_bin is None: self.cancel("No QEMU binary defined or found in the source tre= e") =20 + +class MachineTest(Test): + def setUp(self): + self._vms =3D {} + super().setUp() + def _new_vm(self, *args): vm =3D QEMUMachine(self.qemu_bin) if args: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 4b419b0559..f94dc4bbca 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -13,14 +13,14 @@ import lzma import gzip import shutil =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive =20 =20 -class BootLinuxConsole(Test): +class BootLinuxConsole(MachineTest): """ Boots a Linux kernel and checks that the console is operational and the kernel command line is properly passed from QEMU to the kernel diff --git a/tests/acceptance/cpu_queries.py b/tests/acceptance/cpu_queries= .py index af47d2795a..40df8264cf 100644 --- a/tests/acceptance/cpu_queries.py +++ b/tests/acceptance/cpu_queries.py @@ -10,9 +10,9 @@ =20 import logging =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 -class QueryCPUModelExpansion(Test): +class QueryCPUModelExpansion(MachineTest): """ Run query-cpu-model-expansion for each CPU model, and validate results """ diff --git a/tests/acceptance/empty_cpu_model.py b/tests/acceptance/empty_c= pu_model.py index 3f4f663582..a4e9cc62f8 100644 --- a/tests/acceptance/empty_cpu_model.py +++ b/tests/acceptance/empty_cpu_model.py @@ -8,9 +8,9 @@ # 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 subprocess -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 -class EmptyCPUModel(Test): +class EmptyCPUModel(MachineTest): def test(self): cmd =3D [self.qemu_bin, '-S', '-display', 'none', '-machine', 'non= e', '-cpu', ''] r =3D subprocess.run(cmd, stderr=3Dsubprocess.PIPE, stdout=3Dsubpr= ocess.PIPE) diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_init= rd.py index c61d9826a4..e8afb007d0 100644 --- a/tests/acceptance/linux_initrd.py +++ b/tests/acceptance/linux_initrd.py @@ -12,10 +12,10 @@ import logging import tempfile from avocado.utils.process import run =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 =20 -class LinuxInitrd(Test): +class LinuxInitrd(MachineTest): """ Checks QEMU evaluates correctly the initrd file passed as -initrd opti= on. =20 diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/li= nux_ssh_mips_malta.py index fc13f9e4d4..5db64affda 100644 --- a/tests/acceptance/linux_ssh_mips_malta.py +++ b/tests/acceptance/linux_ssh_mips_malta.py @@ -12,14 +12,14 @@ import logging import time =20 from avocado import skipUnless -from avocado_qemu import Test +from avocado_qemu import MachineTest from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive from avocado.utils import ssh =20 =20 -class LinuxSSH(Test): +class LinuxSSH(MachineTest): =20 timeout =3D 150 # Not for 'configure --enable-debug --enable-debug-tcg' =20 diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration.py index a44c1ae58f..3a823c9cc7 100644 --- a/tests/acceptance/migration.py +++ b/tests/acceptance/migration.py @@ -10,13 +10,13 @@ # later. See the COPYING file in the top-level directory. =20 =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 from avocado.utils import network from avocado.utils import wait =20 =20 -class Migration(Test): +class Migration(MachineTest): =20 timeout =3D 10 =20 diff --git a/tests/acceptance/version.py b/tests/acceptance/version.py index 67c2192c93..e11661f780 100644 --- a/tests/acceptance/version.py +++ b/tests/acceptance/version.py @@ -9,10 +9,10 @@ # later. See the COPYING file in the top-level directory. =20 =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 =20 -class Version(Test): +class Version(MachineTest): """ :avocado: tags=3Dquick """ diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_v= ersion.py index 33593c29dd..ea33363b0f 100644 --- a/tests/acceptance/virtio_version.py +++ b/tests/acceptance/virtio_version.py @@ -13,7 +13,7 @@ import os =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) from qemu.machine import QEMUMachine -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 # Virtio Device IDs: VIRTIO_NET =3D 1 @@ -55,7 +55,7 @@ def get_pci_interfaces(vm, devtype): interfaces =3D ('pci-express-device', 'conventional-pci-device') return [i for i in interfaces if devtype_implements(vm, devtype, i)] =20 -class VirtioVersionCheck(Test): +class VirtioVersionCheck(MachineTest): """ Check if virtio-version-specific device types result in the same device tree created by `disable-modern` and diff --git a/tests/acceptance/vnc.py b/tests/acceptance/vnc.py index 3f40bc2be1..c2a364d23e 100644 --- a/tests/acceptance/vnc.py +++ b/tests/acceptance/vnc.py @@ -8,10 +8,10 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. =20 -from avocado_qemu import Test +from avocado_qemu import MachineTest =20 =20 -class Vnc(Test): +class Vnc(MachineTest): """ :avocado: tags=3Dvnc,quick """ --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248417; cv=none; d=zoho.com; s=zohoarc; b=ecAw/6pz2/CCa47tiSpSjL0AsTZGjE+kYkmspwEpGLc2x3aBIj5suqKdk3Zv6VS6RobQ4uItLGumOOphjpVY0WGqMfMI7VxAW62qiEdIZQYOSEFpXXUxTkgzUFrAa66A0ueMjf0B+HgleTAUBY8BiS9CM3XTCgrmitUe7ZU1ctc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248417; 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=Z6N7zo2hMqV0TfAjlL0Z3VGYNiIu/FBYsCeEXTlXtkc=; b=H9s0VwqfyQUUfM8vFzw3K45fVAr5vOTa1uFGwnucccK/fvfdz5+QHKQpg7zeBm0jQew51ZDzarAtKFGmKbiVI1ZbZgIlIFNMr+xng6upLi8dUab85HHWeI5r65spdwh+TMkitxf300shL6pD5FBzRqhDxRQWfTlVyB6aXVG43Ew= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248417324444.71635154559374; Mon, 28 Oct 2019 00:40:17 -0700 (PDT) Received: from localhost ([::1]:51438 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzdP-0000QJ-OC for importer@patchew.org; Mon, 28 Oct 2019 03:40:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46572) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZF-00031G-PG for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZE-0002c2-LL for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:57 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53944 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZE-0002bp-HU for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:35:56 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-257-Nht048q6Oemhvlqr9myiuA-1; Mon, 28 Oct 2019 03:35:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 093F71800D7E; Mon, 28 Oct 2019 07:35:51 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BCD9819C69; Mon, 28 Oct 2019 07:35:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z6N7zo2hMqV0TfAjlL0Z3VGYNiIu/FBYsCeEXTlXtkc=; b=IgQF8wfLvcMBgiOvpqZvrxGwTAixw2qyeydqZdEykw9WjSs+xkNRNEzR0AXDL4Fd9sAmg2 MuFztSW6FinYzpyq6RclcVaqwZ/auXaB0RKiCxE0MBNv5ZP2/MGOMbSsX4R5/Q8dwJu2aC NgWTAmO4PjR4mD0GhJYAiA3rmNVMllQ= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 07/26] tests/acceptance: Make pick_default_qemu_bin() more generic Date: Mon, 28 Oct 2019 08:34:22 +0100 Message-Id: <20191028073441.6448-8-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Nht048q6Oemhvlqr9myiuA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Make pick_default_qemu_bin() generic to find qemu-system or qemu-user binaries. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index a2cc3d689b..d23681818d 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -24,7 +24,7 @@ def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) =20 =20 -def pick_default_qemu_bin(arch=3DNone): +def pick_default_qemu_bin(path_fmt, bin_fmt, arch=3DNone): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. @@ -43,8 +43,7 @@ def pick_default_qemu_bin(arch=3DNone): # qemu binary path does not match arch for powerpc, handle it if 'ppc64le' in arch: arch =3D 'ppc64' - qemu_bin_relative_path =3D os.path.join("%s-softmmu" % arch, - "qemu-system-%s" % arch) + qemu_bin_relative_path =3D os.path.join(path_fmt % arch, bin_fmt % arc= h) if is_readable_executable_file(qemu_bin_relative_path): return qemu_bin_relative_path =20 @@ -99,14 +98,15 @@ def exec_command_and_wait_for_pattern(test, command, =20 =20 class Test(avocado.Test): - def setUp(self): + def base_setUp(self, path_fmt, bin_fmt): arches =3D self.tags.get('arch', []) if len(arches) =3D=3D 1: arch =3D arches.pop() else: arch =3D None self.arch =3D self.params.get('arch', default=3Darch) - default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) + default_qemu_bin =3D pick_default_qemu_bin(path_fmt, bin_fmt, + arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) if self.qemu_bin is None: @@ -116,7 +116,7 @@ class Test(avocado.Test): class MachineTest(Test): def setUp(self): self._vms =3D {} - super().setUp() + self.base_setUp("%s-softmmu", "qemu-system-%s") =20 def _new_vm(self, *args): vm =3D QEMUMachine(self.qemu_bin) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248288; cv=none; d=zoho.com; s=zohoarc; b=hTmpROhYmF+N8LH2+kw1g7Hfl/qe+WSHQcQVzwvThNM3vv/0jYJvh5vSObFIheUJpey+QsG4FJZRHaRVt2A6NKGRtc92bQXDNzqpMf5R/Bfzatvl3GyblssBUw9klrWvA+T/GcIj58JD7XaLCUUTibS1FhMSGkH2UYVrlxBTjXI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248288; 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=e5YHjJMRwCWhL/THwFANm4p0o/BO4tR4zachgKDUC3o=; b=Za7sQvC9rs7Y9rWoOi0F4ss1rv3E3vOpwueOdO2j1yGbcB3OaXBAFoZFbCB4txODPwKqRAsABOL3Ola6tRO7Qbvtc5H+7wZXA23kWbGazMaf+zGpjpS2204pdAqrjehXKx/YHUybsK9NnTTMLf9iuePBYdyzm4RQ/JP9J0crV+0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248288856208.87606908130942; Mon, 28 Oct 2019 00:38:08 -0700 (PDT) Received: from localhost ([::1]:51384 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbL-0005v5-32 for importer@patchew.org; Mon, 28 Oct 2019 03:38:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46603) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZR-0003Zm-5z for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZQ-0002jV-3V for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47678 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZP-0002jO-W8 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:08 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-356-Sfy6b838Nzivm-TQMaS1DQ-1; Mon, 28 Oct 2019 03:36:02 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3F852107AD28; Mon, 28 Oct 2019 07:36:01 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C11E319C69; Mon, 28 Oct 2019 07:35:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248167; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=e5YHjJMRwCWhL/THwFANm4p0o/BO4tR4zachgKDUC3o=; b=K9PoLbaxlW4O7uxXRsHZm5A+eTHNQpDk295pLG8N2SHAoOm6yKOgDAigfuBVbWLU9eVazv 0lKaNrr5wyOCfzXupLN5IbJzhNgSPW5wNN7sJm4IYcCVKE+xttfJKtEvYRefRoA46VFb9/ 7QYyolzuxId/qhmTNiT8pSWiFapPmfM= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 08/26] tests/acceptance: Introduce LinuxUserTest base class Date: Mon, 28 Oct 2019 08:34:23 +0100 Message-Id: <20191028073441.6448-9-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Sfy6b838Nzivm-TQMaS1DQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Similarly to the MachineTest base class, this class contains methods common to linux-user tests. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/avocado_qemu/__init__.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_qemu/__init__.py index d23681818d..2611a5146c 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -14,6 +14,7 @@ import sys import uuid =20 import avocado +from avocado.utils import process =20 SRC_ROOT_DIR =3D os.path.join(os.path.dirname(__file__), '..', '..', '..') sys.path.append(os.path.join(SRC_ROOT_DIR, 'python')) @@ -138,3 +139,11 @@ class MachineTest(Test): def tearDown(self): for vm in self._vms.values(): vm.shutdown() + + +class LinuxUserTest(Test): + def setUp(self): + self.base_setUp("%s-linux-user", "qemu-%s") + + def run(self, cmd): + return process.run("%s %s" % (self.qemu_bin, cmd)) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249214; cv=none; d=zoho.com; s=zohoarc; b=NB23s7KoRlTr72Zc3kF/JCxPpVm+KHggaEHC7zlBxCHdPsSZfXdRPh9xN62vwLtDvaEhz8NZEpFlH8KBHvX3sa4PJPfQAL6nM9ke47tcz+hmnpXXZGJ8pkBVhQQWUwinOrswlQr2/X/OBcr6ZsNDkdksjsMB4dSqkV0f6x2KZY8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249214; 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=qJuawz+NCOMe0LpCmZ6NSvQfN5uTWt1OpFuHjU+y0GY=; b=ibBIXUWimixy3ZyOnGfwHpVZy3i9yPewlM5NsneMtXdv1QzG92yFHWNiU8ZZoluwPW6h9YnkQkKA9OTf4veuJ6L0nF4TfOa5wbg8nZXNPotr2tVHz1Gu7KRQhTznIi7lDf692J//AmWMORIGZOUCVkhCGQbVOFpmTFo6B+d0AuY= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249214899229.73841205636768; Mon, 28 Oct 2019 00:53:34 -0700 (PDT) Received: from localhost ([::1]:51568 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzqE-0001AG-KC for importer@patchew.org; Mon, 28 Oct 2019 03:53:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46628) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZe-0003yq-EJ for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZd-0002pH-2w for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:22 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:55806 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZc-0002ov-VB for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:21 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-SAIQzfQyOe-f-5uaO-xGrQ-1; Mon, 28 Oct 2019 03:36:09 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8A6A41800D7E; Mon, 28 Oct 2019 07:36:07 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E08C919C69; Mon, 28 Oct 2019 07:36:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qJuawz+NCOMe0LpCmZ6NSvQfN5uTWt1OpFuHjU+y0GY=; b=ZfCs7iz2/LSGLpU+jEjaZF6P91qdgKOdsFxXlIMnhip0bL7AxL2dujRUfjBeKqIXR9maS/ Q4o3Yc8kBdDytVyUA6PaRp7TRPnzbMV+X7cgJhuIqdR7vpU+DSkhiOaEiPlijm5dAkTS7S ZJFSh2S1AJauCYbhyyjkSeRZC5bsd70= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 09/26] tests/acceptance: Add bFLT loader linux-user test Date: Mon, 28 Oct 2019 08:34:24 +0100 Message-Id: <20191028073441.6448-10-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: SAIQzfQyOe-f-5uaO-xGrQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Add a very quick test that runs a busybox binary in bFLT format: $ avocado --show=3Dapp run tests/acceptance/load_bflt.py JOB ID : db94d5960ce564c50904d666a7e259148c27e88f JOB LOG : ~/avocado/job-results/job-2019-06-25T10.52-db94d59/job.log (1/1) tests/acceptance/load_bflt.py:LoadBFLT.test_stm32: PASS (0.15 s) RESULTS : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | = CANCEL 0 JOB TIME : 0.54 s Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- This test currently fails on Aarch64 host, see LP#1833668 https://bugs.launchpad.net/qemu/+bug/1833668 --- tests/acceptance/load_bflt.py | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 tests/acceptance/load_bflt.py diff --git a/tests/acceptance/load_bflt.py b/tests/acceptance/load_bflt.py new file mode 100644 index 0000000000..fdcaf8ad88 --- /dev/null +++ b/tests/acceptance/load_bflt.py @@ -0,0 +1,52 @@ +# Test the bFLT format +# +# Copyright (C) 2019 Philippe Mathieu-Daud=C3=A9 +# +# SPDX-License-Identifier: GPL-2.0-or-later + +import os +import bz2 +import subprocess + +from avocado_qemu import LinuxUserTest + + +class LoadBFLT(LinuxUserTest): + + def extract_cpio(self, cpio_path): + """ + Extracts a cpio archive into the test workdir + + :param cpio_path: path to the cpio archive + """ + cwd =3D os.getcwd() + os.chdir(self.workdir) + with bz2.open(cpio_path, 'rb') as archive_cpio: + subprocess.run(['cpio', '-i'], input=3Darchive_cpio.read(), + stderr=3Dsubprocess.DEVNULL) + os.chdir(cwd) + + def test_stm32(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dlinux_user + :avocado: tags=3Dquick + """ + # See https://elinux.org/STM32#User_Space + rootfs_url =3D ('https://elinux.org/images/5/51/' + 'Stm32_mini_rootfs.cpio.bz2') + rootfs_hash =3D '9f065e6ba40cce7411ba757f924f30fcc57951e6' + rootfs_path_bz2 =3D self.fetch_asset(rootfs_url, asset_hash=3Droot= fs_hash) + busybox_path =3D self.workdir + "/bin/busybox" + + self.extract_cpio(rootfs_path_bz2) + + cmd =3D '' + res =3D self.run("%s %s" % (busybox_path, cmd)) + ver =3D 'BusyBox v1.24.0.git (2015-02-03 22:17:13 CET) multi-call = binary.' + self.assertIn(ver, res.stdout_text) + + cmd =3D 'uname -a' + res =3D self.run("%s %s" % (busybox_path, cmd)) + unm =3D 'armv7l GNU/Linux' + self.assertIn(unm, res.stdout_text) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248304; cv=none; d=zoho.com; s=zohoarc; b=ATl+SICz4HB7b4AHR65kr7Q8Nwnj+pnnsKAkUX2HF00iZ+Hf4PIY2g9YzWQd/G6MT/+kHyuQW6l5Ik6dYKL+QLYUNbLxSjP1RlhQrIsl0Wjr9b/0MoaW4kJ1H6Nq5zPRO/jOt9hYe/YVvW6hSkzcdzu95LS1UcwexXnR11vNoN8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248304; 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=SVLHaBXaewDE1UDpHAgCzCVsYc9pZRiy5F+75Z2ZeoA=; b=HgA+RaTyGBYTuKkT9ukbK7W1+lVDlwZPuS5AJz6Zyh5OHMC2ADgQ9CCMTGpg8u3Q/5Wf+oQAcChoEWYjJLFISvFAbuAsXeRo6D/gBsePyZFVWC3PgXviIY6n9RtDXaquEPtvxkrvWJTMlLyWwmWaH4avVXDagohRaN5z2T/whXI= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248304070201.52225073474688; Mon, 28 Oct 2019 00:38:24 -0700 (PDT) Received: from localhost ([::1]:51394 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbY-0006j6-Eb for importer@patchew.org; Mon, 28 Oct 2019 03:38:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46641) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZf-00042B-VA for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZe-0002qQ-In for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:23 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:27725 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZe-0002q5-EX for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:22 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-8-ynCwNO7xPly6I7NO7QOkMQ-1; Mon, 28 Oct 2019 03:36:15 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F42A107AD28; Mon, 28 Oct 2019 07:36:13 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4BC06165DB; Mon, 28 Oct 2019 07:36:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SVLHaBXaewDE1UDpHAgCzCVsYc9pZRiy5F+75Z2ZeoA=; b=hlzrouWngNyV5L+UgRzXqRNTLjUsfL2RoJgdPnh2TqBcJrBUO+hEIcxJV98Ruq4V67V0/x KkC7I8m3u+KR33R06+3q4dYIh4lLxVA9pycsHz+qgwnzRsdPXvkyAcIKF9RdT2DtCxsDQG ligW/n0tt3lLtapVl8Ns7RT7c7fYTDU= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 10/26] tests/acceptance: Add test that boots the HelenOS microkernel on Leon3 Date: Mon, 28 Oct 2019 08:34:25 +0100 Message-Id: <20191028073441.6448-11-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ynCwNO7xPly6I7NO7QOkMQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Release notes: http://www.helenos.org/wiki/Download#HelenOS0.6.0 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- MAINTAINERS | 1 + tests/acceptance/machine_sparc_leon3.py | 37 +++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 tests/acceptance/machine_sparc_leon3.py diff --git a/MAINTAINERS b/MAINTAINERS index 556ce0bfe3..17ff741c63 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1173,6 +1173,7 @@ S: Maintained F: hw/sparc/leon3.c F: hw/*/grlib* F: include/hw/*/grlib* +F: tests/acceptance/machine_sparc_leon3.py =20 S390 Machines ------------- diff --git a/tests/acceptance/machine_sparc_leon3.py b/tests/acceptance/mac= hine_sparc_leon3.py new file mode 100644 index 0000000000..a1394ba8ad --- /dev/null +++ b/tests/acceptance/machine_sparc_leon3.py @@ -0,0 +1,37 @@ +# Functional test that boots a Leon3 machine and checks its serial console. +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# 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 + +from avocado import skipIf +from avocado_qemu import MachineTest + + +class Leon3Machine(MachineTest): + + timeout =3D 60 + + def test_leon3_helenos_uimage(self): + """ + :avocado: tags=3Darch:sparc + :avocado: tags=3Dmachine:leon3 + :avocado: tags=3Dbinfmt:uimage + """ + kernel_url =3D ('http://www.helenos.org/releases/' + 'HelenOS-0.6.0-sparc32-leon3.bin') + kernel_hash =3D 'a88c9cfdb8430c66650e5290a08765f9bf049a30' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('leon3_generic') + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path) + + self.vm.launch() + + wait_for_console_pattern(self,'Copyright (c) 2001-2014 HelenOS pro= ject') + wait_for_console_pattern(self,'Booting the kernel ...') --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248493; cv=none; d=zoho.com; s=zohoarc; b=AqzpUQHmcq4vQI6LQESPpwiE5Au9IB+lO7pa6h5UyniPm7rfEsooIlZ+Mv+k6hxnbzfmZF2kO+Tb8VuDItaHMgc+aOZVU2XrUuD9TULyt0AUNKsgyCSafm52rA0XkKpE31LXiyFgpYYxdQUT4BdBHoX5s2r9NEGrUTT0UAkEoII= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248493; 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=VBZhMOiZkXyInSD5BwU922z+hmF15P6tzDy5UfaGL3w=; b=Zq7TtvyHQ7qr467ocv6pw8ur9dAo6cQaY1JUxUi3sOS+TMIM+Z9XT6HP7pBaxmlAlRGVwrjOW7JCj6r2xwKUBTpBSn0jtXmvOBfPpXAnwX+NilG28L0QN6XA+s/bonDVXw33/tN5h/OLcF44Zv12SLHSKmtxSdXZkHATFuqObPs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248493785424.79930211308067; Mon, 28 Oct 2019 00:41:33 -0700 (PDT) Received: from localhost ([::1]:51444 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzed-0002tt-Qs for importer@patchew.org; Mon, 28 Oct 2019 03:41:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46671) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZq-0004EJ-PL for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZo-0002uz-6S for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:33 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:33524 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZn-0002td-TA for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:31 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-334-zyi9TTNNOr6h5ZQG0SWFLw-1; Mon, 28 Oct 2019 03:36:26 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0CD1A1005510; Mon, 28 Oct 2019 07:36:25 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 61FA619C69; Mon, 28 Oct 2019 07:36:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248190; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VBZhMOiZkXyInSD5BwU922z+hmF15P6tzDy5UfaGL3w=; b=VzYIStu0FE8K1ON8utwrDq0AkcAffPlq2e3ddyCBfgkgQ+byF5V1FmlOkdDbeBlonUr6lY 2/KWwHFwyXCXOxJ7PWCNTNTbUEykawSS/0LSoZWi+zvSmWR7gfZyPRIBdA9VG3HlmXs1lI EpaNw76Gfmf6Ercq3c+LZgEOYDUTzjM= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 11/26] tests/acceptance: Add test that boots Linux up to BusyBox on Leon3 Date: Mon, 28 Oct 2019 08:34:26 +0100 Message-Id: <20191028073441.6448-12-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: zyi9TTNNOr6h5ZQG0SWFLw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Gaisler provides convenient images: https://www.gaisler.com/index.php/downloads/linux HOWTO build: https://www.gaisler.com/index.php/products/operating-systems/linux Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/machine_sparc_leon3.py | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/acceptance/machine_sparc_leon3.py b/tests/acceptance/mac= hine_sparc_leon3.py index a1394ba8ad..1172fd5da0 100644 --- a/tests/acceptance/machine_sparc_leon3.py +++ b/tests/acceptance/machine_sparc_leon3.py @@ -10,6 +10,8 @@ import logging =20 from avocado import skipIf from avocado_qemu import MachineTest +from avocado_qemu import wait_for_console_pattern +from avocado_qemu import exec_command_and_wait_for_pattern =20 =20 class Leon3Machine(MachineTest): @@ -35,3 +37,29 @@ class Leon3Machine(MachineTest): =20 wait_for_console_pattern(self,'Copyright (c) 2001-2014 HelenOS pro= ject') wait_for_console_pattern(self,'Booting the kernel ...') + + def test_leon3_linux_kernel_4_9_busybox(self): + """ + :avocado: tags=3Darch:sparc + :avocado: tags=3Dmachine:leon3 + """ + kernel_url =3D ('https://www.gaisler.com/anonftp/linux/linux-4/ima= ges/' + 'leon-linux-4.9/leon-linux-4.9-1.0/up/image.ram') + kernel_hash =3D '289bd1bcca10cda76d0ef2264a8657adc251f5f5' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('leon3_generic') + self.vm.set_console() + self.vm.add_args('-kernel', kernel_path) + + self.vm.launch() + + wait_for_console_pattern(self, 'TYPE: Leon3 System-on-a-Chip') + + wait_for_console_pattern(self, 'Welcome to Buildroot') + + wait_for_console_pattern(self, 'buildroot login:') + exec_command_and_wait_for_pattern(self, 'root', '#') + uname =3D 'Linux buildroot 4.9.54-00018-g62dab2c #2 ' \ + 'Wed Oct 18 09:45:51 CEST 2017 sparc GNU/Linux' + exec_command_and_wait_for_pattern(self, 'uname -a', uname) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248675; cv=none; d=zoho.com; s=zohoarc; b=ZgDAMwPrPJh9DRvzhx5M8qmPDpXn1HC1wX9G+kLNI0qF12Asu2Hbwm4YQya6OIJBmc6N5EJ7ewlrkq8Hcoj09Mv+xLagxLHUshuUtpG4hVbk3UMIeIaHKdQgI4jDOnQqwQ3xz+Y2RiSbtjrky+UUWRmtRfxUUJ8/pqQq81bHyY0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248675; 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=mYoec4jl/CtuvGqAx5UVgtHIQAFf2mznV2jizsNxhsg=; b=E2DtdnldNY7sbRjSA1/QsERJzaeBiw0ihsLKabBE1WsNUsiHdUCLtrfARUhfd7Y+slQJW56wFEbMgTUfep+NjBXkZnGXiWsDPCLmFOllIjYasaOM5xAPzdI5FslLZC7Wp17ZrQKbDOQjZeRi/EjYRljKnn8H3Bq++e55fehlWio= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248675931533.4505745227322; Mon, 28 Oct 2019 00:44:35 -0700 (PDT) Received: from localhost ([::1]:51468 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzha-0000er-Fn for importer@patchew.org; Mon, 28 Oct 2019 03:44:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46700) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzZw-0004Hz-3j for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzZu-0002xv-VC for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:39 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:56439 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzZu-0002xL-RY for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:38 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-43-1qoh5TdYPKSDnI9ldbZTjA-1; Mon, 28 Oct 2019 03:36:33 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9EE5A476; Mon, 28 Oct 2019 07:36:31 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C420D19C69; Mon, 28 Oct 2019 07:36:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248197; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mYoec4jl/CtuvGqAx5UVgtHIQAFf2mznV2jizsNxhsg=; b=iSVAho8IQfvwZoJjrS1bOCc9nQbw1Fq8vYk7vS1MmT7CuT2iWKORzi+Zp1MkiXOTPYa1cs 94ZmWbVNUMrmsYfD0SrlVe4MMk9QHXRuhsO1hYtgdHbMnPIM+QgYSZZ9IdTNu79ijQa0Gs KQgoZbqACpEIuC7gJe6vTiX2IyTtqgw= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 12/26] .travis.yml: Let the avocado job run the Leon3 test Date: Mon, 28 Oct 2019 08:34:27 +0100 Message-Id: <20191028073441.6448-13-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 1qoh5TdYPKSDnI9ldbZTjA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- If this list continues to grow we can - split it (as other jobs) - move them to GitLab where we can have multi-stage jobs, avocado tests run on top of build jobs. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d0b9e099b9..4ca0d0fdf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -267,7 +267,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu,ppc64-softmmu,m68k-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" - TEST_CMD=3D"make check-acceptance" after_failure: - cat tests/results/latest/job.log --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248903; cv=none; d=zoho.com; s=zohoarc; b=XdmemhYu0r4LUBsd1zsAPYY7spBeOMnH8bC1+EshTmIFbjnAtYTLe5O5IOalqlLqOXVZbIcMPqXShtdD+8KIoOIqp51WY1rPJQfZq6JXbNXy78T9U+ZikVjlgdNo1Bh6jsHpGVrp1eVjRb5zSSy8odhxxvt4iDIxpe+0Mm7AkxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248903; 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=5dtam7LsuEC11Y8Z4sevAkS9bZM5hjwODNcwtjj8ytA=; b=mKgaR/W+Ps0ljKf8LdqBqa5u0pDV0f4kiN+8vWE1pCGRf5fbMU1zUUJeaXE9bjW6QJLruQIVtwADEB2AE0Rh8JDtn5DkF0HoVPo1Y/c3Fd/2nAtr9xWWKDE9ihLrLuWqYNb4kYj9/03q01s0DRLBhd76Q6Mhwmh8tLchuitmBXU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248903263867.6402292623528; Mon, 28 Oct 2019 00:48:23 -0700 (PDT) Received: from localhost ([::1]:51500 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzlF-0007YX-Ff for importer@patchew.org; Mon, 28 Oct 2019 03:48:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46750) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOza8-0004h9-Jw for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOza7-00031x-1w for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:52 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:29936 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOza6-00031o-UP for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:36:50 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-yW2DBGpROri6M4C3SUEzNA-1; Mon, 28 Oct 2019 03:36:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EE76476; Mon, 28 Oct 2019 07:36:44 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7937919C69; Mon, 28 Oct 2019 07:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5dtam7LsuEC11Y8Z4sevAkS9bZM5hjwODNcwtjj8ytA=; b=XMe9cw7JZycW3LPn0OPpTBL62OZlVD3tYJWRA5FjirHIn5wgDLkHkOxnUNr1NL7l8pUHX5 pNNIMCc1KAqcTzsjcNwPkooe5tgO6Xy4uP4oLidFtgfpdw1c0cdLDa47qVg2LjUAiK5YT9 pfW3l0rATWwP1mFjNyeGjE5cA4lp/6s= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 13/26] tests/acceptance: Add test that runs NetBSD 4.0 installer on PRep/40p Date: Mon, 28 Oct 2019 08:34:28 +0100 Message-Id: <20191028073441.6448-14-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: yW2DBGpROri6M4C3SUEzNA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , =?UTF-8?q?Herv=C3=A9=20Poussineau?= , Wainer dos Santos Moschetta , Artyom Tarasenko , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 As of this commit, NetBSD 4.0 is very old. However it is enough to test the PRep/40p machine. User case from: http://mail-index.netbsd.org/port-prep/2017/04/11/msg000112.html Reviewed-by: Herv=C3=A9 Poussineau Acked-by: David Gibson Acked-by: Artyom Tarasenko Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- Installers after 4.0 doesn't work anymore, not sure if this is a problem from the QEMU model or from NetBSD. v3: - use avocado_qemu.wait_for_console_pattern (Cleber) - check getenv(AVOCADO_ALLOW_UNTRUSTED_CODE) (pm215) --- MAINTAINERS | 1 + tests/acceptance/ppc_prep_40p.py | 50 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 tests/acceptance/ppc_prep_40p.py diff --git a/MAINTAINERS b/MAINTAINERS index 17ff741c63..91746b87f5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1068,6 +1068,7 @@ F: hw/rtc/m48t59-isa.c F: include/hw/isa/pc87312.h F: include/hw/rtc/m48t59.h F: pc-bios/ppc_rom.bin +F: tests/acceptance/machine_ppc_prep_40p.py =20 sPAPR M: David Gibson diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py new file mode 100644 index 0000000000..7dd90bb2bb --- /dev/null +++ b/tests/acceptance/ppc_prep_40p.py @@ -0,0 +1,50 @@ +# Functional test that boots a PReP/40p machine and checks its serial cons= ole. +# +# Copyright (c) Philippe Mathieu-Daud=C3=A9 +# +# 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 + +from avocado import skipIf +from avocado import skipUnless +from avocado_qemu import MachineTest +from avocado_qemu import wait_for_console_pattern + + +class IbmPrep40pMachine(MachineTest): + + timeout =3D 60 + + # 12H0455 PPS Firmware Licensed Materials + # Property of IBM (C) Copyright IBM Corp. 1994. + # All rights reserved. + # U.S. Government Users Restricted Rights - Use, duplication or disclo= sure + # restricted by GSA ADP Schedule Contract with IBM Corp. + @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') + def test_factory_firmware_and_netbsd(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + :avocado: tags=3Dslowness:high + """ + bios_url =3D ('ftp://ftp.boulder.ibm.com/rs6000/firmware/' + '7020-40p/P12H0456.IMG') + bios_hash =3D '1775face4e6dc27f3a6ed955ef6eb331bf817f03' + bios_path =3D self.fetch_asset(bios_url, asset_hash=3Dbios_hash) + drive_url =3D ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/' + 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') + drive_hash =3D 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' + drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash) + + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-bios', bios_path, + '-fda', drive_path) + self.vm.launch() + os_banner =3D 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 20= 07' + wait_for_console_pattern(self, os_banner) + wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248606; cv=none; d=zoho.com; s=zohoarc; b=dwiyCvqqDSmje06h5kUno/tuCSnp9evdX30mjNsm2bZheUS2kQEvA4wBebfS7zDqhzxHigQUyHfp3CaUkgXgqmvmzTGjCQu2+ZdzO+b5XisUICXG2Ijv07bgz9igA1zLNtCYUc/aGnTrYk0uxbIZMZUJ95V6ve8oMBAk2MNP+Wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248606; 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=Wt6QUAJAWF4zcHVQr9XC4SMX1u8xXeFPU2ITpHr4KlI=; b=ckFbQFEakSl2sskRy+VufxjejVT0VGF1hHGAEJDPvBjVbddsHSuqH5kNSgcVgq1l0hPrJX+jFNqhnsSPvNj63/wnZSJUvl8J34BTDVxHI3AERjiiVacgFJNflq90hUpgjVnF1+ZOWLhAHfAqxphC1U0+ibQnVMqhwBca3jgkJn0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248606008194.95048674995815; Mon, 28 Oct 2019 00:43:26 -0700 (PDT) Received: from localhost ([::1]:51462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzgS-00071e-Bc for importer@patchew.org; Mon, 28 Oct 2019 03:43:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzaI-0004zN-0R for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzaG-00035F-N3 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:01 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:22195 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzaG-00034w-Ih for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:00 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-232-ElkhrOdrNc61VppdGp8Msg-1; Mon, 28 Oct 2019 03:36:52 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6606E1005510; Mon, 28 Oct 2019 07:36:50 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 41A3E19C69; Mon, 28 Oct 2019 07:36:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248220; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Wt6QUAJAWF4zcHVQr9XC4SMX1u8xXeFPU2ITpHr4KlI=; b=Azf7Tt/elusGs/8Myc+voEdIMam6PZgQ02LvPUYbgXk0iBpPbSRLMxV+0Zc8UMkyGtYDAD aoDRWIeUw+tp1Cj2IjFl/+r5tN0gqtobvpk/m8g1IWpdbilz8jMwoCICS3gbBrec6vGtTz NnillVd00A2Weo9kH7dDPur1ucIqgnY= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 14/26] tests/acceptance: Test Open Firmware on the PReP/40p Date: Mon, 28 Oct 2019 08:34:29 +0100 Message-Id: <20191028073441.6448-15-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ElkhrOdrNc61VppdGp8Msg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Artyom Tarasenko , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 User case from: https://tyom.blogspot.com/2019/04/aixprep-under-qemu-how-to.html Acked-by: David Gibson Acked-by: Artyom Tarasenko Tested-by: Cleber Rosa Reviewed-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: use avocado_qemu.wait_for_console_pattern (Cleber) --- tests/acceptance/ppc_prep_40p.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py index 7dd90bb2bb..ebde5b7dc4 100644 --- a/tests/acceptance/ppc_prep_40p.py +++ b/tests/acceptance/ppc_prep_40p.py @@ -48,3 +48,24 @@ class IbmPrep40pMachine(MachineTest): os_banner =3D 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 20= 07' wait_for_console_pattern(self, os_banner) wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') + + def test_openfirmware(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + """ + bios_url =3D ('https://github.com/artyom-tarasenko/openfirmware/' + 'releases/download/40p-20190413/q40pofw-serial.rom') + bios_hash =3D '880c80172ea5b2247c0ac2a8bf36bbe385192c72' + bios_path =3D self.fetch_asset(bios_url, asset_hash=3Dbios_hash) + + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-bios', bios_path) + + self.vm.launch() + wait_for_console_pattern(self, 'QEMU PReP/40p') + fw_banner =3D 'Open Firmware, built April 13, 2019 09:29:23' + wait_for_console_pattern(self, fw_banner) + prompt_msg =3D 'Type any key to interrupt automatic startup' + wait_for_console_pattern(self, prompt_msg) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249401; cv=none; d=zoho.com; s=zohoarc; b=TCj/Tl58LI5FR1KiZYF4sFilhS2eC+TVuNmOeV3bBIuOXGmn2epy1Y7zqD+XuhPJBpAygMsIzw1zd+xAosrXYt/W74MN4CSAHD1Rpgq6yFDizo5JRu5rSW1RAhRuwMW+mnUcrmTSxTPaH7Tr+bo+TXnStbVabQEfNmKTn/ELBk4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249401; 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=HfQk6pDLINYeV09MhT4IYsNx0bdSx+vzEUEGtmX7XFc=; b=IBpISWMEabIO//9rG4LjefJukoOgQa6hX3DLu9Tj0kMZeHtvry2OUIjFNeJhEaR9o/Q9Fg2J0sAsGo/LNjsfShgEshE0RN2Inn9DPE8Vjy+qVt91qKxeEzm9e9RboHg7ztaulox7O9IiQPU+FtL643kjvK0CSPV/UX0FFP/JRek= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249401236665.8068483630723; Mon, 28 Oct 2019 00:56:41 -0700 (PDT) Received: from localhost ([::1]:51596 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOztH-00080U-G6 for importer@patchew.org; Mon, 28 Oct 2019 03:56:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46818) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzaR-0005KI-Uh for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzaQ-00039k-KM for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:27333 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzaQ-00039U-Gc for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:10 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-164-RH7VjJL9Nx6-KWV3dVDz5A-1; Mon, 28 Oct 2019 03:37:03 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 066141800DD0; Mon, 28 Oct 2019 07:37:02 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD3B319C69; Mon, 28 Oct 2019 07:36:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=HfQk6pDLINYeV09MhT4IYsNx0bdSx+vzEUEGtmX7XFc=; b=URFKdq2dZ2M3lkLl6lHpJs6nq0jJJP7iqmBkJKNxwJRrekiFfjTwAhMOKQeBen5uhxDN34 /ZDpfN2yksdfP3P7Iap/pkGveAqjCGR6cUG7QdII+V6Y41QErTol7j5hRDYGhQpbbaC8Oi qS8c4cyuHZC2W1G8uDS1AQDwFUx8SzY= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 15/26] tests/acceptance: Test OpenBIOS on the PReP/40p Date: Mon, 28 Oct 2019 08:34:30 +0100 Message-Id: <20191028073441.6448-16-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: RH7VjJL9Nx6-KWV3dVDz5A-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 User case from: https://mail.coreboot.org/pipermail/openbios/2018-May/010360.html Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- v3: - use avocado_qemu.wait_for_console_pattern (Cleber) - use MD5 hash --- tests/acceptance/ppc_prep_40p.py | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py index ebde5b7dc4..b4109a7af3 100644 --- a/tests/acceptance/ppc_prep_40p.py +++ b/tests/acceptance/ppc_prep_40p.py @@ -69,3 +69,35 @@ class IbmPrep40pMachine(MachineTest): wait_for_console_pattern(self, fw_banner) prompt_msg =3D 'Type any key to interrupt automatic startup' wait_for_console_pattern(self, prompt_msg) + + def test_openbios_192m(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + """ + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-m', '192') # test fw_cfg + + self.vm.launch() + wait_for_console_pattern(self, '>> OpenBIOS') + wait_for_console_pattern(self, '>> Memory: 192M') + wait_for_console_pattern(self, '>> CPU type PowerPC,604') + + def test_openbios_and_netbsd(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + """ + drive_url =3D ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/' + 'NetBSD-7.1.2-prep.iso') + drive_hash =3D 'ac6fa2707d888b36d6fa64de6e7fe48e' + drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash, + algorithm=3D'md5') + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-cdrom', drive_path, + '-boot', 'd') + + self.vm.launch() + wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249606; cv=none; d=zoho.com; s=zohoarc; b=ZYrAdLugM290Pa/eigS+eSeNCVnMduEEZlR9pDIysLJ0fHMJKaOitBizOFfDSc57flmQQDusLHmNtKtTOoS0e9nf5XSAPjagnlHMNvGwYz7LYZq9RJlRC+4S3gEvGfrBN4DryPb7aV6gkBihy7Upgmm/FrSCr/TH5G9U/V3Ho3I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249606; 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=qUG75H2spVNxXKyZ7ESRf9W2wg4FjIjlM9ygXXLckWM=; b=GKqRcucKpHYe3ltCWQtNdxqaJ+0xLxUNmA9SP0U30SXRBoCaCZLDw+BfmLOwyY8OoPia3MQLy+R/QAD0WgyqPAD3H9hxYChZFxME7MjdqIaVpiGU/iZ7aV0d4DwGZeMooX83QSzFKvSF5yeS/8rAly5OSukDk3N5mQCk/3bcURs= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249606245996.9145451792776; Mon, 28 Oct 2019 01:00:06 -0700 (PDT) Received: from localhost ([::1]:51618 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzwZ-0006eV-W5 for importer@patchew.org; Mon, 28 Oct 2019 04:00:04 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46830) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzaX-0005Vz-AZ for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzaW-0003Ba-0O for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:17 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:21540 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzaV-0003BQ-Sw for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:15 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-391-Vm82sYMkMT2VoywxBwY2OA-1; Mon, 28 Oct 2019 03:37:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 46245800D41; Mon, 28 Oct 2019 07:37:10 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BC9C819C69; Mon, 28 Oct 2019 07:37:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUG75H2spVNxXKyZ7ESRf9W2wg4FjIjlM9ygXXLckWM=; b=X/vIgrpB/uyEz/EGiOtdSO0MIuCieip8jWHTpXAUR8KwNOhhbI3QClm08ub/5T8S4+etU0 0Pa0fT7g0KgYmCQ1mCM3G8raIMEf0AshM+aqHbKRyC3Bwg2gML12rHugS83KAY6oFblFcw RnHeriaeYNxVRMUWpPvJQuZJuMHvDaE= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 16/26] tests/acceptance: Test Sandalfoot initrd on the PReP/40p Date: Mon, 28 Oct 2019 08:34:31 +0100 Message-Id: <20191028073441.6448-17-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Vm82sYMkMT2VoywxBwY2OA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 User case from: https://mail.coreboot.org/pipermail/openbios/2018-May/010360.html Sandalfoot info: http://www.juneau-lug.org/sandalfoot.php Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v3: - use avocado_qemu.wait_for_console_pattern (Cleber) - use exec_command_and_wait_for_pattern - check getenv(AVOCADO_ALLOW_UNTRUSTED_CODE) (pm215) --- tests/acceptance/ppc_prep_40p.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_4= 0p.py index b4109a7af3..c5ecabf52f 100644 --- a/tests/acceptance/ppc_prep_40p.py +++ b/tests/acceptance/ppc_prep_40p.py @@ -11,6 +11,7 @@ import logging from avocado import skipIf from avocado import skipUnless from avocado_qemu import MachineTest +from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern =20 =20 @@ -101,3 +102,33 @@ class IbmPrep40pMachine(MachineTest): =20 self.vm.launch() wait_for_console_pattern(self, 'NetBSD/prep BOOT, Revision 1.9') + + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') + def test_sandalfoot_busybox(self): + """ + :avocado: tags=3Darch:ppc + :avocado: tags=3Dmachine:40p + """ + drive_url =3D ('http://www.juneau-lug.org/zImage.initrd.sandalfoot= ') + drive_hash =3D 'dacacfc4085ea51d34d99ef70e972b849e2c6949' + drive_path =3D self.fetch_asset(drive_url, asset_hash=3Ddrive_hash) + + self.vm.set_machine('40p') + self.vm.set_console() + self.vm.add_args('-cdrom', drive_path, + '-boot', 'd') + + self.vm.launch() + wait_for_console_pattern(self, 'Now booting the kernel') + + msg =3D 'Please press Enter to activate this console.' + wait_for_console_pattern(self, msg) + + version =3D 'BusyBox v0.60.0 (2001.08.19-09:26+0000) Built-in shel= l (ash)' + exec_command_and_wait_for_pattern(self, '', version) + + uname =3D 'Linux ppc 2.4.18 #5 Wed May 21 23:50:43 AKDT 2003 ppc u= nknown' + exec_command_and_wait_for_pattern(self, 'uname -a', uname) + + cpu =3D 'PReP IBM 6015/7020 (Sandalfoot/Sandalbow)' + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', cpu) --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248468; cv=none; d=zoho.com; s=zohoarc; b=JlX867a+PvaFh5vWupljkZXfPXQ4Bb7d00bVGpy2aIFPZh+gwFnF/hkL0FM0D/yFThcEgRbZQjJcOBj08+K9W/vO84e+1f9Y+fc567ivdhdiFExhycs4AXinxFOTu+JF8AcZVnONRiu800P/Na58UnsJ493UDiCyPTGK/sXo6R0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248468; 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=TTu8H3nnR2tIizfWvzE5Hu9/p+c5xHUY/faBKkhP9oE=; b=hY6MNQO46nB/ELhKDnfAG5usAXmYy1TDviofT13/AchYpBKQnYb0ee+aNK8VKaPn8Rw47Eba2Io6NzDjKJZSdYfXL3JPuFwArQOVbvz4Z/1bZlvIEfaazeYz0wh3Zrr80v6c7luOsvwzP5Rd3us3WDhDApiaNQTkOFICtiiekMU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248468852159.20880547941897; Mon, 28 Oct 2019 00:41:08 -0700 (PDT) Received: from localhost ([::1]:51440 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzeF-0002GK-7K for importer@patchew.org; Mon, 28 Oct 2019 03:41:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46853) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzal-00065F-5v for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzak-0003G9-31 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:31 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:29918 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzaj-0003Fw-Uj for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:30 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-26-ZWIGBWZdM1CqFEPyPkfEQQ-1; Mon, 28 Oct 2019 03:37:23 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 702B6800D4C; Mon, 28 Oct 2019 07:37:22 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0613419C69; Mon, 28 Oct 2019 07:37:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248249; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TTu8H3nnR2tIizfWvzE5Hu9/p+c5xHUY/faBKkhP9oE=; b=S/r/sh74nRvGZ74XEQc48s2aoi+verMca8NVQTmEfGfJtODmPsCVmPaZNZVDoXnLytY5uI kuIhdFDUc3ds2JW1cxXP/n3RBmv7NtfQ8bVZXRsMDUs0hZYO+xiO4g+2a6BIcyTiNuTWrP qlGNSWpbGnCrsvFBjFoWN+TJVF742C4= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 17/26] .travis.yml: Let the avocado job run the 40p tests Date: Mon, 28 Oct 2019 08:34:32 +0100 Message-Id: <20191028073441.6448-18-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ZWIGBWZdM1CqFEPyPkfEQQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Acked-by: Alex Benn=C3=A9e Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4ca0d0fdf1..2a1013f8f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -267,7 +267,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmm= u,alpha-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" - TEST_CMD=3D"make check-acceptance" after_failure: - cat tests/results/latest/job.log --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249068; cv=none; d=zoho.com; s=zohoarc; b=b8NaEzQWo1033HhRhJ9biMsbW0xOppcFJJKQjGDhIs22MeeVT4Vs6YVY916KwxhLCODMN6MiPScs74SeadC5OKWoel/0HJ09WcptHD7NLHGoC5rZL8gviVt4CT5BC/qIacF0kmuNNknwPOJG6nWha6xA6qsBfmi7JEA5xy6KxpI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249068; 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=mJPQXyGl6Ya7h9sBpf4cXWNZv/7Y4tvaUZn79QTHw0Y=; b=Fzwy4hjR3hsAHjnDOL+winv6ylbSgdapYJwoU6Tjxu/D7LnlUFORvmQ4JEi3AeP4evLXDiJ+34ISReb4gnKtS5vSnvmgW8TWUtABCaYUKFu0JwtUnVM7uFQXJgsimCfW4CNmS3cdTx7HLY6qOpHkkx/mgS7bsQVbz2EXUv8MNew= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249068287801.3767120444221; Mon, 28 Oct 2019 00:51:08 -0700 (PDT) Received: from localhost ([::1]:51522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOznv-0004kO-90 for importer@patchew.org; Mon, 28 Oct 2019 03:51:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46865) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzas-0006S3-3n for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzap-0003I0-Mq for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:37 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:58471 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzao-0003HM-SL for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:35 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-hpWPtCz9Mhe36yasWO02YQ-1; Mon, 28 Oct 2019 03:37:30 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 24733476; Mon, 28 Oct 2019 07:37:29 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3480219481; Mon, 28 Oct 2019 07:37:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mJPQXyGl6Ya7h9sBpf4cXWNZv/7Y4tvaUZn79QTHw0Y=; b=doBfJ8Y9v+QikkIODhbgJRniyKSkZmcub5717GssakIhWNNVD8TCRB+wW6tr/DlbiKbgJd xojFv08w6p4QWIQIGKPcBsq16Q2W/PQUaHQJe1PKhZYyUop2zBcRok2IlV92KsC3vRjtpT RJEP2FNbzhMcUvj7SmNu2SLRc+31cx8= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 18/26] tests/boot_console: Test booting HP-UX firmware upgrade Date: Mon, 28 Oct 2019 08:34:33 +0100 Message-Id: <20191028073441.6448-19-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: hpWPtCz9Mhe36yasWO02YQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Sven Schnelle , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Add a test which boots a HP-UX firmware upgrade CD-ROM. It exercise the PCI LSI53C895A SCSI controller. The ISO image comes from: https://web.archive.org/web/20101204061612/http://ftp.parisc-linux.org/kern= els/712/PF_C7120023 This test is very quick, less than 3s: $ AVOCADO_ALLOW_UNTRUSTED_CODE=3Dyes \ avocado --show=3Dapp,console run -t arch:hppa \ tests/acceptance/boot_linux_console.py console: Firmware Version 6.1 console: Duplex Console IO Dependent Code (IODC) revision 1 console: Memory Test/Initialization Completed console: ----------------------------------------------------------------= -------------- console: (c) Copyright 2017-2018 Helge Deller and SeaBIOS= developers. console: ----------------------------------------------------------------= -------------- console: Processor Speed State Coprocessor State = Cache Size console: --------- -------- --------------------- ----------------- = ---------- console: 0 250 MHz Active Functional 0= KB console: Available memory: 512 MB console: Good memory required: 16 MB console: Primary boot path: FWSCSI.0.0 console: Alternate boot path: FWSCSI.2.0 console: Console path: SERIAL_1.9600.8.none console: Keyboard path: PS2 console: Available boot devices: console: 1. DVD/CD [lsi 00:00.0 2:0 Drive QEMU QEMU CD-ROM 2.5+] console: Booting from DVD/CD [lsi 00:00.0 2:0 Drive QEMU QEMU CD-ROM 2.5+] console: Booting... console: Boot IO Dependent Code (IODC) revision 153 console: HARD Booted. console: ISL Revision A.00.25 November 18, 1992 console: ISL booting ODE UPDATE ; stable off ; RUN console: Loading... console: ****************************************************************= *********** console: ****** = ****** console: ****** Offline Diagnostic Environment = ****** console: ****** = ****** console: ****** (C) Copyright Hewlett-Packard Co 1993 = ****** console: ****** All Rights Reserved = ****** console: ****** = ****** console: ****** HP shall not be liable for any damages resulting from th= e ****** console: ****** use of this program. = ****** console: ****** = ****** console: ****** TC Version A.00.15 = ****** console: ****** SysLib Version A.00.44 = ****** console: ****** = ****** console: ****************************************************************= *********** console: Type HELP for command information. console: ISL_CMD> UPDATE ; stable off ; RUN console: ****************************************************************= *********** console: ****** = ****** console: ****** PDC UPDATER = ****** console: ****** = ****** console: ****** Copyright (C) 1993, 1994, 1995 by Hewlett-Packard Comp= any ****** console: ****** Version A.00.19 = ****** console: ****** = ****** console: ****************************************************************= *********** console: Type HELP for command information. console: Stable Storage will NOT be updated console: STARTING EXECUTION OF UPDATE console: Unrecognized MODEL TYPE =3D 502 console: ERROR 0001 console: UPDATE PAUSED> exit console: UPDATE> console: UPDATE> ls console: Modules on this boot media are: console: filename type size created description console: ----------------------------------------------------------------= ------------- console: DAGGER DATA 118 96/02/15 ? console: IMAGE1A DATA 512 96/02/15 ? console: IMAGE1B DATA 388 96/02/15 ? console: UPDATE> exit console: THIS UTILITY WILL NOW RESET THE SYSTEM..... PASS (2.39 s) JOB TIME : 2.54 s Suggested-by: Sven Schnelle Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: - check getenv(AVOCADO_ALLOW_UNTRUSTED_CODE) (pm215) I know this is not a 'Linux' test, but all our console functions reside in this file and I don't want to duplicate again. Maybe we could rename this file as 'boot_console_tests.py' or extract the console related functions. --- tests/acceptance/boot_linux_console.py | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index f94dc4bbca..67b396169b 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -13,6 +13,7 @@ import lzma import gzip import shutil =20 +from avocado import skipUnless from avocado_qemu import MachineTest from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern @@ -357,3 +358,29 @@ class BootLinuxConsole(MachineTest): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') + def test_hppa_fwupdate(self): + """ + :avocado: tags=3Darch:hppa + :avocado: tags=3Ddevice:lsi53c895a + """ + cdrom_url =3D ('https://github.com/philmd/qemu-testing-blob/raw/ec= 1b741/' + 'hppa/hp9000/712/C7120023.frm') + cdrom_hash =3D '17944dee46f768791953009bcda551be5ab9fac9' + cdrom_path =3D self.fetch_asset(cdrom_url, asset_hash=3Dcdrom_hash) + + self.vm.set_console() + self.vm.add_args('-cdrom', cdrom_path, + '-boot', 'd', + '-no-reboot') + self.vm.launch() + self.wait_for_console_pattern('Unrecognized MODEL TYPE =3D 502') + + exec_command_and_wait_for_pattern(self, 'exit', + 'UPDATE>') + exec_command_and_wait_for_pattern(self, 'ls', + 'IMAGE1B') + exec_command_and_wait_for_pattern(self, 'exit', + 'THIS UTILITY WILL NOW ' + 'RESET THE SYSTEM.....') --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249824; cv=none; d=zoho.com; s=zohoarc; b=mmYJT/hItwO4aeO4fRadX6544Qp4iclr2N+5hDxGFMjflmR1b4FyvE/5jo1k8peLNb+87q611DAWj8c74Zw2ZXNZ9UzecG1UIi0SI2e4boOyJw6GGOvDrZBRqHaPVfxy91LzdQ4E5/VhqMiB8DieIhw/nz7NIHcEiVGJldSV+CI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249824; 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=IDUvrjK68pf787swjbRFwfhRHhyBW2iMlo9TSJvmLf0=; b=mLInHrM7gSPlZBx3pkwn9NQv8Gmdb4oNnfD3ffHGnvhmhnyA5UkMjmijbe8GS4W0Vo4HFFr3Txkh0MzAT9XXqbyehSZjLygpCDeuk1uXU41K1exdRmlMc4tfhLIIQPKKwQ7KpwUNJ0qF6LaEZR9L7soupaU4HELaBorhSptj7QU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249824694988.5888678595727; Mon, 28 Oct 2019 01:03:44 -0700 (PDT) Received: from localhost ([::1]:51654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP007-0004xW-Fp for importer@patchew.org; Mon, 28 Oct 2019 04:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46894) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzb4-0006dc-Hg for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzb3-0003Mk-80 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:50 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:48657 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzb3-0003Me-4O for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:37:49 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-199-XJZ44S2INma5kNiI6YXVJQ-1; Mon, 28 Oct 2019 03:37:46 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5D1480183E; Mon, 28 Oct 2019 07:37:44 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB15F19C69; Mon, 28 Oct 2019 07:37:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IDUvrjK68pf787swjbRFwfhRHhyBW2iMlo9TSJvmLf0=; b=hO+O1Nufcx++UQeCgGdTSQ6GMjuiEvwf08i7nCVMlW18Ws9MxJG6YjQG7wtl6jAvzqZAh6 rVEv2q5L/RdVZdh+CDt1QeNJUCMlQGvGRbkbxdnDKXxTxjiOZ2jDKdhN6CfnfD/gMVygI8 T9CA3N0l0hAvRyDuAIimoFiwP5eG2Ws= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 19/26] tests/boot_linux_console: Use Avocado archive::gzip_uncompress() Date: Mon, 28 Oct 2019 08:34:34 +0100 Message-Id: <20191028073441.6448-20-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: XJZ44S2INma5kNiI6YXVJQ-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Avocado 67.0 [*] introduced the avocado.utils.archive module which provides handling of gzip files. Use the gzip_uncompress() method. [*] https://avocado-framework.readthedocs.io/en/67.0/api/utils/avocado.util= s.html#avocado.utils.archive.gzip_uncompress Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- v2: New patch replacing the gunzip() refactor --- tests/acceptance/boot_linux_console.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 67b396169b..a689c09cfe 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -146,10 +146,7 @@ class BootLinuxConsole(MachineTest): initrd_hash =3D 'bf806e17009360a866bf537f6de66590de349a99' initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) initrd_path =3D self.workdir + "rootfs.cpio" - - with gzip.open(initrd_path_gz, 'rb') as f_in: - with open(initrd_path, 'wb') as f_out: - shutil.copyfileobj(f_in, f_out) + archive.gzip_uncompress(initrd_path_gz, initrd_path) =20 self.vm.set_machine('malta') self.vm.set_console() --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248657; cv=none; d=zoho.com; s=zohoarc; b=gNzhVsuRFI3sCm/dW3NDaxMfIK0709Z1PtQ7Q+0pVe4Vf3ggGvMt79UPUZoDYz2fu/MA9sUlybqhXg/47CKfRihmazEUsKLVXzTrIm2jPoEtqizpb3POhR+4prGmfzHhoVwJqxvyIZfKx8D5J7L78z65dIYEWr7x3wWM5/gnNiM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248657; 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=0zsbiJ/WcQ2X2UkFEEiXAZWDMtDJsW1iUIUCVFVZXBM=; b=US52rG9bazojLPiLMmjHxSW7Bza+mw5c/4pRBurTZ6Asiiuy+2AdXn4vFpkv2D4RIkVLMV8dC4+yUyrsdL3tqpwGqLFva0u5kL0kkDX5vn7g21Kl6fP43Ldwu/zvusNPc15SIxejqusG06MEM1Fy5c9pHuNXqKk56Otiar0KG5s= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248657921517.5568253117666; Mon, 28 Oct 2019 00:44:17 -0700 (PDT) Received: from localhost ([::1]:51464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzhI-0008Ix-9c for importer@patchew.org; Mon, 28 Oct 2019 03:44:16 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46945) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbP-0007Bb-F4 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzbN-0003W1-Vt for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:11 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27733 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzbN-0003Vr-SO for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:09 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-283-8d2AE4--PXq2RV6gvLxeMw-1; Mon, 28 Oct 2019 03:38:05 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 599DB80183E; Mon, 28 Oct 2019 07:38:04 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7C1A419C69; Mon, 28 Oct 2019 07:37:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0zsbiJ/WcQ2X2UkFEEiXAZWDMtDJsW1iUIUCVFVZXBM=; b=cghkq5L8CRGYh5F5NdPHlbnh02xyVTE60Gba9HT0NUAEdlxgsiLUsCiWG861b746835sVx UmVnB6Ovr2rWvBfwXaXcPE9k1+4F0wtMyBiuSEwxHxKZEnFpfwJiQ5dx2Ys8wIvByaS2zi v0T0kY0WMAk9oFbC8JUjNQ6XaZS28Bc= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 20/26] tests/boot_linux_console: Add a test for the Raspberry Pi 2 Date: Mon, 28 Oct 2019 08:34:35 +0100 Message-Id: <20191028073441.6448-21-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 8d2AE4--PXq2RV6gvLxeMw-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Similar to the x86_64/pc test, it boots a Linux kernel on a raspi2 board and verify the serial is working. The kernel image and DeviceTree blob are built by the Raspbian project (based on Debian): https://www.raspbian.org/RaspbianImages as recommended by the Raspberry Pi project: https://www.raspberrypi.org/downloads/raspbian/ If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. Alternatively, this test can be run using: $ avocado run -t arch:arm tests/acceptance $ avocado run -t machine:raspi2 tests/acceptance Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: removed debug printf (Cleber) use serial_kernel_cmdline dict --- tests/acceptance/boot_linux_console.py | 36 ++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index a689c09cfe..cc0c73b9c1 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -293,6 +293,42 @@ class BootLinuxConsole(MachineTest): self.vm.launch() self.wait_for_console_pattern('init started: BusyBox') =20 + def do_test_arm_raspi2(self, uart_id): + """ + The kernel can be rebuilt using the kernel source referenced + and following the instructions on the on: + https://www.raspberrypi.org/documentation/linux/kernel/building.md + """ + serial_kernel_cmdline =3D { + 0: 'earlycon=3Dpl011,0x3f201000 console=3DttyAMA0', + } + deb_url =3D ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20190215-1_armhf.deb') + deb_hash =3D 'cd284220b32128c5084037553db3c482426f3972' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, '/boot/kernel7.img= ') + dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') + + self.vm.set_machine('raspi2') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + serial_kernel_cmdline[uart_id]) + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + + def test_arm_raspi2_uart0(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:raspi2 + :avocado: tags=3Ddevice:pl011 + """ + self.do_test_arm_raspi2(0) + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572250001; cv=none; d=zoho.com; s=zohoarc; b=h+hEixoYDRT3Eqi1TeHw0yhhbbNOSNZs2bBGEJQIRkV5bAACGnMuM76J34n2WwC5geDaNdqXg5oeeoIaFsd9SP5q/dhicc/ynFy4gVmqKhIzrCwV+yPZ+8wwF/yMmWIydzvNrpmANA0aVEfrkCwDKXvxktf9LURFlITFIg/QySo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572250001; 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=wtyVhPrMDClfaWp/tnoq600EcuRYbAk2G8WCARC2TA0=; b=lPUAUN9N+6lRJ01oKPzf/lGC12SvgVFKut3tyiDL6ADXn7sgmQkrG3qyccy4Ve9f2NIH569EMdV0pc7bN2Pf1Nbr25mH2HdMIkzukOJEMKcArKdOpU9dPGGzf+9NreeiOxeDLMZfaRqhOJwpakJabvjkNvzpcgHNq1ug8TETgHQ= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572250001066746.3920051627849; Mon, 28 Oct 2019 01:06:41 -0700 (PDT) Received: from localhost ([::1]:51680 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP02w-0002nN-OI for importer@patchew.org; Mon, 28 Oct 2019 04:06:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46975) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzba-0007Rr-1I for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzbY-0003a6-Pl for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:21 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:39674 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzbY-0003Zo-MK for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:20 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-epZOA5yEPHu0YBpzAuv5NA-1; Mon, 28 Oct 2019 03:38:11 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0A46F1800D7E; Mon, 28 Oct 2019 07:38:10 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1731F19C69; Mon, 28 Oct 2019 07:38:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wtyVhPrMDClfaWp/tnoq600EcuRYbAk2G8WCARC2TA0=; b=V+jR5qSKCyCabaVB6Nv+6vjByuRT/JWTQ/0z2FHIIPU8A2HD3UfCk2wUuDR7Gn/z+ew4Q8 U34zsVhSI7kJJnW2zRTkRzqfw+cQ3FyeFkG90Q5r3XQsUemuEnCGctQltpowU5DVmLHg0B /IUHxPmmlzzRPJTzithtnLuyLLIwNh8= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 21/26] tests/boot_linux_console: Test the raspi2 UART1 (16550 based) Date: Mon, 28 Oct 2019 08:34:36 +0100 Message-Id: <20191028073441.6448-22-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: epZOA5yEPHu0YBpzAuv5NA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 The current do_test_arm_raspi2() case tests the PL011 UART0. Our model also supports the AUX UART (16550 based). We can very simply test the UART1 with Linux, modifying the kernel command line. Add few lines to expand our previous test and cover the AUX UART. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/boot_linux_console.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index cc0c73b9c1..1c9ff2bda3 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -301,6 +301,7 @@ class BootLinuxConsole(MachineTest): """ serial_kernel_cmdline =3D { 0: 'earlycon=3Dpl011,0x3f201000 console=3DttyAMA0', + 1: 'earlycon=3Duart8250,mmio32,0x3f215040 console=3DttyS1,1152= 00' } deb_url =3D ('http://archive.raspberrypi.org/debian/' 'pool/main/r/raspberrypi-firmware/' @@ -311,7 +312,7 @@ class BootLinuxConsole(MachineTest): dtb_path =3D self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-= b.dtb') =20 self.vm.set_machine('raspi2') - self.vm.set_console() + self.vm.set_console(console_index=3Duart_id) kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + serial_kernel_cmdline[uart_id]) self.vm.add_args('-kernel', kernel_path, @@ -329,6 +330,14 @@ class BootLinuxConsole(MachineTest): """ self.do_test_arm_raspi2(0) =20 + def test_arm_raspi2_uart1(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:raspi2 + :avocado: tags=3Ddevice:bcm2835_aux + """ + self.do_test_arm_raspi2(1) + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248809; cv=none; d=zoho.com; s=zohoarc; b=TMAydTHfXkb8obHp2FfuJqRZqH+TXphwqttQt2LC0HL7KI+AH4CTUPdBmgQ85Q+rGx8wn1JTmqYVdyX04jTSKtlsLMJO3fnNFG8bzPuda7AtHgf1DHjQtDdmyu+JYxsEBaHxlHzlEvWUuB0kaBHXY32C71geZuItbDunGajXPqw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248809; 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=WF6GzzEko3ocdc0AF5QO7i31FtZyqi6zpgFu5B7Cp+k=; b=JMo7Cht5ERyrWee4DtjYDeAX7V2piPUiEXeBqgV6ou+RO12Y9p6b7dw+GZkS7EysZisF9CABZv9fE1SNuy8L3XXxoXvhsdEE9w6PpMcFghisBveLIIw5Z0a+BaF0IEi7wkj+KVRm0yh5w7NDbDhMTreeTj0jtpUQajO1r9+VM1Y= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248809827395.2703592406758; Mon, 28 Oct 2019 00:46:49 -0700 (PDT) Received: from localhost ([::1]:51494 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzjj-0005CW-Ok for importer@patchew.org; Mon, 28 Oct 2019 03:46:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46993) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbj-0007hJ-Po for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzbi-0003d8-Bh for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:31 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31132 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzbi-0003cy-69 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:30 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-o9fa5DacMEK-P3QSeIR7vA-1; Mon, 28 Oct 2019 03:38:25 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3226A107AD28; Mon, 28 Oct 2019 07:38:24 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C173519C69; Mon, 28 Oct 2019 07:38:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248309; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WF6GzzEko3ocdc0AF5QO7i31FtZyqi6zpgFu5B7Cp+k=; b=aNklq7HQBT7+w7evNTGinrhxXKS2sOx68mrf6btwWMM78cWGosZ4a8IADX8Ah+3F8/6hAw nTRAU6Rmc8SRdz55lneTUZWVF1u7M+DGuh2jTyUplbxKzlfkvWaIjWWznjyGdjJvqaWK54 ZU7aNG8D108B1TWgUVCvdX6T5Oi9i5k= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 22/26] tests/boot_linux_console: Boot Linux and run few commands on raspi3 Date: Mon, 28 Oct 2019 08:34:37 +0100 Message-Id: <20191028073441.6448-23-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: o9fa5DacMEK-P3QSeIR7vA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Add a test which boots Linux and run basic commands using the serial port console. The kernel image is built by the Debian project: https://wiki.debian.org/RaspberryPi The DeviceTree blob comes from the official Raspberry Pi project: https://www.raspberrypi.org/ The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test This test can be run using: $ avocado run --show=3Dconsole,app run -t machine:raspi3 tests/acceptance console: [ 0.000000] Linux version 4.14.0-3-arm64 (debian-kernel@lists= .debian.org) (gcc version 7.2.0 (Debian 7.2.0-18)) #1 SMP Debian 4.14.12-2 = (2018-01-06) console: [ 0.000000] Boot CPU: AArch64 Processor [410fd034] console: [ 0.000000] Machine model: Raspberry Pi 3 Model B console: [ 0.000000] earlycon: pl11 at MMIO 0x000000003f201000 (option= s '') console: [ 0.000000] bootconsole [pl11] enabled [...] console: Starting network: OK console: Found console ttyAMA0 console: Boot successful. console: / # cat /proc/cpuinfo console: processor : 0 console: BogoMIPS : 125.00 console: r : 0x41 console: CPU architecture: 8 console: CPU variant console: : 0x0 console: CPU part : 0xd03 console: CPU revision : 4 console: / # uname -a console: Linux buildroot 4.14.0-3-arm64 #1 SMP Debian 4.14.12-2 (2018-01-= 06) aarch64 GNU/Linux console: reboot console: / # reboot console: / # Found console ttyAMA0 console: Stopping network: OK console: Saving random seed... done. console: Stopping logging: OK console: umount: devtmpfs busy - remounted read-only console: umount: can't unmount /: Invalid argument console: The system is going down NOW! console: Sent SIGTERM to all processes console: Sent SIGKILL to all processes console: Requesting system reboot console: kvm: exiting hardware virtualization console: reboot: Restarting system PASS (11.08 s) Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: Use archive.gzip_uncompress (Cleber) some chars are scrambled on the console? Cleber ran this 100 times and doesn't have issue. --- tests/acceptance/boot_linux_console.py | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 1c9ff2bda3..dc27d79199 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -338,6 +338,54 @@ class BootLinuxConsole(MachineTest): """ self.do_test_arm_raspi2(1) =20 + def test_arm_raspi3_initrd_uart0(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi3 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian/' + '20180106T174014Z/pool/main/l/linux/' + 'linux-image-4.14.0-3-arm64_4.14.12-2_arm64.deb') + deb_hash =3D 'e71c995de57921921895c1162baea5df527d1c6b' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.14.0-3-arm64') + + dtb_url =3D ('https://github.com/raspberrypi/firmware/raw/' + '1.20180313/boot/bcm2710-rpi-3-b.dtb') + dtb_hash =3D 'eb14d67133401ef2f93523be7341456d38bfc077' + dtb_path =3D self.fetch_asset(dtb_url, asset_hash=3Ddtb_hash) + + initrd_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '9b6b392ea7bc15f0d6632328d429d31c9c6273da/rootfs/' + 'arm64/rootfs.cpio.gz') + initrd_hash =3D '6fd05324f17bb950196b5ad9d3a0fa996339f4cd' + initrd_path_gz =3D self.fetch_asset(initrd_url, asset_hash=3Dinitr= d_hash) + initrd_path =3D self.workdir + "rootfs.cpio" + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_machine('raspi3') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,0x3f201000 console=3DttyA= MA0 ' + + 'panic=3D-1 noreboot') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.', + failure_message=3D'-----[ cut here ]= -----') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'BogoMIPS') + exec_command_and_wait_for_pattern(self, 'uname -a', + 'Debian') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249233; cv=none; d=zoho.com; s=zohoarc; b=GKBfg0Zf2mVYYmuOq1YPKCpLF4XcO9tsYpLRo6l6Pg5vvR+DJ8Gpf3vWpQQqwBhzkNWFrTCr9aZ9P2gVUiXZWKF/S2HrXHg92IbE14EZVBIhSO1YS637TEDnjShNYurpbfo8+y56PRQNiw1PKWibmKcSbGpcStDsk4aIEGEuWys= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249233; 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=wtUZK07zgF143OudfE3/tQ5adZlIP+D9GXmgqk/9gR4=; b=ZhED+m1XCIZc30QdaMmfXIQsqXTH/hwx0KtyWx2acHakqYcHNqFG9n0Xx9QQFP1QcfOzWR2ZX6l3YSuX6hnK6/7a/KDg1bmI/dt2kpxnn2F7Q+2AC8BFvyXqTnYQovawzrQ0+769xcu+XqNkd+a7jGd9W60oHUl9zrfqgLwruoU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249233821528.8807778955684; Mon, 28 Oct 2019 00:53:53 -0700 (PDT) Received: from localhost ([::1]:51574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzqa-000273-L2 for importer@patchew.org; Mon, 28 Oct 2019 03:53:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47084) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzbs-0007wX-K8 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzbq-0003j7-UW for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:40 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:54348 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzbq-0003ii-Pm for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:38 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-322-Rnrybw3IOzKAQwTbSGK1dg-1; Mon, 28 Oct 2019 03:38:34 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0BF6A800D41; Mon, 28 Oct 2019 07:38:33 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2352319C69; Mon, 28 Oct 2019 07:38:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248318; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wtUZK07zgF143OudfE3/tQ5adZlIP+D9GXmgqk/9gR4=; b=ONt2lHONdBx7jovZrsVP3uTWBWbCF3bgjGkXOvsOfij7M1Z7BPtL1sxOuoUIFCtGONo/Mz 9u/9qvutRUG2z3752QQgW7nqPu2wK8MVBN633TH5hFgc92gsGVEp9AXZ32O4t+66Tu6FNy 1ZY7UpbIuMvhAnVO39reykjsct3CTdA= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 23/26] tests/boot_linux_console: Test SDHCI and termal sensor on raspi3 Date: Mon, 28 Oct 2019 08:34:38 +0100 Message-Id: <20191028073441.6448-24-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: Rnrybw3IOzKAQwTbSGK1dg-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Add a test which loads the root filesystem on a SD card. Use a kernel recent enough to also test the thermal sensor. The kernel image comes from: https://github.com/sakaki-/bcmrpi3-kernel#description The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: Use archive.gzip_uncompress (Cleber) --- tests/acceptance/boot_linux_console.py | 46 ++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index dc27d79199..44a046bd64 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -386,6 +386,52 @@ class BootLinuxConsole(MachineTest): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 + def test_arm_raspi3_initrd_sd_temp(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:raspi3 + """ + tarball_url =3D ('https://github.com/sakaki-/bcmrpi3-kernel/releas= es/' + 'download/4.19.71.20190910/' + 'bcmrpi3-kernel-4.19.71.20190910.tar.xz') + tarball_hash =3D '844f117a1a6de0532ba92d2a7bceb5b2acfbb298' + tarball_path =3D self.fetch_asset(tarball_url, asset_hash=3Dtarbal= l_hash) + archive.extract(tarball_path, self.workdir) + dtb_path =3D self.workdir + "/boot/bcm2837-rpi-3-b.dtb" + kernel_path =3D self.workdir + "/boot/kernel8.img" + + rootfs_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '9b6b392ea7bc15f0d6632328d429d31c9c6273da/rootfs/' + 'arm64/rootfs.ext2.gz') + rootfs_hash =3D 'dbe4136f0b4a0d2180b93fd2a3b9a784f9951d10' + rootfs_path_gz =3D self.fetch_asset(rootfs_url, asset_hash=3Drootf= s_hash) + rootfs_path =3D self.workdir + "rootfs.ext2" + archive.gzip_uncompress(rootfs_path_gz, rootfs_path) + + self.vm.set_machine('raspi3') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dpl011,0x3f201000 console=3DttyA= MA0 ' + + 'root=3D/dev/mmcblk0 rootwait rw ' + + 'panic=3D-1 noreboot') + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line, + '-drive', 'file=3D' + rootfs_path + ',if=3Dsd,for= mat=3Draw', + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.', + failure_message=3D'-----[ cut here ]= -----') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'Raspberry Pi 3 Model B') + exec_command_and_wait_for_pattern(self, ('cat /sys/devices/virtual= /' + 'thermal/thermal_zone0/te= mp'), + '25178') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572248881; cv=none; d=zoho.com; s=zohoarc; b=SGBMu9yUMzkY2Gk3BDTC2zrT2kYUlBScfe119QkokIsjY5vU/u/moRTHqX3+2LtoCqJj88r6dsZzUEjFSG1WMrJVkDz4iniEELkZGT6H1VqywzusZ3yWrLyIoEizClFSOIO44LL7T8dOgAZAO15TNUEAljisKPIOYYbNjAxYtqU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572248881; 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=5sLCgOX6S3H5yolM93+Jj0jDwGQx0Cw1bIx+0eop0eM=; b=NMpBgl5YN3+roC+q1WjXUu9WabuurOV0qlrQarDyol0/R1YZcq4ibqCa3qtob9qSia8oRspoDwFWfQAPHCpKiHp2b0KwOZFv8W11XhA1HcNpI79fX15Kj+n8bfPkOriAax75UcGxI0WwLtycMK7CbPXV5Cc21KQ7ReLumutNPz8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572248881332515.9448789257203; Mon, 28 Oct 2019 00:48:01 -0700 (PDT) Received: from localhost ([::1]:51496 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzkr-0006TY-7U for importer@patchew.org; Mon, 28 Oct 2019 03:47:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47144) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzc8-00082O-9y for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzc5-0003ra-Vp for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:56 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:56396 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzc5-0003qm-CM for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:53 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-365-jYY4rhNDNv-g8yRVwj6Z6g-1; Mon, 28 Oct 2019 03:38:45 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7BC9D1800D7E; Mon, 28 Oct 2019 07:38:44 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2C3919C69; Mon, 28 Oct 2019 07:38:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5sLCgOX6S3H5yolM93+Jj0jDwGQx0Cw1bIx+0eop0eM=; b=Xl2XCcIUO9uAHNx28eW1Z8tnpt6borcZSh8nOsRYxyKfR3dRJxVbFGrHDfWfB6UG5616Tw JSW8tYpLf05MbPL5EdbBDeaaxRVBQqNSmYmB+uF0IAq7RoD+pM1TCkZpSNo463+ueehpzZ DrkggIScnSLSHJ+GblKb2QEdQ1uisJ4= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 24/26] tests/boot_linux_console: Add initrd test for the Exynos4210 Date: Mon, 28 Oct 2019 08:34:39 +0100 Message-Id: <20191028073441.6448-25-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: jYY4rhNDNv-g8yRVwj6Z6g-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 This test boots a Linux kernel on a smdkc210 board and verify the serial output is working. The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test If ARM is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:arm" tags. This test can be run using: $ IGNORE_AVOCADO_CONSOLE_BUG=3Dyes \ avocado --show=3Dapp,console run -t machine:smdkc210 \ tests/acceptance/boot_linux_console.py console: Booting Linux on physical CPU 0x900 console: Linux version 4.19.0-6-armmp (debian-kernel@lists.debian.org) (g= cc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09= -20) console: CPU: ARMv7 Processor [410fc090] revision 0 (ARMv7), cr=3D10c5387d console: CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instru= ction cache console: OF: fdt: Machine model: Samsung smdkv310 evaluation board based = on Exynos4210 [...] console: Samsung CPU ID: 0x43210211 console: random: get_random_bytes called from start_kernel+0xa0/0x504 wit= h crng_init=3D0 console: percpu: Embedded 17 pages/cpu s39756 r8192 d21684 u69632 console: Built 1 zonelists, mobility grouping on. Total pages: 249152 console: Kernel command line: printk.time=3D0 console=3DttySAC0,115200n8 = earlyprintk random.trust_cpu=3Doff cryptomgr.notests cpuidle.off=3D1 panic= =3D-1 noreboot [...] console: L2C: platform modifies aux control register: 0x02020000 -> 0x3e4= 20001 console: L2C: platform provided aux values permit register corruption. console: L2C: DT/platform modifies aux control register: 0x02020000 -> 0x= 3e420001 console: L2C-310 erratum 769419 enabled console: L2C-310 enabling early BRESP for Cortex-A9 console: L2C-310: enabling full line of zeros but not enabled in Cortex-A9 console: L2C-310 ID prefetch enabled, offset 1 lines console: L2C-310 dynamic clock gating disabled, standby mode disabled console: L2C-310 cache controller enabled, 8 ways, 128 kB console: L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x7e420001 console: Exynos4210 clocks: sclk_apll =3D 12000000, sclk_mpll =3D 12000000 console: sclk_epll =3D 12000000, sclk_vpll =3D 12000000, arm_clk =3D 1200= 0000 [...] console: s3c-i2c 13860000.i2c: slave address 0x00 console: s3c-i2c 13860000.i2c: bus frequency set to 93 KHz console: s3c-i2c 13860000.i2c: i2c-0: S3C I2C adapter [...] console: dma-pl330 12680000.pdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12680000.pdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-32 Num_Events-16 console: dma-pl330 12690000.pdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12690000.pdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-32 Num_Events-16 console: dma-pl330 12850000.mdma: Loaded driver for PL330 DMAC-241330 console: dma-pl330 12850000.mdma: DBUFF-256x8bytes Num_Chans-8 Num_= Peri-1 Num_Events-16 console: dma-pl330 12850000.mdma: PM domain LCD0 will not be powered off console: Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled console: Serial: AMBA driver console: 13800000.serial: ttySAC0 at MMIO 0x13800000 (irq =3D 40, base_ba= ud =3D 0) is a S3C6400/10 console: console [ttySAC0] enabled console: 13810000.serial: ttySAC1 at MMIO 0x13810000 (irq =3D 41, base_ba= ud =3D 0) is a S3C6400/10 console: 13820000.serial: ttySAC2 at MMIO 0x13820000 (irq =3D 42, base_ba= ud =3D 0) is a S3C6400/10 console: 13830000.serial: ttySAC3 at MMIO 0x13830000 (irq =3D 43, base_ba= ud =3D 0) is a S3C6400/10 [...] console: Freeing unused kernel memory: 2048K console: Run /init as init process console: mount: mounting devtmpfs on /dev failed: Device or resource busy console: Starting logging: OK console: Initializing random number generator... random: dd: uninitialize= d urandom read (512 bytes read) console: done. console: Starting network: OK console: Found console ttySAC0 console: Linux version 4.19.0-6-armmp (debian-kernel@lists.debian.org) (g= cc version 8.3.0 (Debian 8.3.0-6)) #1 SMP Debian 4.19.67-2+deb10u1 (2019-09= -20) console: Boot successful. PASS (37.98 s) Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- v2: use archive.gzip_uncompress (Cleber) serial input is not working :( I sometime get (not always): Starting network: OK [ 70.403690] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: [ 70.423212] rcu: 0-...!: (36 GPs behind) idle=3Dc7a/1/0x40000000 sof= tirq=3D287/288 fqs=3D1 [ 70.428209] rcu: (detected by 1, t=3D2602 jiffies, g=3D-443, q=3D220= 9) [ 70.432826] Sending NMI from CPU 1 to CPUs 0: [ 70.473866] NMI backtrace for cpu 0 [ 70.476621] CPU: 0 PID: 112 Comm: cat Not tainted 4.19.0 #1 [ 70.476711] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 70.476916] PC is at mntput_no_expire+0x88/0x464 [ 70.476996] LR is at rcu_is_watching+0x24/0x78 [ 70.477074] pc : [] lr : [] psr: a0000013 [ 70.477150] sp : ee2afdb0 ip : 9dff9a2f fp : ee2aff70 [ 70.477225] r10: 00000142 r9 : ee219dc0 r8 : ee2afec0 [ 70.477302] r7 : ee2afec0 r6 : c0298d6c r5 : ef02c400 r4 : ef018200 [ 70.477385] r3 : c0f99274 r2 : 00000031 r1 : 2e87c000 r0 : a0000013 [ 70.477461] Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment= none [ 70.477537] Control: 10c5387d Table: 6e30806a DAC: 00000051 [ 70.477613] CPU: 0 PID: 112 Comm: cat Not tainted 4.19.0 #1 [ 70.477688] Hardware name: SAMSUNG EXYNOS (Flattened Device Tree) [ 70.477765] [] (unwind_backtrace) from [] (show_stac= k+0x10/0x14) [ 70.477847] [] (show_stack) from [] (dump_stack+0x98= /0xc4) [ 70.477925] [] (dump_stack) from [] (nmi_cpu_backtra= ce+0x6c/0xb4) [ 70.478000] [] (nmi_cpu_backtrace) from [] (handle_I= PI+0x108/0x420) [ 70.478076] [] (handle_IPI) from [] (gic_handle_irq+= 0x98/0x9c) [ 70.478151] [] (gic_handle_irq) from [] (__irq_svc+0= x70/0xb0) [ 70.478226] Exception stack(0xee2afd60 to 0xee2afda8) [ 70.478303] fd60: a0000013 2e87c000 00000031 c0f99274 ef018200 ef02c400 = c0298d6c ee2afec0 [ 70.478378] fd80: ee2afec0 ee219dc0 00000142 ee2aff70 9dff9a2f ee2afdb0 = c01a2fb4 c02b256c [ 70.478453] fda0: a0000013 ffffffff [ 70.478529] [] (__irq_svc) from [] (mntput_no_expire= +0x88/0x464) [ 70.478605] [] (mntput_no_expire) from [] (terminate= _walk+0x154/0x160) [ 70.478681] [] (terminate_walk) from [] (path_openat= +0x324/0xfe4) [ 70.478759] [] (path_openat) from [] (do_filp_open+0= x70/0xdc) [ 70.478835] [] (do_filp_open) from [] (do_sys_open+0= x134/0x1e4) [ 70.478911] [] (do_sys_open) from [] (ret_fast_sysca= ll+0x0/0x28) [ 70.478989] Exception stack(0xee2affa8 to 0xee2afff0) [ 70.479064] ffa0: b6fc7d6c 0000000a ffffff9c bebbf268 = 000a0000 00000000 [ 70.479139] ffc0: b6fc7d6c 0000000a 00000050 00000142 bebbf268 b6fc6970 = b6fc6b28 bebbf254 [ 70.479214] ffe0: b6fc6970 bebbf1e0 b6f9dd94 b6fb0c0c [ 70.484892] rcu: rcu_preempt kthread starved for 2600 jiffies! g-443 f0x= 0 RCU_GP_WAIT_FQS(5) ->state=3D0x402 ->cpu=3D0 [ 70.514943] rcu: RCU grace-period kthread stack dump: [ 70.516687] rcu_preempt I 0 10 2 0x00000000 [ 70.523711] [] (__schedule) from [] (schedule+0x4c/0= xac) [ 70.525103] [] (schedule) from [] (schedule_timeout+= 0x230/0x564) [ 70.526472] [] (schedule_timeout) from [] (rcu_gp_kt= hread+0x6e4/0xbf0) [ 70.527784] [] (rcu_gp_kthread) from [] (kthread+0x1= 38/0x168) [ 70.528989] [] (kthread) from [] (ret_from_fork+0x14= /0x20) [ 70.530387] Exception stack(0xef111fb0 to 0xef111ff8) [ 70.532556] 1fa0: 00000000 00000000 = 00000000 00000000 [ 70.534904] 1fc0: 00000000 00000000 00000000 00000000 00000000 00000000 = 00000000 00000000 [ 70.536920] 1fe0: 00000000 00000000 00000000 00000000 00000013 00000000 Found console ttySAC0 Linux version 4.19.0 (root@591d0a36fd03) (gcc version 6.3.0 20170516 (Debia= n 6.3.0-18)) #1 SMP PREEMPT Fri Oct 4 19:53:43 UTC 2019 Boot successful. / # Also: [ 73.000405] [] (unwind_backtrace) from [] (show_stac= k+0x10/0x14) [ 73.000537] [] (show_stack) from [] (dump_stack+0x98= /0xc4) [ 73.000631] [] (dump_stack) from [] (nmi_cpu_backtra= ce+0x6c/0xb4) [ 73.000701] [] (nmi_cpu_backtrace) from [] (handle_I= PI+0x108/0x420) [ 73.000823] [] (handle_IPI) from [] (gic_handle_irq+= 0x98/0x9c) [ 73.000924] [] (gic_handle_irq) from [] (__irq_svc+0= x70/0xb0) [ 73.000990] Exception stack(0xef123f80 to 0xef123fc8) [ 73.001064] 3f80: 00000001 00000001 00000000 ef11b300 ef122000 c1007470 = c10074b4 00000002 [ 73.001131] 3fa0: 4000406a 410fc090 00000000 00000000 00000000 ef123fd0 = c018759c c010a4c8 [ 73.001196] 3fc0: 20000013 ffffffff [ 73.001262] [] (__irq_svc) from [] (arch_cpu_idle+0x= 24/0x3c) [ 73.001328] [] (arch_cpu_idle) from [] (do_idle+0xcc= /0x168) [ 73.001394] [] (do_idle) from [] (cpu_startup_entry+= 0x18/0x1c) [ 73.001462] [] (cpu_startup_entry) from [<4010276c>] (0x401027= 6c) Based-on: 20190926173428.10713-16-f4bug@amsat.org "tests/boot_linux_console: Extract the gunzip() helper" --- tests/acceptance/boot_linux_console.py | 42 ++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 44a046bd64..cbb8cddf47 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -432,6 +432,48 @@ class BootLinuxConsole(MachineTest): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 + @skipUnless(os.getenv('IGNORE_AVOCADO_CONSOLE_BUG'), 'Console buggy') + def test_arm_exynos4210_initrd(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:smdkc210 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian/' + '20190928T224601Z/pool/main/l/linux/' + 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb= ') + deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.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) + + self.vm.set_machine('smdkc210') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dexynos4210,0x13800000 earlyprin= tk ' + + 'console=3DttySAC0,115200n8 ' + + 'random.trust_cpu=3Doff cryptomgr.notests '= + + 'cpuidle.off=3D1 panic=3D-1 noreboot') + + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.') + # TODO user command, for now the uart is stuck + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572250133; cv=none; d=zoho.com; s=zohoarc; b=VH+w+yogyIRm82g3S2mcbJLy+sBTNLe28qnLqQt9SeBYTkiU1obeeK5MSC2/I0AeUVj+IvgsKlKc8rSYcpW1M2o09/0Xg7rz5h3cbAU9/Hw1O5zF94V8K2r/JUCBewSLZXkmjIvZPsFgLLk/QgWdIZtuVZJ+cUlyrALLpp0KIFM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572250133; 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=TV/dzQWg9sTmKE1T0I+o1dz563MfWvQQek1xQ2H4w3s=; b=cx62hkqZZGEf+5KqrdJ8rzUCEtg29KYffkpZhkcKAvoxmnbxiVup0Aj0p2RJ/k/JBFbTQmc5f22fuQ2I5R0dDdd5YVujoFYXoOogboQ393hCeWUM4qxx+NTRNuXgBR9e0xC7xAOKhJiRkIkXG9n9PZaWHdL8uRjLSE+V0t36bKM= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572250133112331.1524842562412; Mon, 28 Oct 2019 01:08:53 -0700 (PDT) Received: from localhost ([::1]:51700 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iP055-0000lQ-FZ for importer@patchew.org; Mon, 28 Oct 2019 04:08:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47158) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzcA-00082c-2P for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:39:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzc8-0003sh-GM for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:57 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:50646 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzc8-0003s8-7X for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:38:56 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-83-W049WbT0OgKYa7yiMp9PNA-1; Mon, 28 Oct 2019 03:38:51 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86CE680183E; Mon, 28 Oct 2019 07:38:50 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 30FD919C69; Mon, 28 Oct 2019 07:38:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248335; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TV/dzQWg9sTmKE1T0I+o1dz563MfWvQQek1xQ2H4w3s=; b=VvEQDASuyn7A541rQ44Edoi/xmfFyWy/7TudwXG0cvgRAoqihSHVEUk3/cmZauV6vvn8Wx x657yjWEI4lxIFbKn0hMzpDeQ+rS07U9kvDaJQirJq4UDwcdrCNmiBrGMRgLkEEmwqymG9 IKL/1pbfdfuHuTZPumiQH6UjHmyTRbI= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 25/26] tests/boot_linux_console: Add sdcard test for the Exynos4210 Date: Mon, 28 Oct 2019 08:34:40 +0100 Message-Id: <20191028073441.6448-26-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: W049WbT0OgKYa7yiMp9PNA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 This test boots a Linux kernel on a smdkc210 board and verify the serial output is working. The cpio image used comes from the linux-build-test project: https://github.com/groeck/linux-build-test Since this test is not reliable due to clock timing issues, it is disabled with the 'skip' property. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- v2: - use archive.gzip_uncompress (Cleber) - check getenv(AVOCADO_ALLOW_UNTRUSTED_CODE) (pm215) --- tests/acceptance/boot_linux_console.py | 47 ++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index cbb8cddf47..489df4862c 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -13,6 +13,7 @@ import lzma import gzip import shutil =20 +from avocado import skip from avocado import skipUnless from avocado_qemu import MachineTest from avocado_qemu import exec_command_and_wait_for_pattern @@ -474,6 +475,52 @@ class BootLinuxConsole(MachineTest): self.wait_for_console_pattern('Boot successful.') # TODO user command, for now the uart is stuck =20 + @skip("unstable clock timings") + def test_arm_exynos4210_sdcard(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:smdkc210 + """ + deb_url =3D ('https://snapshot.debian.org/archive/debian/' + '20190928T224601Z/pool/main/l/linux/' + 'linux-image-4.19.0-6-armmp_4.19.67-2+deb10u1_armhf.deb= ') + deb_hash =3D 'fa9df4a0d38936cb50084838f2cb933f570d7d82' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path =3D '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv= 310.dtb' + dtb_path =3D self.extract_from_deb(deb_path, dtb_path) + + rootfs_url =3D ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.ext2.gz') + rootfs_hash =3D '093e89d2b4d982234bf528bc9fb2f2f17a9d1f93' + rootfs_path_gz =3D self.fetch_asset(rootfs_url, asset_hash=3Drootf= s_hash) + rootfs_path =3D os.path.join(self.workdir, 'rootfs.ext2') + archive.gzip_uncompress(rootfs_path_gz, rootfs_path) + + self.vm.set_machine('smdkc210') + self.vm.set_console(console_index=3D1) + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=3Dexynos4210,0x13810000 earlyprin= tk ' + + 'console=3DttySAC1,115200n8 ' + + 'random.trust_cpu=3Doff cryptomgr.notests '= + + 'root=3D/dev/mmcblk0 rootwait rw ' + + 'cpuidle.off=3D1 panic=3D-1 noreboot') + + self.vm.add_args('-kernel', kernel_path, + '-dtb', dtb_path, + '-append', kernel_command_line, + # The external MMC is on the 3rd slot + '-drive', 'if=3Dsd,driver=3Dnull-co', + '-drive', 'if=3Dsd,driver=3Dnull-co', + '-drive', 'if=3Dsd,file=3D' + rootfs_path + ',for= mat=3Draw', + '-no-reboot') + self.vm.launch() + + self.wait_for_console_pattern('Boot successful.') + # TODO user command, for now the uart is stuck + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=3Darch:s390x --=20 2.21.0 From nobody Sun May 19 11:31:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.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; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1572249046; cv=none; d=zoho.com; s=zohoarc; b=JCYTG6rKAJzSASKAMBxju3k1crnR7bQQPKLdMjJlbkCAA6LL+0x1HcqlqRp53AHsOZQ7IMLWonbash98+k8rP3vJ/1iU7LMgh+tTHUYDf2FcNArg50GtwVj6byPyQ1JuzAx44SWFc2d1vWzhTxEB8zT/wjkpQtn6K2ArfnoSTDg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572249046; 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=hDDZoBbp0nmoQFmuY1KFWn8uA+svV+IpopWN5pL5EUU=; b=Wh+513Jd2eLuqVBqZKw2oPBaxH+MWumwMnS9K2wvRlBPgmsKJihidl2XJOtCUMbfPCunbZAc6NrPeLjT6GKGZ1ywtUDdlr3Wn1NVkN+anTv669jzx6Q/3ng7fDDLJCFrtLyIb2Qfpba9oN89ssPF44Vs7vOTY9fL4TmyRsKMOW8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=fail; spf=pass (zoho.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 1572249046302897.614202527201; Mon, 28 Oct 2019 00:50:46 -0700 (PDT) Received: from localhost ([::1]:51518 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOznY-0004Ex-Rw for importer@patchew.org; Mon, 28 Oct 2019 03:50:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47189) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iOzcH-0008Cc-MR for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iOzcG-0003wk-9T for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:39:05 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:53448 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iOzcG-0003wb-51 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 03:39:04 -0400 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-167-ozL2vi7CNtGWgIj8KuqghA-1; Mon, 28 Oct 2019 03:38:59 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6C7DA800D41; Mon, 28 Oct 2019 07:38:58 +0000 (UTC) Received: from x1w.redhat.com (ovpn-204-86.brq.redhat.com [10.40.204.86]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 47EAA19C69; Mon, 28 Oct 2019 07:38:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572248343; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hDDZoBbp0nmoQFmuY1KFWn8uA+svV+IpopWN5pL5EUU=; b=AhCe96SSomz+qjuw9/m3q34MK3AjfJD7u9nNyKpB5TTs9BRoJk3LqTsQNTvuRh42b8otWf 4obzWRhniLngasXvB6s48DFqsdHwi2yn+6OnByAYBcF7SKZbMJCL3PONGhKeRgd4U69zCg V5+D1ky0bXkRhNb70T0LKbO7+GhxcKo= From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH 26/26] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu Date: Mon, 28 Oct 2019 08:34:41 +0100 Message-Id: <20191028073441.6448-27-philmd@redhat.com> In-Reply-To: <20191028073441.6448-1-philmd@redhat.com> References: <20191028073441.6448-1-philmd@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: ozL2vi7CNtGWgIj8KuqghA-1 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Eduardo Habkost , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , KONRAD Frederic , Fabien Chouteau , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Kamil Rytarowski , Wainer dos Santos Moschetta , Cleber Rosa , Aleksandar Rikalo , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 This tests boots a Linux kernel on a Malta machine up to a busybox shell on the serial console. Few commands are executed before halting the machine (via reboot). We use the Fedora 24 kernel extracted from the image at: https://fedoraproject.org/wiki/Architectures/MIPS and the initrd cpio image from the kerneltests project: https://kerneltests.org/ If MIPS is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips" tags. Alternatively, this test can be run using: $ AVOCADO_ALLOW_UNTRUSTED_CODE=3Dyes \ avocado --show=3Dconsole run -t arch:mips64el \ tests/acceptance/boot_linux_console.py console: [ 0.000000] Linux version 3.19.3.mtoman.20150408 (mtoman@debi= an-co3-1) (gcc version 5.0.0 20150316 (Red Hat 5.0.0-0.20) (GCC) ) #3 Wed A= pr 8 14:32:50 UTC 2015 console: [ 0.000000] Early serial console at I/O port 0x3f8 (options '= 38400n8') console: [ 0.000000] bootconsole [uart0] enabled console: [ 0.000000] CPU0 revision is: 00018900 (MIPS 5KE) console: [ 0.000000] Checking for the multiply/shift bug... no. console: [ 0.000000] Checking for the daddiu bug... no. [...] console: Boot successful. console: cat /proc/cpuinfo console: / # cat /proc/cpuinfo console: system type : MIPS Malta console: machine : Unknown console: processor : 0 console: cpu model : MIPS 5KE V0.0 console: : 1616.89 console: wait instruction : nouname -a console: microsecond timers : yes console: tlb_entries : 32 console: extra interrupt vector : yes console: hardware watchpoint : yes, count: 1, address/irw mask: [0x0ff= 8] console: isa : mips1 mips2 mips3 mips4 mips5 mips32r1 = mips32r2 mips64r1 mips64r2 console: ASEs implemented : console: shadow register sets : 1 console: kscratch registers : 0 console: package : 0 console: core : 0 console: VCED exceptions : not available console: VCEI exceptions : not available console: / # console: / # uname -a console: Linux buildroot 3.19.3.mtoman.20150408 #3 Wed Apr 8 14:32:50 UTC= 2015 mips64 GNU/Linux console: reboot console: / # console: / # reboot console: / # console: / # reboot: Restarting system PASS (7.04 s) JOB TIME : 7.20 s Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Aleksandar Markovic Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa --- tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 489df4862c..959d4557c9 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -168,6 +168,47 @@ class BootLinuxConsole(MachineTest): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code= ') + def test_mips64el_malta_5KEc_cpio(self): + """ + :avocado: tags=3Darch:mips64el + :avocado: tags=3Dmachine:malta + :avocado: tags=3Dendian:little + """ + kernel_url =3D ('https://github.com/philmd/qemu-testing-blob/' + 'raw/9ad2df38/mips/malta/mips64el/' + 'vmlinux-3.19.3.mtoman.20150408') + kernel_hash =3D '00d1d268fb9f7d8beda1de6bebcc46e884d71754' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + initrd_url =3D ('https://github.com/groeck/linux-build-test/' + 'raw/8584a59e/rootfs/' + 'mipsel64/rootfs.mipsel64r1.cpio.gz') + initrd_hash =3D '1dbb8a396e916847325284dbe2151167' + initrd_path_gz =3D self.fetch_asset(initrd_url, algorithm=3D'md5', + asset_hash=3Dinitrd_hash) + initrd_path =3D self.workdir + "rootfs.cpio" + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D (self.KERNEL_COMMON_COMMAND_LINE + + 'console=3DttyS0 console=3Dtty ' + + 'rdinit=3D/sbin/init noreboot') + self.vm.add_args('-cpu', '5KEc', + '-kernel', kernel_path, + '-initrd', initrd_path, + '-append', kernel_command_line, + '-no-reboot') + self.vm.launch() + wait_for_console_pattern(self, 'Boot successful.') + + exec_command_and_wait_for_pattern(self, 'cat /proc/cpuinfo', + 'MIPS 5KE') + exec_command_and_wait_for_pattern(self, 'uname -a', + '3.19.3.mtoman.20150408') + exec_command_and_wait_for_pattern(self, 'reboot', + 'reboot: Restarting system= ') + def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): kernel_path_xz =3D self.fetch_asset(kernel_url, asset_hash=3Dkerne= l_hash) kernel_path =3D self.workdir + "kernel" --=20 2.21.0