From patchwork Thu Feb 21 00:57:34 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045673 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bhH42Pcz9s8m for ; Thu, 21 Feb 2019 11:58:55 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51417 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchR-0005fO-IF for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 19:58:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcgj-0005ex-Q3 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwcgj-0000tS-41 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48750) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwcgi-0000tI-Ub; Wed, 20 Feb 2019 19:58:09 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2732181F1B; Thu, 21 Feb 2019 00:58:08 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 35B5A5D6AA; Thu, 21 Feb 2019 00:58:05 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:34 -0500 Message-Id: <20190221005753.27955-2-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 21 Feb 2019 00:58:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 01/20] scripts/qemu.py: log QEMU launch command line X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Even when the launch of QEMU succeeds, it's useful to have the command line recorded. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Cornelia Huck --- scripts/qemu.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 32b00af5cc..ee85309923 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -320,6 +320,7 @@ class QEMUMachine(object): self._pre_launch() self._qemu_full_args = (self._wrapper + [self._binary] + self._base_args() + self._args) + LOG.debug('VM launch command: %r', ' '.join(self._qemu_full_args)) self._popen = subprocess.Popen(self._qemu_full_args, stdin=devnull, stdout=self._qemu_log_file, From patchwork Thu Feb 21 00:57:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045675 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bhK4rXpz9sD4 for ; Thu, 21 Feb 2019 11:58:57 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51423 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchT-0005hM-Gb for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 19:58:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcgm-0005fR-96 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwcgl-0000uI-FK for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34718) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwcgl-0000u0-8N; Wed, 20 Feb 2019 19:58:11 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77320307EA89; Thu, 21 Feb 2019 00:58:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5682C5D6AA; Thu, 21 Feb 2019 00:58:08 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:35 -0500 Message-Id: <20190221005753.27955-3-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 21 Feb 2019 00:58:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 02/20] Acceptance tests: show avocado test execution by default X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The current version of the "check-acceptance" target will only show one line for execution of all tests. That's probably OK if the tests to be run are quick enough and they're always the same. But, there's already one test alone that takes on average ~5 seconds to run, we intend to adapt the list of tests to match the user's build environment (among other choices). Because of that, let's present the default Avocado UI by default. Users can always choose a different output by setting the AVOCADO_SHOW variable. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Cornelia Huck --- .travis.yml | 2 +- tests/Makefile.include | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index baa06b976a..42971484ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -199,7 +199,7 @@ matrix: # Acceptance (Functional) tests - env: - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu" - - TEST_CMD="make AVOCADO_SHOW=app check-acceptance" + - TEST_CMD="make check-acceptance" addons: apt: packages: diff --git a/tests/Makefile.include b/tests/Makefile.include index b39e989f72..93ea42553e 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1089,7 +1089,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results # Controls the output generated by Avocado when running tests. # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". -AVOCADO_SHOW=none +AVOCADO_SHOW=app ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) From patchwork Thu Feb 21 00:57:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444blw646Wz9sBF for ; Thu, 21 Feb 2019 12:02:04 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51487 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwckU-0000BI-GZ for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:02:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcgs-0005lF-A6 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwcgq-0000vd-F4 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35002) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwcgo-0000uf-EN; Wed, 20 Feb 2019 19:58:16 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A04985AFE3; Thu, 21 Feb 2019 00:58:12 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A8B645D6AA; Thu, 21 Feb 2019 00:58:10 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:36 -0500 Message-Id: <20190221005753.27955-4-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 21 Feb 2019 00:58:12 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 03/20] Acceptance tests: improve docstring on pick_default_qemu_bin() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Making it clear what is returned by this utility function. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- tests/acceptance/avocado_qemu/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 1e54fd5932..d8d5b48dac 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -27,6 +27,10 @@ def pick_default_qemu_bin(): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. + + :returns: the path to the default QEMU binary or None if one could not + be found + :rtype: str or None """ arch = os.uname()[4] qemu_bin_relative_path = os.path.join("%s-softmmu" % arch, From patchwork Thu Feb 21 00:57:37 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444blv0LFCz9s8m for ; Thu, 21 Feb 2019 12:02:03 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwckS-00008E-V0 for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:02:01 -0500 Received: from eggs.gnu.org ([209.51.188.92]:32962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcgw-0005oo-2Q for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwcgq-0000vu-JT for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41314) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwcgq-0000vM-D5; Wed, 20 Feb 2019 19:58:16 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C5BF03006048; Thu, 21 Feb 2019 00:58:14 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D26E15D6B3; Thu, 21 Feb 2019 00:58:12 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:37 -0500 Message-Id: <20190221005753.27955-5-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Feb 2019 00:58:14 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 04/20] Acceptance tests: fix doc reference to avocado_qemu directory X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The "this directory" reference is misleading and confusing, it's a leftover from when this text was proposed in a README file inside the "tests/acceptance/avocado_qemu" directory. When that text was moved to the top level docs directory, the reference was not updated. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- docs/devel/testing.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 135743a2bf..ceaaafc69f 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -590,8 +590,9 @@ Alternatively, follow the instructions on this link: Overview -------- -This directory provides the ``avocado_qemu`` Python module, containing -the ``avocado_qemu.Test`` class. Here's a simple usage example: +The ``tests/acceptance/avocado_qemu`` directory provides the +``avocado_qemu`` Python module, containing the ``avocado_qemu.Test`` +class. Here's a simple usage example: .. code:: From patchwork Thu Feb 21 00:57:38 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444blt5CWrz9s5c for ; Thu, 21 Feb 2019 12:02:02 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51481 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwckS-00006c-Mf for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:02:00 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33010) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwch2-0005ts-6C for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:30 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwch0-0000yO-Hm for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:28 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60790) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwch0-0000yA-93; Wed, 20 Feb 2019 19:58:26 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36943C057F2B; Thu, 21 Feb 2019 00:58:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F2ACC5D6AA; Thu, 21 Feb 2019 00:58:14 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:38 -0500 Message-Id: <20190221005753.27955-6-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 21 Feb 2019 00:58:24 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 05/20] Acceptance tests: introduce arch parameter and attribute X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" It's useful to define the architecture that should be used in situations such as: * the intended target of the QEMU binary to be used on tests * the architecture of code to be run within the QEMU binary, such as a kernel image or a full blown guest OS image This commit introduces both a test parameter and a test instance attribute, that will contain such a value. Now, when the "arch" test parameter is given, it will influence the selection of the default QEMU binary, if one is not given explicitly by means of the "qemu_img" parameter. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- docs/devel/testing.rst | 28 +++++++++++++++++++++++ tests/acceptance/avocado_qemu/__init__.py | 14 +++++++++--- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index ceaaafc69f..6035db1b44 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -689,6 +689,21 @@ vm A QEMUMachine instance, initially configured according to the given ``qemu_bin`` parameter. +arch +~~~~ + +The architecture can be used on different levels of the stack, e.g. by +the framework or by the test itself. At the framework level, it will +will currently influence the selection of a QEMU binary (when one is +not explicitly given). + +Tests are also free to use this attribute value, for their own needs. +A test may, for instance, use the same value when selecting the +architecture of a kernel or disk image to boot a VM with. + +The ``arch`` attribute will be set to the test parameter of the same +name, and if one is not given explicitly, it will be set to ``None``. + qemu_bin ~~~~~~~~ @@ -711,6 +726,19 @@ like the following: PARAMS (key=qemu_bin, path=*, default=x86_64-softmmu/qemu-system-x86_64) => 'x86_64-softmmu/qemu-system-x86_64 +arch +~~~~ + +The architecture that will influence the selection of a QEMU binary +(when one is not explicitly given). + +Tests are also free to use this parameter value, for their own needs. +A test may, for instance, use the same value when selecting the +architecture of a kernel or disk image to boot a VM with. + +This parameter has a direct relation with the ``arch`` attribute. If +not given, it will default to None. + qemu_bin ~~~~~~~~ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index d8d5b48dac..f580582602 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -23,16 +23,22 @@ def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) -def pick_default_qemu_bin(): +def pick_default_qemu_bin(arch=None): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. + :param arch: the arch to use when looking for a QEMU binary (the target + will match the arch given). If None (the default) arch + will be the current host system arch (as given by + :func:`os.uname`). + :type arch: str :returns: the path to the default QEMU binary or None if one could not be found :rtype: str or None """ - arch = os.uname()[4] + if arch is None: + arch = os.uname()[4] qemu_bin_relative_path = os.path.join("%s-softmmu" % arch, "qemu-system-%s" % arch) if is_readable_executable_file(qemu_bin_relative_path): @@ -47,8 +53,10 @@ def pick_default_qemu_bin(): class Test(avocado.Test): def setUp(self): self.vm = None + self.arch = self.params.get('arch') + default_qemu_bin = pick_default_qemu_bin(arch=self.arch) self.qemu_bin = self.params.get('qemu_bin', - default=pick_default_qemu_bin()) + default=default_qemu_bin) if self.qemu_bin is None: self.cancel("No QEMU binary defined or found in the source tree") self.vm = QEMUMachine(self.qemu_bin) From patchwork Thu Feb 21 00:57:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045688 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bqb14JHz9s5c for ; Thu, 21 Feb 2019 12:05:15 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51515 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcnZ-0002XA-3u for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:05:13 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwch6-0005uv-3q for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwch4-0000zJ-3I for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45120) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwch2-0000yS-5E; Wed, 20 Feb 2019 19:58:29 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 53A6BC049D67; Thu, 21 Feb 2019 00:58:26 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 632F75D707; Thu, 21 Feb 2019 00:58:24 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:39 -0500 Message-Id: <20190221005753.27955-7-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 21 Feb 2019 00:58:26 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 06/20] Acceptance tests: use "arch:" tag to filter target specific tests X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Currently, the only test that contains some target architecture information is "boot_linux_console.py" which test contains a "x86_64" tag. But that tag is not respected in the default execution, that is, "make check-acceptance" doesn't do anything with it. That said, even the target architecture handling currently present in the "avocado_qemu.Test" class, class is pretty limited. For instance, by default, it chooses a target based on the host architecture. Because the original implementation of the tags feature in Avocado did not include any time of namespace or "key:val" mechanism, no tag has relation to another tag. The new implementation of the tags feature from version 67.0 onwards, allows "key:val" tags, and because of that, a test can be classified with a tag in a given key. For instance, the new proposed version of the "boot_linux_console.py" test, which downloads and attempts to run a x86_64 kernel, is now tagged as: :avocado: tags=arch:x86_64 This means that it can be filtered (out) when no x86_64 target is available. At the same time, tests that don't have a "arch:" tag, will not be filtered out. Signed-off-by: Cleber Rosa --- tests/Makefile.include | 3 +++ tests/acceptance/boot_linux_console.py | 2 +- tests/acceptance/linux_initrd.py | 2 +- tests/acceptance/virtio_version.py | 2 +- tests/requirements.txt | 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 93ea42553e..633992603d 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1090,6 +1090,7 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". AVOCADO_SHOW=app +AVOCADO_TAGS=$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET_DIRS))) ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) @@ -1115,6 +1116,8 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) $(call quiet-command, \ $(TESTS_VENV_DIR)/bin/python -m avocado \ --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ + --filter-by-tags-include-empty --filter-by-tags-include-empty-key \ + $(AVOCADO_TAGS) \ --failfast=on $(SRC_PATH)/tests/acceptance, \ "AVOCADO", "tests/acceptance") diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 98324f7591..46b20bdfe2 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -19,7 +19,7 @@ class BootLinuxConsole(Test): and the kernel command line is properly passed from QEMU to the kernel :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ timeout = 60 diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_initrd.py index 737355c2ef..c75e29be70 100644 --- a/tests/acceptance/linux_initrd.py +++ b/tests/acceptance/linux_initrd.py @@ -19,7 +19,7 @@ class LinuxInitrd(Test): Checks QEMU evaluates correctly the initrd file passed as -initrd option. :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ timeout = 60 diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_version.py index ce990250d8..3b280e7fc3 100644 --- a/tests/acceptance/virtio_version.py +++ b/tests/acceptance/virtio_version.py @@ -62,7 +62,7 @@ class VirtioVersionCheck(Test): `disable-legacy`. :avocado: enable - :avocado: tags=x86_64 + :avocado: tags=arch:x86_64 """ # just in case there are failures, show larger diff: diff --git a/tests/requirements.txt b/tests/requirements.txt index 64c6e27a94..002ded6a22 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,4 +1,4 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 -avocado-framework==65.0 +avocado-framework==68.0 From patchwork Thu Feb 21 00:57:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bqY6xdLz9s5c for ; Thu, 21 Feb 2019 12:05:12 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcnW-0002Un-Ov for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:05:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33042) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwch6-0005ux-4K for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:33 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwch4-0000zn-Pd for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:31 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35158) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwch4-0000yq-2U; Wed, 20 Feb 2019 19:58:30 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7180059444; Thu, 21 Feb 2019 00:58:28 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81A025D6AA; Thu, 21 Feb 2019 00:58:26 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:40 -0500 Message-Id: <20190221005753.27955-8-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 21 Feb 2019 00:58:28 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 07/20] Acceptance tests: look for target architecture in test tags first X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" A test can, optionally, be tagged for one or many architectures. If a test has been tagged for a single architecture, there's a high chance that the test won't run on other architectures. This changes the default order of choosing a default target architecture to use based on the 'arch' tag value first. The precedence order is for choosing a QEMU binary to use for a test is now: * qemu_bin parameter * arch parameter * arch tag value (for example, x86_64 if ":avocado: tags=arch:x86_64 is used) This means that if one runs: $ avocado run -p qemu_bin=/usr/bin/qemu-system-x86_64 test.py No arch parameter or tag will influence the selection of the QEMU target binary. If one runs: $ avocado run -p arch=ppc64 test.py The target binary selection mechanism will attempt to find a binary such as "ppc64-softmmu/qemu-system-ppc64". And finally, if one runs a test that is tagged (in its docstring) with "arch:aarch64": $ avocado run aarch64.py The target binary selection mechanism will attempt to find a binary such as "aarch64-softmmu/qemu-system-aarch64". At this time, no provision is made to cancel the execution of tests if the arch parameter given (manually) does not match the test "arch" tag, but it may be a useful default behavior to be added in the future. Signed-off-by: Cleber Rosa Reviewed-by: Cornelia Huck --- docs/devel/testing.rst | 4 +++- tests/acceptance/avocado_qemu/__init__.py | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 6035db1b44..87bcf8ef43 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -702,7 +702,9 @@ A test may, for instance, use the same value when selecting the architecture of a kernel or disk image to boot a VM with. The ``arch`` attribute will be set to the test parameter of the same -name, and if one is not given explicitly, it will be set to ``None``. +name. If one is not given explicitly, it will either be set to +``None``, or, if the test is tagged with one (and only one) +``:avocado: tags=arch:VALUE`` tag, it will be set to ``VALUE``. qemu_bin ~~~~~~~~ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index f580582602..9e98d113cb 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -53,7 +53,12 @@ def pick_default_qemu_bin(arch=None): class Test(avocado.Test): def setUp(self): self.vm = None - self.arch = self.params.get('arch') + arches = self.tags.get('arch', []) + if len(arches) == 1: + arch = arches.pop() + else: + arch = None + self.arch = self.params.get('arch', default=arch) default_qemu_bin = pick_default_qemu_bin(arch=self.arch) self.qemu_bin = self.params.get('qemu_bin', default=default_qemu_bin) From patchwork Thu Feb 21 00:57:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045690 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444brx0bqCz9s8m for ; Thu, 21 Feb 2019 12:06:25 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51554 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcog-0003Oo-KY for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:06:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33125) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchB-00060R-OT for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwch9-00011i-2f for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63398) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwch7-0000zt-OU; Wed, 20 Feb 2019 19:58:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A5E678553F; Thu, 21 Feb 2019 00:58:30 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A188E5D6AA; Thu, 21 Feb 2019 00:58:28 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:41 -0500 Message-Id: <20190221005753.27955-9-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Thu, 21 Feb 2019 00:58:30 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 08/20] Boot Linux Console Test: rename the x86_64 after the arch and machine X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Given that the test is specific to x86_64 and pc, and new tests are going to be added to the same class, let's rename it accordingly. Also, let's make the class documentation not architecture specific. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- tests/acceptance/boot_linux_console.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 46b20bdfe2..89df7f6e4f 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -15,16 +15,19 @@ from avocado_qemu import Test class BootLinuxConsole(Test): """ - Boots a x86_64 Linux kernel and checks that the console is operational - and the kernel command line is properly passed from QEMU to the kernel + Boots a Linux kernel and checks that the console is operational and the + kernel command line is properly passed from QEMU to the kernel :avocado: enable - :avocado: tags=arch:x86_64 """ timeout = 60 - def test(self): + def test_x86_64_pc(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + """ kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/' 'Everything/x86_64/os/images/pxeboot/vmlinuz') kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a' From patchwork Thu Feb 21 00:57:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045691 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bvB0SNQz9s8m for ; Thu, 21 Feb 2019 12:08:22 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51572 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcqZ-0005Mn-Vv for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:08:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchB-00060W-PL for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwch9-00011d-2H for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:58:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40961) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwch7-00010a-Pz; Wed, 20 Feb 2019 19:58:34 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B9AD23082E69; Thu, 21 Feb 2019 00:58:32 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D09705D704; Thu, 21 Feb 2019 00:58:30 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:42 -0500 Message-Id: <20190221005753.27955-10-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Thu, 21 Feb 2019 00:58:32 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 09/20] Boot Linux Console Test: update the x86_64 kernel X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" To the stock Fedora 29 kernel, from the Fedora 28. New tests will be added using the 29 kernel, so for consistency, let's also update it here. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- tests/acceptance/boot_linux_console.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 89df7f6e4f..35b31162d4 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -28,9 +28,9 @@ class BootLinuxConsole(Test): :avocado: tags=arch:x86_64 :avocado: tags=machine:pc """ - kernel_url = ('https://mirrors.kernel.org/fedora/releases/28/' + kernel_url = ('https://mirrors.kernel.org/fedora/releases/29/' 'Everything/x86_64/os/images/pxeboot/vmlinuz') - kernel_hash = '238e083e114c48200f80d889f7e32eeb2793e02a' + kernel_hash = '23bebd2680757891cf7adedb033532163a792495' kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) self.vm.set_machine('pc') From patchwork Thu Feb 21 00:57:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444c1N74K6z9s5c for ; Thu, 21 Feb 2019 12:13:44 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51691 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcvm-0001hl-Tp for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:13:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33545) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcho-0006dA-T1 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchn-0001HJ-DX for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58734) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchn-00011m-30; Wed, 20 Feb 2019 19:59:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DADAE81F25; Thu, 21 Feb 2019 00:58:34 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E9F9F5D6AA; Thu, 21 Feb 2019 00:58:32 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:43 -0500 Message-Id: <20190221005753.27955-11-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 21 Feb 2019 00:58:35 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 10/20] Boot Linux Console Test: add common kernel command line options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The 'printk.time=0' option makes it easier to parse the console output. Let's set it as a default, and reusable, kernel command line options for this and future similar tests. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- tests/acceptance/boot_linux_console.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 35b31162d4..cc5dcd7373 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -23,6 +23,8 @@ class BootLinuxConsole(Test): timeout = 60 + KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' + def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 @@ -35,7 +37,7 @@ class BootLinuxConsole(Test): self.vm.set_machine('pc') self.vm.set_console() - kernel_command_line = 'console=ttyS0' + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() From patchwork Thu Feb 21 00:57:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045694 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bwV0sxJz9sBF for ; Thu, 21 Feb 2019 12:09:30 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcrf-0006GE-Pp for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:09:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33343) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchh-0006U9-65 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchf-0001Bo-6q for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41410) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchd-00015x-IJ; Wed, 20 Feb 2019 19:59:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E11E30821A1; Thu, 21 Feb 2019 00:58:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 150B45D6AA; Thu, 21 Feb 2019 00:58:34 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:44 -0500 Message-Id: <20190221005753.27955-12-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Thu, 21 Feb 2019 00:58:44 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 11/20] Boot Linux Console Test: increase timeout X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" When running on very low powered environments, some tests may time out causing false negatives. As a conservative change, and for considering that human time (investigating false negatives) is worth more than some extra machine cycles (and time), let's increase the overall timeout. CC: Alex Bennée Signed-off-by: Cleber Rosa Reviewed-by: Cornelia Huck --- 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 cc5dcd7373..fa721a7355 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -21,7 +21,7 @@ class BootLinuxConsole(Test): :avocado: enable """ - timeout = 60 + timeout = 90 KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' From patchwork Thu Feb 21 00:57:45 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045689 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444brt1r5yz9s8m for ; Thu, 21 Feb 2019 12:06:22 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51552 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcoe-0003NN-41 for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:06:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchh-0006U8-62 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchf-0001Bd-68 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41496) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchd-00016D-Cf; Wed, 20 Feb 2019 19:59:05 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 618303006030; Thu, 21 Feb 2019 00:58:46 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6F37B5D6AA; Thu, 21 Feb 2019 00:58:44 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:45 -0500 Message-Id: <20190221005753.27955-13-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Feb 2019 00:58:46 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 12/20] Boot Linux Console Test: refactor the console watcher into utility method X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" This introduces a utility method that monitors the console device and looks for either a message that signals the test success or failure. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Cornelia Huck --- tests/acceptance/boot_linux_console.py | 30 ++++++++++++++++++-------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index fa721a7355..e2ef43e7ce 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -25,6 +25,25 @@ 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() + 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 test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 @@ -41,12 +60,5 @@ class BootLinuxConsole(Test): self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() - console = self.vm.console_socket.makefile() - console_logger = logging.getLogger('console') - while True: - msg = console.readline() - console_logger.debug(msg.strip()) - if 'Kernel command line: %s' % kernel_command_line in msg: - break - if 'Kernel panic - not syncing' in msg: - self.fail("Kernel panic reached") + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57:46 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045692 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bvC6WBcz9s8m for ; Thu, 21 Feb 2019 12:08:23 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcqb-0005Nz-MX for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:08:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchd-0006Sc-K9 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchb-0001A8-Fz for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41056) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwcha-00016s-Ng; Wed, 20 Feb 2019 19:59:03 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80B0A3086275; Thu, 21 Feb 2019 00:58:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F9A15D6AA; Thu, 21 Feb 2019 00:58:46 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:46 -0500 Message-Id: <20190221005753.27955-14-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Thu, 21 Feb 2019 00:58:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 13/20] scripts/qemu.py: support adding a console with the default serial device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" The set_console() utility function traditionally adds a device either based on the explicitly given device type, or based on the machine type, a known good type of device. But, for a number of machine types, it may be impossible or inconvenient to add the devices my means of "-device" command line options, and then it may better to just use the "-serial" option and let QEMU itself, based on the machine type, set the device accordingly. To achieve that, the behavior of set_console() now flags the intention to add a console device on launch(), and if no explicit device type is given, and there's no definition on CONSOLE_DEV_TYPES, the "-serial" is going to be added to the QEMU command line, instead of raising exceptions. Based on testing with different machine types, the CONSOLE_DEV_TYPES is now being set to the bare essential entries (one entry to be honest), for machine types that can not easily give us a working console with "-serial". Signed-off-by: Cleber Rosa --- scripts/qemu.py | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/scripts/qemu.py b/scripts/qemu.py index ee85309923..bd1d2e2b9a 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -42,11 +42,6 @@ def kvm_available(target_arch=None): #: Maps machine types to the preferred console device types CONSOLE_DEV_TYPES = { - r'^clipper$': 'isa-serial', - r'^malta': 'isa-serial', - r'^(pc.*|q35.*|isapc)$': 'isa-serial', - r'^(40p|powernv|prep)$': 'isa-serial', - r'^pseries.*': 'spapr-vty', r'^s390-ccw-virtio.*': 'sclpconsole', } @@ -129,6 +124,7 @@ class QEMUMachine(object): self._temp_dir = None self._launched = False self._machine = None + self._console_set = False self._console_device_type = None self._console_address = None self._console_socket = None @@ -248,13 +244,17 @@ class QEMUMachine(object): '-display', 'none', '-vga', 'none'] if self._machine is not None: args.extend(['-machine', self._machine]) - if self._console_device_type is not None: + if self._console_set: self._console_address = os.path.join(self._temp_dir, self._name + "-console.sock") chardev = ('socket,id=console,path=%s,server,nowait' % self._console_address) - device = '%s,chardev=console' % self._console_device_type - args.extend(['-chardev', chardev, '-device', device]) + args.extend(['-chardev', chardev]) + if self._console_device_type is None: + args.extend(['-serial', 'chardev:console']) + else: + device = '%s,chardev=console' % self._console_device_type + args.extend(['-device', device]) return args def _pre_launch(self): @@ -480,30 +480,29 @@ class QEMUMachine(object): line. This is a convenience method that will either use the provided - device type, of if not given, it will used the device type set - on CONSOLE_DEV_TYPES. + device type, of if not given, it will use the device type set + on CONSOLE_DEV_TYPES if a machine type is set, and a matching + entry exists on CONSOLE_DEV_TYPES. The actual setting of command line arguments will be be done at machine launch time, as it depends on the temporary directory to be created. - @param device_type: the device type, such as "isa-serial" + @param device_type: the device type, such as "isa-serial". If + None is given (the default value) a "-serial + chardev:console" command line argument will + be used instead, resorting to the machine's + default device type, if a machine type is set, + and a matching entry exists on CONSOLE_DEV_TYPES. @raises: QEMUMachineAddDeviceError if the device type is not given and can not be determined. """ - if device_type is None: - if self._machine is None: - raise QEMUMachineAddDeviceError("Can not add a console device:" - " QEMU instance without a " - "defined machine type") + self._console_set = True + if device_type is None and self._machine is not None: for regex, device in CONSOLE_DEV_TYPES.items(): if re.match(regex, self._machine): device_type = device break - if device_type is None: - raise QEMUMachineAddDeviceError("Can not add a console device:" - " no matching console device " - "type definition") self._console_device_type = device_type @property From patchwork Thu Feb 21 00:57:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045686 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bnG1Mxlz9s5c for ; Thu, 21 Feb 2019 12:03:14 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwclc-0000yk-3d for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:03:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33304) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchf-0006TM-BQ for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchd-0001AW-FQ for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39498) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchb-00017K-Hx; Wed, 20 Feb 2019 19:59:04 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C69CB368D0; Thu, 21 Feb 2019 00:58:50 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AFC895D6AA; Thu, 21 Feb 2019 00:58:48 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:47 -0500 Message-Id: <20190221005753.27955-15-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 21 Feb 2019 00:58:50 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 14/20] Boot Linux Console Test: add a test for mips + malta X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , 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 Malta board and verify the serial is working. Also, it relies on the serial device set by the machine itself. 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 run -t arch:mips tests/acceptance $ avocado run -t machine:malta tests/acceptance $ avocado run -t endian:big tests/acceptance Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Cleber Rosa Reviewed-by: Aleksandar Markovic Tested-by: Philippe Mathieu-Daudé --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 41 ++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 42971484ab..0a5e0613be 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index e2ef43e7ce..05e43360b8 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -8,9 +8,12 @@ # This work is licensed under the terms of the GNU GPL, version 2 or # later. See the COPYING file in the top-level directory. +import os import logging from avocado_qemu import Test +from avocado.utils import process +from avocado.utils import archive class BootLinuxConsole(Test): @@ -44,6 +47,21 @@ class BootLinuxConsole(Test): fail = 'Failure message found in console: %s' % failure_message self.fail(fail) + def extract_from_deb(self, deb, path): + """ + Extracts a file from a deb package into the test workdir + + :param deb: path to the deb archive + :param file: path within the deb archive of the file to be extracted + :returns: path of the extracted file + """ + cwd = os.getcwd() + os.chdir(self.workdir) + process.run("ar x %s data.tar.gz" % deb) + archive.extract("data.tar.gz", self.workdir) + os.chdir(cwd) + return self.workdir + path + def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 @@ -62,3 +80,26 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_mips_malta(self): + """ + :avocado: tags=arch:mips + :avocado: tags=machine:malta + :avocado: tags=endian:big + """ + deb_url = ('http://snapshot.debian.org/archive/debian/' + '20130217T032700Z/pool/main/l/linux-2.6/' + 'linux-image-2.6.32-5-4kc-malta_2.6.32-48_mips.deb') + deb_hash = 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-4kc-malta') + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045682 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bjW003Hz9s5c for ; Thu, 21 Feb 2019 11:59:58 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51427 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwciS-0006Se-RM for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 19:59:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchb-0006Qw-Di for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchZ-00019H-1i for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:03 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41536) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchW-00017p-8p; Wed, 20 Feb 2019 19:58:59 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1243F301A641; Thu, 21 Feb 2019 00:58:53 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 002B95D6AA; Thu, 21 Feb 2019 00:58:50 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:48 -0500 Message-Id: <20190221005753.27955-16-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Feb 2019 00:58:53 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 15/20] Boot Linux Console Test: add a test for mips64el + malta X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta board and verify the serial is working. If mips64el is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:mips64el" tags. Alternatively, this test can be run using: $ avocado run -t arch:mips64el tests/acceptance $ avocado run -t machine:malta tests/acceptance Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Cleber Rosa Reviewed-by: Aleksandar Markovic --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 34 ++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0a5e0613be..0260263bb8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 05e43360b8..899c27a9ec 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -10,6 +10,7 @@ import os import logging +import os from avocado_qemu import Test from avocado.utils import process @@ -103,3 +104,36 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_mips64el_malta(self): + """ + This test requires the ar tool to extract "data.tar.gz" from + the Debian package. + + The kernel can be rebuilt using this Debian kernel source [1] and + following the instructions on [2]. + + [1] http://snapshot.debian.org/package/linux-2.6/2.6.32-48/ + #linux-source-2.6.32_2.6.32-48 + [2] https://kernel-team.pages.debian.net/kernel-handbook/ + ch-common-tasks.html#s-common-official + + :avocado: tags=arch:mips64el + :avocado: tags=machine:malta + """ + deb_url = ('http://snapshot.debian.org/archive/debian/' + '20130217T032700Z/pool/main/l/linux-2.6/' + 'linux-image-2.6.32-5-5kc-malta_2.6.32-48_mipsel.deb') + deb_hash = '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' + deb_path = self.fetch_asset(deb_url, asset_hash=deb_hash) + kernel_path = self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-5kc-malta') + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57: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: 1045693 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bwM1tqqz9sBF for ; Thu, 21 Feb 2019 12:09:23 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcrZ-00069k-5H for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:09:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33345) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchh-0006UC-74 for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchf-0001Bj-6P for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34948) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchd-00018d-Ep; Wed, 20 Feb 2019 19:59:05 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D19CF307EA97; Thu, 21 Feb 2019 00:58:57 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3C8045D707; Thu, 21 Feb 2019 00:58:53 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:49 -0500 Message-Id: <20190221005753.27955-17-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 21 Feb 2019 00:58:57 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 16/20] Boot Linux Console Test: add a test for ppc64 + pseries X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just like the previous tests, boots a Linux kernel on a ppc64 target using the pseries machine. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0260263bb8..b5abe130f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 899c27a9ec..6bc9a6b303 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -137,3 +137,22 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_ppc64_pseries(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + """ + kernel_url = ('http://mirrors.rit.edu/fedora/fedora-secondary/' + 'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz') + kernel_hash = '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('pseries') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=hvc0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045695 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444byZ1kRtz9s5c for ; Thu, 21 Feb 2019 12:11:13 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51634 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwctI-0008IU-L9 for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:11:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchh-0006UB-6w for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchf-0001Bx-9q for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45294) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchd-00018t-KB; Wed, 20 Feb 2019 19:59:06 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 05F85C03BD54; Thu, 21 Feb 2019 00:59:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0BF315D6AA; Thu, 21 Feb 2019 00:58:57 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:50 -0500 Message-Id: <20190221005753.27955-18-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 21 Feb 2019 00:59:00 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 17/20] Boot Linux Console Test: add a test for aarch64 + virt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just like the previous tests, boots a Linux kernel on a aarch64 target using the virt machine. One special option added is the CPU type, given that the kernel selected fails to boot on the virt machine's default CPU (cortex-a15). Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b5abe130f1..60a4bc00b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 6bc9a6b303..1f2dfa3654 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -156,3 +156,24 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_aarch64_virt(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:virt + """ + kernel_url = ('https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/' + 'releases/29/Server/aarch64/os/images/pxeboot/vmlinuz') + kernel_hash = '8c73e469fc6ea06a58dc83a628fc695b693b8493' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('virt') + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyAMA0') + self.vm.add_args('-cpu', 'cortex-a53', + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045697 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444c0g0VPPz9s5c for ; Thu, 21 Feb 2019 12:13:07 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51687 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcvB-0001IW-2u for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:13:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33429) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchl-0006YW-1k for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchj-0001Ef-3K for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:41628) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchh-0001BM-6R; Wed, 20 Feb 2019 19:59:09 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5F9A4300D264; Thu, 21 Feb 2019 00:59:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33CC15D6AA; Thu, 21 Feb 2019 00:59:00 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:51 -0500 Message-Id: <20190221005753.27955-19-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Thu, 21 Feb 2019 00:59:06 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 18/20] Boot Linux Console Test: add a test for arm + virt X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just like the previous tests, boots a Linux kernel on an arm target using the virt machine. Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 60a4bc00b8..f34bd8dc2b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 1f2dfa3654..311f6fbb96 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -177,3 +177,23 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_arm_virt(self): + """ + :avocado: tags=arch:arm + :avocado: tags=machine:virt + """ + kernel_url = ('https://sjc.edge.kernel.org/fedora-buffet/fedora/linux/' + 'releases/29/Server/armhfp/os/images/pxeboot/vmlinuz') + kernel_hash = 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('virt') + self.vm.set_console() + kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + + 'console=ttyAMA0') + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 1045696 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444bzJ1vrzz9s5c for ; Thu, 21 Feb 2019 12:11:56 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51655 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcu2-0000X6-6T for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:11:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33493) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchn-0006bD-6Y for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchl-0001Fx-5v for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49174) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchj-0001Ch-3N; Wed, 20 Feb 2019 19:59:13 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7ED3983F4C; Thu, 21 Feb 2019 00:59:08 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8C7155D6AA; Thu, 21 Feb 2019 00:59:06 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:52 -0500 Message-Id: <20190221005753.27955-20-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 21 Feb 2019 00:59:08 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 19/20] Boot Linux Console Test: add a test for s390x + s390-ccw-virtio X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Just like the previous tests, boots a Linux kernel on a s390x target using the s390-ccw-virtio machine. Because it's not possible to have multiple VT220 consoles, '-nodefaults' is used, so that the one set with set_console() works correctly. Signed-off-by: Cleber Rosa Reviewed-by: Cornelia Huck Reviewed-by: Caio Carrara --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f34bd8dc2b..82d680c437 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 311f6fbb96..aa581aa7de 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -197,3 +197,23 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_s390x_s390_ccw_virtio(self): + """ + :avocado: tags=arch:s390x + :avocado: tags=machine:s390_ccw_virtio + """ + kernel_url = ('http://mirrors.rit.edu/fedora/fedora-secondary/releases' + '/29/Server/s390x/os/images/kernel.img') + kernel_hash = 'e8e8439103ef8053418ef062644ffd46a7919313' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + self.vm.set_machine('s390-ccw-virtio') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=sclp0' + self.vm.add_args('-nodefaults', + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) From patchwork Thu Feb 21 00:57: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: 1045699 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) 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 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444c2l1xXCz9s8m for ; Thu, 21 Feb 2019 12:14:55 +1100 (AEDT) Received: from localhost ([127.0.0.1]:51701 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwcwv-0002gz-4d for incoming@patchwork.ozlabs.org; Wed, 20 Feb 2019 20:14:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:33590) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gwchq-0006fJ-Qm for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gwchn-0001HX-JO for qemu-devel@nongnu.org; Wed, 20 Feb 2019 19:59:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:58854) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gwchn-0001EG-7E; Wed, 20 Feb 2019 19:59:15 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BAAC681F11; Thu, 21 Feb 2019 00:59:10 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-8.rdu2.redhat.com [10.10.120.8]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ACD755D6AA; Thu, 21 Feb 2019 00:59:08 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Wed, 20 Feb 2019 19:57:53 -0500 Message-Id: <20190221005753.27955-21-crosa@redhat.com> In-Reply-To: <20190221005753.27955-1-crosa@redhat.com> References: <20190221005753.27955-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Thu, 21 Feb 2019 00:59:10 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v3 20/20] Boot Linux Console Test: add a test for alpha + clipper X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , Cornelia Huck , Eduardo Habkost , Aleksandar Rikalo , =?utf-8?q?Philippe_Mathieu-?= =?utf-8?b?RGF1ZMOp?= , Cleber Rosa , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Stefan Markovic , qemu-s390x@nongnu.org, Aleksandar Markovic , Caio Carrara , =?utf-8?q?Alex_Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Similar to the x86_64 + pc test, it boots a Linux kernel on a Malta board and verify the serial is working. One extra command added to the QEMU command line is '-vga std', because the kernel used is known to crash without it. If alpha is a target being built, "make check-acceptance" will automatically include this test by the use of the "arch:alpha" tags. Alternatively, this test can be run using: $ avocado run -t arch:alpha tests/acceptance $ avocado run -t machine:clipper tests/acceptance Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Cleber Rosa Reviewed-by: Caio Carrara --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82d680c437..ea63cac9e9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -198,7 +198,7 @@ matrix: # Acceptance (Functional) tests - env: - - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu" + - CONFIG="--python=/usr/bin/python3 --target-list=x86_64-softmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmmu,s390x-softmmu,alpha-softmmu" - TEST_CMD="make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index aa581aa7de..d866886067 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -217,3 +217,25 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_alpha_clipper(self): + """ + :avocado: tags=arch:alpha + :avocado: tags=machine:clipper + """ + kernel_url = ('http://archive.debian.org/debian/dists/lenny/main/' + 'installer-alpha/current/images/cdrom/vmlinuz') + kernel_hash = '3a943149335529e2ed3e74d0d787b85fb5671ba3' + kernel_path = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + + uncompressed_kernel = archive.uncompress(kernel_path, self.workdir) + + self.vm.set_machine('clipper') + self.vm.set_console() + kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyS0' + self.vm.add_args('-vga', 'std', + '-kernel', uncompressed_kernel, + '-append', kernel_command_line) + self.vm.launch() + console_pattern = 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern)