From patchwork Mon Oct 28 23:49:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185783 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="U0XKFwCL"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472Bnz3bNQz9sPK for ; Tue, 29 Oct 2019 11:11:19 +1100 (AEDT) Received: from localhost ([::1]:45904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF6T-0002IN-AY for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:11:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59054) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn7-000307-GU for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmE-0003ql-ML for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:23 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54586 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 1iPEmE-0003qJ-JT for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306622; 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=L8rqAEOeqcMH5O5LT2CXlkrg38F0Ak1yUkMxKzZxiVI=; b=U0XKFwCLQM5+JlrwgKG9i/Mu15YrXvuylNopxJ2UWFBpUT3WoYL7BKFYudiMzJJqyil6oh gBSp7QkPs+/JMZ/RRZxOAj++pAunwQH8dIdTVEJcSvQldW/HCFe8MK8fekcnrxgkw53Xu4 yvbGPDFyhZeR8zKnH4EsSiaZHUAOkuI= 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-91-YCEZPbwgNS23Uwv3kh2aMw-1; Mon, 28 Oct 2019 19:50:18 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2D2201005509; Mon, 28 Oct 2019 23:50:17 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB2465C1D6; Mon, 28 Oct 2019 23:50:14 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 1/16] MAINTAINERS: update location of Python libraries Date: Mon, 28 Oct 2019 19:49:47 -0400 Message-Id: <20191028235002.17691-2-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: YCEZPbwgNS23Uwv3kh2aMw-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Commit 8f8fd9ed introduced the python directory structure, but forgot to update the path pattern on the MAINTAINERS file. Signed-off-by: Cleber Rosa --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 42e702f346..a0dd1041b2 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2001,7 +2001,7 @@ Python scripts M: Eduardo Habkost M: Cleber Rosa S: Odd fixes -F: scripts/qmp/* +F: python/qemu/*py F: scripts/*.py F: tests/*.py From patchwork Mon Oct 28 23:49:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185771 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="NZnfAcSO"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BSl4QxGz9sPT for ; Tue, 29 Oct 2019 10:56:23 +1100 (AEDT) Received: from localhost ([::1]:45668 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEs0-0008Jn-Vb for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:56:21 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn7-000308-9D for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmH-0003rR-4p for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:26 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:47452 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 1iPEmH-0003rE-16 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306624; 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=j6XMJ7oaR6H4k2ejCpBmhtIkHf4Dl/cHAsvxZUwenwE=; b=NZnfAcSOixTXtgYbEhaR6PRr6VxNIjO18fNcrc5ajC72wgJryNmBogFpGbFCM+lilV13mA hZ/C6g/vuXjkmUT+L0rPVjvP2B0tYxQHzWB7RCVvL3UPCn4L/wxImSyNgE0CX8jxqYhfVg XWwPNwBeYJGFneazhn52JI9P5tss97Y= 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-247-i_iCR8-qOzKyTItekElhoA-1; Mon, 28 Oct 2019 19:50:20 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5BFF61800DCB; Mon, 28 Oct 2019 23:50:19 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5AD0A5C1B2; Mon, 28 Oct 2019 23:50:17 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 2/16] Acceptance tests: work around socket dir Date: Mon, 28 Oct 2019 19:49:48 -0400 Message-Id: <20191028235002.17691-3-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: i_iCR8-qOzKyTItekElhoA-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Change 32558ce7a4 introduced specific directories for the socket dir when using python/qemu/machine.py:QEMUMachine. iotests probably didn't catch the condition that two simultaneous QEMUMachine instances, without manually set temporary or socket dirs would clash. Having two QEMUMachine instances is a condition expected for many acceptance tests, and it's already used by the migration tests. Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index bd41e0443c..711c29609a 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -11,6 +11,7 @@ import os import sys import uuid +import tempfile import avocado @@ -69,7 +70,7 @@ class Test(avocado.Test): self.cancel("No QEMU binary defined or found in the source tree") def _new_vm(self, *args): - vm = QEMUMachine(self.qemu_bin) + vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp()) if args: vm.add_args(*args) return vm From patchwork Mon Oct 28 23:49:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185782 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="deICxhNr"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BmK6Xdkz9sPK for ; Tue, 29 Oct 2019 11:09:53 +1100 (AEDT) Received: from localhost ([::1]:45890 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF55-0000Ts-PD for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:09:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59076) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn6-00030D-Ks for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmH-0003rm-Ua for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:27 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:60548 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 1iPEmH-0003rd-Qm for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306625; 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=HOgyww85CaZTd33qjudOfCpcXibyYIgkL0SAsN2TQtI=; b=deICxhNrxb9hiU5MmH6wPIMlIm5N7acyYe+aiZecs1wKMGBYbrRiG2hs/CMOMj5u9JuauF wOztrxDBWNqyFksZ29ttmzb8Qz+pRPpP7cnljQDjTwHpuAP3KwiCRNJKWNHLPilUGYdnIs frCjX8Nx3dqBLEjfQmEWZIN6Pd5/kJE= 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-246-1ta5b690MvGw4gmZGWRACg-1; Mon, 28 Oct 2019 19:50:23 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8C63A8017DD; Mon, 28 Oct 2019 23:50:21 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8B90D5C1B2; Mon, 28 Oct 2019 23:50:19 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 3/16] Python libs: close console sockets before shutting down the VMs Date: Mon, 28 Oct 2019 19:49:49 -0400 Message-Id: <20191028235002.17691-4-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 1ta5b690MvGw4gmZGWRACg-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Currently, the console socket on QEMUMachine is closed after the QMP command to gracefully exit QEMU is executed. Because of a possible deadlock (QEMU waiting for the socket to become writable) let's close the console socket earlier. Reference: <20190607034214.GB22416@habkost.net> Reference: https://bugs.launchpad.net/qemu/+bug/1829779 From: Eduardo Habkost Signed-off-by: Cleber Rosa Message-Id: <20190911023558.4880-2-crosa@redhat.com> --- python/qemu/machine.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/qemu/machine.py b/python/qemu/machine.py index 2024e8b1b1..a4631d6934 100644 --- a/python/qemu/machine.py +++ b/python/qemu/machine.py @@ -277,10 +277,6 @@ class QEMUMachine(object): self._qemu_log_path = None - if self._console_socket is not None: - self._console_socket.close() - self._console_socket = None - if self._temp_dir is not None: shutil.rmtree(self._temp_dir) self._temp_dir = None @@ -342,6 +338,13 @@ class QEMUMachine(object): """ Terminate the VM and clean up """ + # If we keep the console socket open, we may deadlock waiting + # for QEMU to exit, while QEMU is waiting for the socket to + # become writeable. + if self._console_socket is not None: + self._console_socket.close() + self._console_socket = None + if self.is_running(): try: if not has_quit: From patchwork Mon Oct 28 23:49:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185770 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="gRRRKzJn"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BRn37Lwz9sPT for ; Tue, 29 Oct 2019 10:55:33 +1100 (AEDT) Received: from localhost ([::1]:45658 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPErC-0007Bo-NU for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:55:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn6-00030E-4C for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmM-0003t5-DM for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:31 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:28248 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 1iPEmM-0003sw-9S for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306629; 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=i+lJPdsGeMs3BF2wFOXYa7r3dy/b1LSDIBRWO5Wf60Y=; b=gRRRKzJnabsZkNZ1bmrJGPHnXbVb48jjSDvvxx4M4nit+ttgtc6juDK2sJ92Sc51t0GNeD i10HFHgwY6KIZ2904/ZSONnH5Wlw2uz/V06auoq2bnIDTahxV9vHQNZfvEEOVU+nO94muz f9e9TTh0f1q1RxDOeKuc5Bbt5MCslsg= 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-130-Q5dPP90nPsOLDaZhJWiXhQ-1; Mon, 28 Oct 2019 19:50:26 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5673B1005509; Mon, 28 Oct 2019 23:50:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEC065C1B2; Mon, 28 Oct 2019 23:50:21 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 4/16] Acceptance tests: refactor wait_for_console_pattern Date: Mon, 28 Oct 2019 19:49:50 -0400 Message-Id: <20191028235002.17691-5-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Q5dPP90nPsOLDaZhJWiXhQ-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Markovic , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" 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é [PMD: failure_message is optional] Reviewed-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Aleksandar Markovic Message-Id: <20191028073441.6448-3-philmd@redhat.com> Signed-off-by: Cleber Rosa --- 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/avocado_qemu/__init__.py index 711c29609a..772771e205 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. +import logging import os import sys import uuid @@ -54,6 +55,30 @@ def pick_default_qemu_bin(arch=None): return qemu_bin_from_src_dir_path +def wait_for_console_pattern(test, success_message, failure_message=None): + """ + 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 = test.vm.console_socket.makefile() + console_logger = logging.getLogger('console') + while True: + msg = 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 = 'Failure message found in console: %s' % failure_message + test.fail(fail) + + class Test(avocado.Test): def setUp(self): self._vms = {} 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. import os -import logging import lzma import gzip import shutil from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive @@ -29,31 +29,14 @@ class BootLinuxConsole(Test): KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' - def wait_for_console_pattern(self, success_message, - failure_message='Kernel panic - not syncing'): - """ - Waits for messages to appear on the console, while logging the content - - :param success_message: if this message appears, test succeeds - :param failure_message: if this message appears, test fails - """ - console = self.vm.console_socket.makefile() - console_logger = logging.getLogger('console') - while True: - msg = console.readline().strip() - if not msg: - continue - console_logger.debug(msg) - if success_message in msg: - break - if failure_message in msg: - fail = '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='Kernel panic - not syncing') def exec_command_and_wait_for_pattern(self, command, success_message): command += '\n' self.vm.console_socket.sendall(command.encode()) - self.wait_for_console_pattern(success_message) + wait_for_console_pattern(self, success_message) def extract_from_deb(self, deb, path): """ diff --git a/tests/acceptance/linux_ssh_mips_malta.py b/tests/acceptance/linux_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 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() - def wait_for_console_pattern(self, success_message, - failure_message='Oops'): - console = self.vm.console_socket.makefile() - console_logger = logging.getLogger('console') - while True: - msg = console.readline() - console_logger.debug(msg.strip()) - if success_message in msg: - break - if failure_message in msg: - fail = 'Failure message found in console: %s' % failure_message - self.fail(fail) - def get_portfwd(self): res = self.vm.command('human-monitor-command', command_line='info usernet') @@ -137,7 +125,7 @@ class LinuxSSH(Test): self.log.info('VM launched, waiting for sshd') console_pattern = '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') 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') def ssh_command_output_contains(self, cmd, exp): stdout, _ = self.ssh_command(cmd) From patchwork Mon Oct 28 23:49:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185780 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="glkLJMlb"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472Bkn5n4Gz9sPL for ; Tue, 29 Oct 2019 11:08:33 +1100 (AEDT) Received: from localhost ([::1]:45868 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF3n-00079o-D6 for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:08:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn4-00030E-TJ for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmR-0003xv-5A for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:36 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:54486 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 1iPEmR-0003xC-1X for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306634; 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=/cgQukRAWddgzjzbqA/mcrum0TVlpYTggbK1d81oqY4=; b=glkLJMlbj+KfxcNCEnJhDObyZ7634sdCb6GDR+98u4EHxw9ZB0l8Me/G1Lt5n+0d9xJJW5 o1KfX7xQB4O4toAtGRgZudwSXdIn2Tvs36hSv88+0P7V4KWpe4Y0HzyaoANgfUHPT5kTbe YeIRuHnvGgbs8EAOzhrY5dLx0kzF2Sg= 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-161-yeC7rHUWO2ybIsovaoSUFQ-1; Mon, 28 Oct 2019 19:50:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0D66981A334; Mon, 28 Oct 2019 23:50:29 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 869705C1B2; Mon, 28 Oct 2019 23:50:24 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 5/16] tests/acceptance: Fix wait_for_console_pattern() hangs Date: Mon, 28 Oct 2019 19:49:51 -0400 Message-Id: <20191028235002.17691-6-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: yeC7rHUWO2ybIsovaoSUFQ-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Markovic , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é Message-Id: <20191028073441.6448-4-philmd@redhat.com> Reviewed-by: Cleber Rosa Reviewed-by: Aleksandar Markovic [Cleber: corrected small typo in commit message] Signed-off-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/avocado_qemu/__init__.py index 772771e205..393fc33f35 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -75,6 +75,7 @@ def wait_for_console_pattern(test, success_message, failure_message=None): if success_message in msg: break if failure_message and failure_message in msg: + console.close() fail = 'Failure message found in console: %s' % failure_message test.fail(fail) From patchwork Mon Oct 28 23:49:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185779 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="R3HFYWMW"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472Bj40H2Zz9sPK for ; Tue, 29 Oct 2019 11:07:03 +1100 (AEDT) Received: from localhost ([::1]:45842 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF2K-0005KX-Um for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:07:00 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59054) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn3-000307-Rf for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmY-00040t-Iv for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:43 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35308 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 1iPEmY-00040f-G5 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306642; 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=D60C1B6j40/xKujQxkynhtNW5EBcDl0bECXbMW//MkA=; b=R3HFYWMW0xSWn+a5V/LHLt7v/NkXvqv+3rDZzBqikVypx66dij1ytO0NKYlg/yab9hsXM6 VBlaoaoU3JpBSvoUSI02t/MJBCx38HhiYWePUUn3yWcRUP5npvb7fRC/ml/nx5oP2iePIs 3e96lPr06Xqne6WkMRpQdytKljtH9RU= 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-53-Ncnd7w8cMFWbaIwmH9hmKg-1; Mon, 28 Oct 2019 19:50:38 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6870E107AD28; Mon, 28 Oct 2019 23:50:36 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D3095C1B2; Mon, 28 Oct 2019 23:50:29 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 6/16] tests/acceptance: Send on serial lines Date: Mon, 28 Oct 2019 19:49:52 -0400 Message-Id: <20191028235002.17691-7-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Ncnd7w8cMFWbaIwmH9hmKg-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Some firmwares don't parse the control character and expect a . Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-5-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- 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='Kernel panic - not syncing') def exec_command_and_wait_for_pattern(self, command, success_message): - command += '\n' + command += '\r' self.vm.console_socket.sendall(command.encode()) wait_for_console_pattern(self, success_message) From patchwork Mon Oct 28 23:49:53 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185773 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="KHVPE16a"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BT20Z2zz9sPc for ; Tue, 29 Oct 2019 10:56:37 +1100 (AEDT) Received: from localhost ([::1]:45672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEsE-0000F9-8P for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:56:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn3-00030E-Fg for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEma-00041n-Jh for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:45 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54333 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 1iPEma-00041H-Fg for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306644; 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=eNYuARwovOoLWb259uZR+n10D9sLe3CuNjzA1k/qwIs=; b=KHVPE16aYdhzgxRi/ZbEilf1+GDdL2nUEYxOOxEFZSRGeNe2hHs3jx6x1AZSqVwAwWdTvb bcHRAF+MUNgENGCB8IuB+mmQPs/F3zeyVLSlV01bRy6dzCR92uoG9/VU/f1eTpJ4SX43ln K77wOa8AwGEzobgYu/r8diOGWPgBY6M= 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-119-AUkj7kUlO3uX1LW3udXcvg-1; Mon, 28 Oct 2019 19:50:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 991CC81A334; Mon, 28 Oct 2019 23:50:38 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9856D5C1B2; Mon, 28 Oct 2019 23:50:36 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 7/16] tests/acceptance: Refactor exec_command_and_wait_for_pattern() Date: Mon, 28 Oct 2019 19:49:53 -0400 Message-Id: <20191028235002.17691-8-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: AUkj7kUlO3uX1LW3udXcvg-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Refactor the exec_command_and_wait_for_pattern() utility method so we can reuse it in other files. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-6-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- 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/avocado_qemu/__init__.py index 393fc33f35..9a57c020d8 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -80,6 +80,25 @@ def wait_for_console_pattern(test, success_message, failure_message=None): test.fail(fail) +def exec_command_and_wait_for_pattern(test, command, + success_message, failure_message=None): + """ + 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 += '\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 = {} 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 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='Kernel panic - not syncing') - def exec_command_and_wait_for_pattern(self, command, success_message): - command += '\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.') - 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') def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) From patchwork Mon Oct 28 23:49:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185778 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="VQNadjl1"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BgD1xrjz9sPK for ; Tue, 29 Oct 2019 11:05:28 +1100 (AEDT) Received: from localhost ([::1]:45774 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF0n-0002nQ-Mi for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:05:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59054) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn2-000307-Ms for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmc-00042j-P5 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:47 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:32430 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 1iPEmc-00042d-M2 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306646; 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=zT/uKBaLW1ih4CcLIRZ9X0OUaI2DVTbf1uOXVEtrFYQ=; b=VQNadjl1tQewleJke0hjv1WkmAsQ0ewn9NRO3MSGgFlvjOyd0s4Ulq093eiG3FaWioprMm R9VzWG2+8ru7bZvO5SSNRXqaNHi2m6wr+OdbAKdAbjwsdGEWYtqQ6OQxocRN1iErLAq8RR PsVYD7ruQM66PtDYasdxdQKruqDD7pw= 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-273-NepKPLkKNXSsxz3xPEDsCA-1; Mon, 28 Oct 2019 19:50:42 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E94668017DD; Mon, 28 Oct 2019 23:50:40 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA6E95C1B2; Mon, 28 Oct 2019 23:50:38 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 8/16] tests/acceptance: Add test that boots the HelenOS microkernel on Leon3 Date: Mon, 28 Oct 2019 19:49:54 -0400 Message-Id: <20191028235002.17691-9-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: NepKPLkKNXSsxz3xPEDsCA-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Release notes: http://www.helenos.org/wiki/Download#HelenOS0.6.0 Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-11-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa [Cleber: added/removed needed/unneeded imports] Signed-off-by: Cleber Rosa --- MAINTAINERS | 1 + tests/acceptance/machine_sparc_leon3.py | 34 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 tests/acceptance/machine_sparc_leon3.py diff --git a/MAINTAINERS b/MAINTAINERS index a0dd1041b2..afcd365550 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 S390 Machines ------------- diff --git a/tests/acceptance/machine_sparc_leon3.py b/tests/acceptance/machine_sparc_leon3.py new file mode 100644 index 0000000000..298f1e25e6 --- /dev/null +++ b/tests/acceptance/machine_sparc_leon3.py @@ -0,0 +1,34 @@ +# Functional test that boots a Leon3 machine and checks its serial console. +# +# Copyright (c) Philippe Mathieu-Daudé +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern + + +class Leon3Machine(Test): + + timeout = 60 + + def test_leon3_helenos_uimage(self): + """ + :avocado: tags=arch:sparc + :avocado: tags=machine:leon3 + :avocado: tags=binfmt:uimage + """ + kernel_url = ('http://www.helenos.org/releases/' + 'HelenOS-0.6.0-sparc32-leon3.bin') + kernel_hash = 'a88c9cfdb8430c66650e5290a08765f9bf049a30' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + 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 project') + wait_for_console_pattern(self, 'Booting the kernel ...') From patchwork Mon Oct 28 23:49:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185777 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="baWaSTrN"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BbS4ddkz9sP3 for ; Tue, 29 Oct 2019 11:02:12 +1100 (AEDT) Received: from localhost ([::1]:45748 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPExc-0007aG-Sc for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:02:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn2-00030E-Gn for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmi-000447-6E for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:53 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:27111 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 1iPEmi-00043x-2O for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306651; 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=T/h5Mu4l1z5TOdMHU7EB2bBpFUlN0UPgScRucOaFCRw=; b=baWaSTrN6iu2xntt//xaG3TIQfun3IZMk7Cl1SM23Xtn5F/+XiV2X99Spqe8dIaJhvj+5g U9erYKTZqEIWFpW462bIHGVwoESrt1m/heoKAj5vJq0WzJ2BTt7ZTNPN4iFJwHZNYHbSJy Muk0rOxPjYmolfQzWrO+NYafaHxFGaU= 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-17-KEOnj2NhNoi_Zl0145RD9A-1; Mon, 28 Oct 2019 19:50:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 412C9476; Mon, 28 Oct 2019 23:50:43 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 257F55C1B2; Mon, 28 Oct 2019 23:50:41 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 9/16] .travis.yml: Let the avocado job run the Leon3 test Date: Mon, 28 Oct 2019 19:49:55 -0400 Message-Id: <20191028235002.17691-10-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: KEOnj2NhNoi_Zl0145RD9A-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-13-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index ba3a8d4cfc..6ebd1af0d9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -271,7 +271,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu,m68k-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" - TEST_CMD="make check-acceptance" after_failure: - cat tests/results/latest/job.log From patchwork Mon Oct 28 23:49:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185767 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Muh724mI"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BPS3BhZz9sPT for ; Tue, 29 Oct 2019 10:53:32 +1100 (AEDT) Received: from localhost ([::1]:45634 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEpF-0004Yk-Jw for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:53:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn1-000308-67 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmk-00045H-NB for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:56 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:38677 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 1iPEmk-00045A-KR for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:54 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306654; 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=ZeUyr4ytnloREd1L+Vsz1Ls1g+aMkFA2jKA84mjEBNc=; b=Muh724mIPmk3XsMMwyMQpySSE3TuYF8ndGiWIZjDkBsbHpFCTtlEXVEZLxa193OaS5EpRi pChwv2nx7tFr6hzOzdz656dahflbvSmZEuxjGJd6CHa5Uvd9LBuoPk5HOhXDjNSWjwwnZl jiNZgFw0ydkL1eS2Xv+esmSIM3xaJb8= 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-425-NVBjm32MOs-ukRIA7ceBfw-1; Mon, 28 Oct 2019 19:50:50 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7A6B4476; Mon, 28 Oct 2019 23:50:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 721C25C1B2; Mon, 28 Oct 2019 23:50:43 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 10/16] tests/acceptance: Add test that runs NetBSD 4.0 installer on PRep/40p Date: Mon, 28 Oct 2019 19:49:56 -0400 Message-Id: <20191028235002.17691-11-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: NVBjm32MOs-ukRIA7ceBfw-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , Artyom Tarasenko , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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é Poussineau Acked-by: David Gibson Acked-by: Artyom Tarasenko Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-14-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa [Cleber: fixed file name and imports] Signed-off-by: Cleber Rosa --- MAINTAINERS | 1 + tests/acceptance/ppc_prep_40p.py | 49 ++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 tests/acceptance/ppc_prep_40p.py diff --git a/MAINTAINERS b/MAINTAINERS index afcd365550..eafc48ff9a 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/ppc_prep_40p.py sPAPR M: David Gibson diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_40p.py new file mode 100644 index 0000000000..9d95e18fcb --- /dev/null +++ b/tests/acceptance/ppc_prep_40p.py @@ -0,0 +1,49 @@ +# Functional test that boots a PReP/40p machine and checks its serial console. +# +# Copyright (c) Philippe Mathieu-Daudé +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os + +from avocado import skipIf +from avocado import skipUnless +from avocado_qemu import Test +from avocado_qemu import wait_for_console_pattern + + +class IbmPrep40pMachine(Test): + + timeout = 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 disclosure + # 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=arch:ppc + :avocado: tags=machine:40p + :avocado: tags=slowness:high + """ + bios_url = ('ftp://ftp.boulder.ibm.com/rs6000/firmware/' + '7020-40p/P12H0456.IMG') + bios_hash = '1775face4e6dc27f3a6ed955ef6eb331bf817f03' + bios_path = self.fetch_asset(bios_url, asset_hash=bios_hash) + drive_url = ('https://ftp.netbsd.org/pub/NetBSD/NetBSD-archive/' + 'NetBSD-4.0/prep/installation/floppy/generic_com0.fs') + drive_hash = 'dbcfc09912e71bd5f0d82c7c1ee43082fb596ceb' + drive_path = self.fetch_asset(drive_url, asset_hash=drive_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 = 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 2007' + wait_for_console_pattern(self, os_banner) + wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') From patchwork Mon Oct 28 23:49:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185774 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="UH84qZt1"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BW34j28z9sPT for ; Tue, 29 Oct 2019 10:58:23 +1100 (AEDT) Received: from localhost ([::1]:45686 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEtw-0002jd-89 for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:58:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59076) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn1-00030D-24 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmp-00046t-Hc for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:00 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:39610 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 1iPEmp-00046d-Cv for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:50:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306658; 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=jBeA289qT+sjtgs24ntjHLcpADDOYxYMpDL3O+R7zjU=; b=UH84qZt1OWKqN4ONbXuE4D0bHVrGDqLu6ycZzzg8NBo4CwEyWgP+9Ja6q0dGG9eMD3ohFJ owlAAH+qCNcacW2gfvtk/B34UuJIA/94SRMNn0VydoYQXeGNWRygWfh30g8Z7qRFqF6lS5 JRF930cvbyi9ib+w1K7zNN+jjGdM3P8= 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-382-Qk6WEPk2PAyIO6o0jWdbHg-1; Mon, 28 Oct 2019 19:50:56 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 10E76107AD29; Mon, 28 Oct 2019 23:50:55 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A9D645C1B2; Mon, 28 Oct 2019 23:50:48 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 11/16] tests/acceptance: Test OpenBIOS on the PReP/40p Date: Mon, 28 Oct 2019 19:49:57 -0400 Message-Id: <20191028235002.17691-12-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Qk6WEPk2PAyIO6o0jWdbHg-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno , David Gibson Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé User case from: https://mail.coreboot.org/pipermail/openbios/2018-May/010360.html Acked-by: David Gibson Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-16-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa [Cleber: added skip conditional for Travis] Signed-off-by: Cleber Rosa --- tests/acceptance/ppc_prep_40p.py | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/acceptance/ppc_prep_40p.py b/tests/acceptance/ppc_prep_40p.py index 9d95e18fcb..6f507fb0a6 100644 --- a/tests/acceptance/ppc_prep_40p.py +++ b/tests/acceptance/ppc_prep_40p.py @@ -47,3 +47,36 @@ class IbmPrep40pMachine(Test): os_banner = 'NetBSD 4.0 (GENERIC) #0: Sun Dec 16 00:49:40 PST 2007' wait_for_console_pattern(self, os_banner) wait_for_console_pattern(self, 'Model: IBM PPS Model 6015') + + def test_openbios_192m(self): + """ + :avocado: tags=arch:ppc + :avocado: tags=machine: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') + + @skipIf(os.getenv('CONTINUOUS_INTEGRATION'), 'Running on Travis-CI') + def test_openbios_and_netbsd(self): + """ + :avocado: tags=arch:ppc + :avocado: tags=machine:40p + """ + drive_url = ('https://ftp.netbsd.org/pub/NetBSD/iso/7.1.2/' + 'NetBSD-7.1.2-prep.iso') + drive_hash = 'ac6fa2707d888b36d6fa64de6e7fe48e' + drive_path = self.fetch_asset(drive_url, asset_hash=drive_hash, + algorithm='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') From patchwork Mon Oct 28 23:49:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185765 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="fLdFirld"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BMz57D5z9sPT for ; Tue, 29 Oct 2019 10:52:15 +1100 (AEDT) Received: from localhost ([::1]:45626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEo1-0003ZO-4j for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:52:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn0-000308-6T for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmu-0004A2-9V for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:05 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:39705 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 1iPEmu-00049U-5F for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306663; 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=5L9YnuQ9YC4Azi5dIADYIT89dhC9ga7ffgmQ0bJZCwo=; b=fLdFirldytklqVZJI7poOW5WnNAzP5T/qZVetJc44RxXNcJFbbNessQjeF8V0YS7nr0uMZ jKIJV5ZBmh1z72QrqGs6h+4sWg3AC0Xm1auPw0kVF++c1ZdM5AHNlltp/0KR8SJWk2j1Ou BzHEUs42vJ16O/fLvwQIKjlLwZWVoxc= 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-301-Lo9QtLJzNXiDUze4iH7Ynw-1; Mon, 28 Oct 2019 19:50:59 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5C016476; Mon, 28 Oct 2019 23:50:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 427E75C1B2; Mon, 28 Oct 2019 23:50:55 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 12/16] .travis.yml: Let the avocado job run the 40p tests Date: Mon, 28 Oct 2019 19:49:58 -0400 Message-Id: <20191028235002.17691-13-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: Lo9QtLJzNXiDUze4iH7Ynw-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Acked-by: Alex Bennée Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-18-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6ebd1af0d9..ef63fc16b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -271,7 +271,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu,ppc-softmmu,ppc64-softmmu,m68k-softmmu,sparc-softmmu" - TEST_CMD="make check-acceptance" after_failure: - cat tests/results/latest/job.log From patchwork Mon Oct 28 23:49:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185763 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="Sa/ZLsz1"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BMm022Qz9sPh for ; Tue, 29 Oct 2019 10:52:04 +1100 (AEDT) Received: from localhost ([::1]:45600 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEnp-00030T-1C for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:52:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59055) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEmz-000308-15 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmw-0004Bg-UT for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:23356 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 1iPEmw-0004BP-RX for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306666; 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=H2G7VV+/5dByTZGXfTIBMJMtStNNZRCf8EfsnWjKSKI=; b=Sa/ZLsz17bCsOtvxePPBEHUjLNjhsyIsmrdlBo+oVn1vP11jEQjnw6YzkkeFj9Dj4QevHC mHqVt8orWNhMhVW0BosIy0lxUHxnkoGGVHO9hpTf+UB4LmEe9nfVDdMuivglnOM7n71WNc Qt/P80wMY2q3s3oU3xOzL3F0gacAx5Q= 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-174-4Zb7jMVfM9SGFkS0ttJfzQ-1; Mon, 28 Oct 2019 19:51:01 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id ACAC281A334; Mon, 28 Oct 2019 23:50:59 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D45E5C1B2; Mon, 28 Oct 2019 23:50:57 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 13/16] tests/boot_linux_console: Use Avocado archive::gzip_uncompress() Date: Mon, 28 Oct 2019 19:49:59 -0400 Message-Id: <20191028235002.17691-14-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: 4Zb7jMVfM9SGFkS0ttJfzQ-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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.utils.html#avocado.utils.archive.gzip_uncompress Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-20-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- 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 4b419b0559..67d7e96d98 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -145,10 +145,7 @@ class BootLinuxConsole(Test): initrd_hash = 'bf806e17009360a866bf537f6de66590de349a99' initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) initrd_path = 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) self.vm.set_machine('malta') self.vm.set_console() From patchwork Mon Oct 28 23:50:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185769 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="JsiA26DO"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BRj042nz9sPT for ; Tue, 29 Oct 2019 10:55:29 +1100 (AEDT) Received: from localhost ([::1]:45656 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEr8-00075T-Dr for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:55:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59078) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEmz-00030E-Ts for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEmy-0004Ci-FY for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:09 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:47202 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 1iPEmy-0004CA-Bf for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306667; 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=UWhgKlH5o3d18/XCNXITY8aCThrxw3temt1UK/QzEIE=; b=JsiA26DOXfyKM7tSokNP/1oDp5gCRw150cDkRIN5xGrH2B6sAufzcdBca0mx7C+qQEOYRn letysC6ZTtRCfmHabwftoXNTG6WrRZuqR/QJnL5DkMg7nqESW1zVstcmzSP3yEDxOuXrKe nnTEMubSl+HNf7MYUBc+KbklREcwQhE= 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-32-x-j4Nd05PWmFJh8hXwOceQ-1; Mon, 28 Oct 2019 19:51:03 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 028F91800DCB; Mon, 28 Oct 2019 23:51:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DDA315C1B2; Mon, 28 Oct 2019 23:50:59 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 14/16] tests/boot_linux_console: Add a test for the Raspberry Pi 2 Date: Mon, 28 Oct 2019 19:50:00 -0400 Message-Id: <20191028235002.17691-15-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: x-j4Nd05PWmFJh8hXwOceQ-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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ée Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20191028073441.6448-21-philmd@redhat.com> Signed-off-by: Cleber Rosa --- 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 67d7e96d98..a4fa31b411 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -292,6 +292,42 @@ class BootLinuxConsole(Test): self.vm.launch() self.wait_for_console_pattern('init started: BusyBox') + 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 = { + 0: 'earlycon=pl011,0x3f201000 console=ttyAMA0', + } + deb_url = ('http://archive.raspberrypi.org/debian/' + 'pool/main/r/raspberrypi-firmware/' + 'raspberrypi-kernel_1.20190215-1_armhf.deb') + deb_hash = 'cd284220b32128c5084037553db3c482426f3972' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, '/boot/kernel7.img') + dtb_path = self.extract_from_deb(deb_path, '/boot/bcm2709-rpi-2-b.dtb') + + self.vm.set_machine('raspi2') + self.vm.set_console() + kernel_command_line = (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 = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) + + def test_arm_raspi2_uart0(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:raspi2 + :avocado: tags=device:pl011 + """ + self.do_test_arm_raspi2(0) + def test_s390x_s390_ccw_virtio(self): """ :avocado: tags=arch:s390x From patchwork Mon Oct 28 23:50:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185775 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="LTPbpn8j"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472BW82s3Vz9sPT for ; Tue, 29 Oct 2019 10:58:28 +1100 (AEDT) Received: from localhost ([::1]:45688 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEu1-0002q5-On for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 19:58:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59179) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn5-00037V-UX for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEn3-0004FT-1V for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:14 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:35348 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 1iPEn2-0004F8-U7 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306672; 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=8lYqhnpDphjhwvhSATzYj5m2+OPTg3mWCbrjVjqlZtA=; b=LTPbpn8juGIe9ux/wGyPEL7bj+et0ajPt1oE+5pqZaBOVtBoKzNHv2tohYmJdD5JVupaJr F35+Em6QFE9FvAQCVmFmRnsykj2xvVH4uGi2LiHlrZHlIJCiE2wQtJxH8+u7+Qxi0mCDM1 +WaGLxljH+QPeimwIEfFMVulq44YLH4= 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-398-d7glGpJCPWi6T4ILWJ5OyA-1; Mon, 28 Oct 2019 19:51:08 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C87748017DD; Mon, 28 Oct 2019 23:51:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 334195C1B2; Mon, 28 Oct 2019 23:51:02 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 15/16] tests/boot_linux_console: Add initrd test for the Exynos4210 Date: Mon, 28 Oct 2019 19:50:01 -0400 Message-Id: <20191028235002.17691-16-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: d7glGpJCPWi6T4ILWJ5OyA-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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=yes \ avocado --show=app,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) (gcc 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=10c5387d console: CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction 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 with crng_init=0 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=0 console=ttySAC0,115200n8 earlyprintk random.trust_cpu=off cryptomgr.notests cpuidle.off=1 panic=-1 noreboot [...] console: L2C: platform modifies aux control register: 0x02020000 -> 0x3e420001 console: L2C: platform provided aux values permit register corruption. console: L2C: DT/platform modifies aux control register: 0x02020000 -> 0x3e420001 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 = 12000000, sclk_mpll = 12000000 console: sclk_epll = 12000000, sclk_vpll = 12000000, arm_clk = 12000000 [...] 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 = 40, base_baud = 0) is a S3C6400/10 console: console [ttySAC0] enabled console: 13810000.serial: ttySAC1 at MMIO 0x13810000 (irq = 41, base_baud = 0) is a S3C6400/10 console: 13820000.serial: ttySAC2 at MMIO 0x13820000 (irq = 42, base_baud = 0) is a S3C6400/10 console: 13830000.serial: ttySAC3 at MMIO 0x13830000 (irq = 43, base_baud = 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: uninitialized 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) (gcc 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é Message-Id: <20191028073441.6448-25-philmd@redhat.com> Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa [Cleber: removed conditional to skip test] Signed-off-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 a4fa31b411..dab21b37c4 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -328,6 +328,47 @@ class BootLinuxConsole(Test): """ self.do_test_arm_raspi2(0) + def test_arm_exynos4210_initrd(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:smdkc210 + """ + deb_url = ('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 = 'fa9df4a0d38936cb50084838f2cb933f570d7d82' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, + '/boot/vmlinuz-4.19.0-6-armmp') + dtb_path = '/usr/lib/linux-image-4.19.0-6-armmp/exynos4210-smdkv310.dtb' + dtb_path = self.extract_from_deb(deb_path, dtb_path) + + initrd_url = ('https://github.com/groeck/linux-build-test/raw/' + '2eb0a73b5d5a28df3170c546ddaaa9757e1e0848/rootfs/' + 'arm/rootfs-armv5.cpio.gz') + initrd_hash = '2b50f1873e113523967806f4da2afe385462ff9b' + initrd_path_gz = self.fetch_asset(initrd_url, asset_hash=initrd_hash) + initrd_path = 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 = (self.KERNEL_COMMON_COMMAND_LINE + + 'earlycon=exynos4210,0x13800000 earlyprintk ' + + 'console=ttySAC0,115200n8 ' + + 'random.trust_cpu=off cryptomgr.notests ' + + 'cpuidle.off=1 panic=-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=arch:s390x From patchwork Mon Oct 28 23:50:02 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1185784 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="G3XuamgJ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 472Bqn4sxvz9sPK for ; Tue, 29 Oct 2019 11:12:53 +1100 (AEDT) Received: from localhost ([::1]:45928 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPF7y-0004LU-00 for incoming@patchwork.ozlabs.org; Mon, 28 Oct 2019 20:12:50 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59230) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iPEn7-0003B7-0E for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iPEn5-0004IQ-C0 for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:16 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:50808 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 1iPEn5-0004I5-8l for qemu-devel@nongnu.org; Mon, 28 Oct 2019 19:51:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1572306674; 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=9pYC7CtQixoJGGxvjzcGsmm20Vm5UjTwJbg9lGaG3sk=; b=G3XuamgJnGotElOfxFWys+5D3XdXHqNXtXQZoYTWTnrt0gt9zTjMNv1qnze7vRtCWdMyE6 U9hqe6pJ879MEezdsOE7AA/7m6TkxWfzZKV6e5FSx3vD9Tf1QY2KzY/uPlVoOFUBU9OszO OdiUO/7giy5+yXSkAJOMqU3LrBwIvqI= 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-27-QZ55_FsLONGBqtlpLZ5R4A-1; Mon, 28 Oct 2019 19:51:11 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 37F4E476; Mon, 28 Oct 2019 23:51:09 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-183.rdu2.redhat.com [10.10.123.183]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 048CB5C1B2; Mon, 28 Oct 2019 23:51:06 +0000 (UTC) From: Cleber Rosa To: Peter Maydell , qemu-devel@nongnu.org, Eduardo Habkost Subject: [PULL 16/16] tests/boot_linux_console: Run BusyBox on 5KEc 64-bit cpu Date: Mon, 28 Oct 2019 19:50:02 -0400 Message-Id: <20191028235002.17691-17-crosa@redhat.com> In-Reply-To: <20191028235002.17691-1-crosa@redhat.com> References: <20191028235002.17691-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-MC-Unique: QZ55_FsLONGBqtlpLZ5R4A-1 X-Mimecast-Spam-Score: 0 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 , Aleksandar Markovic , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Fabien Chouteau , KONRAD Frederic , =?utf-8?q?Herv=C3=A9_Poussineau?= , Wainer dos Santos Moschetta , Willian Rampazzo , Cleber Rosa , qemu-ppc@nongnu.org, Aleksandar Rikalo , =?utf-8?q?Alex_Benn?= =?utf-8?b?w6ll?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé 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=yes \ avocado --show=console run -t arch:mips64el \ tests/acceptance/boot_linux_console.py console: [ 0.000000] Linux version 3.19.3.mtoman.20150408 (mtoman@debian-co3-1) (gcc version 5.0.0 20150316 (Red Hat 5.0.0-0.20) (GCC) ) #3 Wed Apr 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: [0x0ff8] 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é Message-Id: <20191028073441.6448-27-philmd@redhat.com> Reviewed-by: Aleksandar Markovic Reviewed-by: Cleber Rosa Tested-by: Cleber Rosa Signed-off-by: Cleber Rosa --- 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 dab21b37c4..9fd65e1ccf 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 +from avocado import skipUnless from avocado_qemu import Test from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern @@ -166,6 +167,47 @@ class BootLinuxConsole(Test): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') + @skipUnless(os.getenv('AVOCADO_ALLOW_UNTRUSTED_CODE'), 'untrusted code') + def test_mips64el_malta_5KEc_cpio(self): + """ + :avocado: tags=arch:mips64el + :avocado: tags=machine:malta + :avocado: tags=endian:little + """ + kernel_url = ('https://github.com/philmd/qemu-testing-blob/' + 'raw/9ad2df38/mips/malta/mips64el/' + 'vmlinux-3.19.3.mtoman.20150408') + kernel_hash = '00d1d268fb9f7d8beda1de6bebcc46e884d71754' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + initrd_url = ('https://github.com/groeck/linux-build-test/' + 'raw/8584a59e/rootfs/' + 'mipsel64/rootfs.mipsel64r1.cpio.gz') + initrd_hash = '1dbb8a396e916847325284dbe2151167' + initrd_path_gz = self.fetch_asset(initrd_url, algorithm='md5', + asset_hash=initrd_hash) + initrd_path = self.workdir + "rootfs.cpio" + archive.gzip_uncompress(initrd_path_gz, initrd_path) + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyS0 console=tty ' + + 'rdinit=/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 = self.fetch_asset(kernel_url, asset_hash=kernel_hash) kernel_path = self.workdir + "kernel"