From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069539597100.80108330912196; Fri, 1 Feb 2019 17:05:39 -0800 (PST) Received: from localhost ([127.0.0.1]:35510 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjkR-0000cJ-Gt for importer@patchew.org; Fri, 01 Feb 2019 20:05:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcU-0002fh-JS for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcM-0003fH-L7 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0008Pq-HA; Fri, 01 Feb 2019 19:57:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82E0029A75; Sat, 2 Feb 2019 00:56:20 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C420C6013D; Sat, 2 Feb 2019 00:56:18 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:51 -0500 Message-Id: <20190202005610.24048-2-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 02 Feb 2019 00:56:20 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Even when the launch of QEMU succeeds, it's useful to have the command line recorded. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Cleber Rosa --- scripts/qemu.py | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/qemu.py b/scripts/qemu.py index 0a5e02eb56..eeaab99906 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -312,6 +312,7 @@ class QEMUMachine(object): self._pre_launch() self._qemu_full_args =3D (self._wrapper + [self._binary] + self._base_args() + self._args) + LOG.debug('VM launch command: %r', ' '.join(self._qemu_full_args)) self._popen =3D subprocess.Popen(self._qemu_full_args, stdin=3Ddevnull, stdout=3Dself._qemu_log_file, --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069148767534.5967617421704; Fri, 1 Feb 2019 16:59:08 -0800 (PST) Received: from localhost ([127.0.0.1]:35431 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpje7-0003gl-AN for importer@patchew.org; Fri, 01 Feb 2019 19:58:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54404) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcD-0002V9-26 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjbz-0001uB-GV for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:56:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45098) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjbs-0008W8-Qd; Fri, 01 Feb 2019 19:56:44 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 57E4480508; Sat, 2 Feb 2019 00:56:22 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A46B66013E; Sat, 2 Feb 2019 00:56:20 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:52 -0500 Message-Id: <20190202005610.24048-3-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 02 Feb 2019 00:56:22 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Cleber Rosa --- .travis.yml | 2 +- tests/Makefile.include | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87d9fa971c..1b43ed4df6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -190,7 +190,7 @@ matrix: # Acceptance (Functional) tests - env: - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu" - - TEST_CMD=3D"make AVOCADO_SHOW=3Dapp check-acceptance" + - TEST_CMD=3D"make check-acceptance" addons: apt: packages: diff --git a/tests/Makefile.include b/tests/Makefile.include index 75ad9c0dd3..67e222eeff 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1093,7 +1093,7 @@ TESTS_RESULTS_DIR=3D$(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=3Dnone +AVOCADO_SHOW=3Dapp =20 ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069162327450.31767950687276; Fri, 1 Feb 2019 16:59:22 -0800 (PST) Received: from localhost ([127.0.0.1]:35435 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjeO-0003ur-6K for importer@patchew.org; Fri, 01 Feb 2019 19:59:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54639) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcN-0002bX-8v for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003S1-TZ for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56260) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0000Dy-Ts; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 32D6B8B139; Sat, 2 Feb 2019 00:56:24 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E7036013D; Sat, 2 Feb 2019 00:56:22 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:53 -0500 Message-Id: <20190202005610.24048-4-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 02 Feb 2019 00:56:24 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Making it clear what is returned by this utility function. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- tests/acceptance/avocado_qemu/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_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 =3D os.uname()[4] qemu_bin_relative_path =3D os.path.join("%s-softmmu" % arch, --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069339547132.00782972688523; Fri, 1 Feb 2019 17:02:19 -0800 (PST) Received: from localhost ([127.0.0.1]:35486 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjhH-0006QL-Dx for importer@patchew.org; Fri, 01 Feb 2019 20:02:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcL-0002ZO-08 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003Qu-RB for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33576) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0000Mh-Sq; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 108501E339; Sat, 2 Feb 2019 00:56:26 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 593736013D; Sat, 2 Feb 2019 00:56:24 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:54 -0500 Message-Id: <20190202005610.24048-5-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 02 Feb 2019 00:56:26 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- 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 18e2c0868a..44c9b3ae74 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -590,8 +590,9 @@ Alternatively, follow the instructions on this link: Overview -------- =20 -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: =20 .. code:: =20 --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069235384940.9404916840584; Fri, 1 Feb 2019 17:00:35 -0800 (PST) Received: from localhost ([127.0.0.1]:35446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjfZ-0004zI-84 for importer@patchew.org; Fri, 01 Feb 2019 20:00:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcQ-0002d4-81 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003QS-NG for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45132) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0000W4-RT; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DD61E804FC; Sat, 2 Feb 2019 00:56:27 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 33C5A6013D; Sat, 2 Feb 2019 00:56:26 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:55 -0500 Message-Id: <20190202005610.24048-6-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 02 Feb 2019 00:56:28 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- docs/devel/testing.rst | 17 +++++++++++++++++ tests/acceptance/avocado_qemu/__init__.py | 14 +++++++++++--- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 44c9b3ae74..d37c4b0e77 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -689,6 +689,16 @@ vm A QEMUMachine instance, initially configured according to the given ``qemu_bin`` parameter. =20 +arch +~~~~ + +The architecture that will be used on a number of different +scenarios. For instance, when a QEMU binary is not explicitly given, +the one selected will depend on this attribute. + +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 ~~~~~~~~ =20 @@ -711,6 +721,13 @@ like the following: =20 PARAMS (key=3Dqemu_bin, path=3D*, default=3Dx86_64-softmmu/qemu-system-x= 86_64) =3D> 'x86_64-softmmu/qemu-system-x86_64 =20 +arch +~~~~ + +The architecture that will be used on a number of different scenarios. +This parameter has a direct relation with the ``arch`` attribute. If +not given, it will default to None. + qemu_bin ~~~~~~~~ =20 diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_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) =20 =20 -def pick_default_qemu_bin(): +def pick_default_qemu_bin(arch=3DNone): """ Picks the path of a QEMU binary, starting either in the current working directory or in the source tree root directory. =20 + :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 =3D os.uname()[4] + if arch is None: + arch =3D os.uname()[4] qemu_bin_relative_path =3D 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 =3D None + self.arch =3D self.params.get('arch') + default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', - default=3Dpick_default_qemu_bin()) + default=3Ddefault_qemu_bin) if self.qemu_bin is None: self.cancel("No QEMU binary defined or found in the source tre= e") self.vm =3D QEMUMachine(self.qemu_bin) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069734576583.2566503820639; Fri, 1 Feb 2019 17:08:54 -0800 (PST) Received: from localhost ([127.0.0.1]:35575 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjnc-0003P1-Cu for importer@patchew.org; Fri, 01 Feb 2019 20:08:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54939) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcg-0002pO-9h for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003NP-5K for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:22 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32944) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0000e0-Gm; Fri, 01 Feb 2019 19:57:06 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC73D8764F; Sat, 2 Feb 2019 00:56:29 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0C3046013E; Sat, 2 Feb 2019 00:56:27 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:56 -0500 Message-Id: <20190202005610.24048-7-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 02 Feb 2019 00:56:29 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=3Darch: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 67e222eeff..e9e60117f8 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -1094,6 +1094,7 @@ TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". AVOCADO_SHOW=3Dapp +AVOCADO_TAGS=3D$(patsubst %-softmmu,-t arch:%, $(filter %-softmmu,$(TARGET= _DIRS))) =20 ifneq ($(findstring v2,"v$(PYTHON_VERSION)"),v2) $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) @@ -1119,6 +1120,8 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) $(call quiet-command, \ $(TESTS_VENV_DIR)/bin/python -m avocado \ --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ + --filter-by-tags-include-empty --filter-by-tags-include-empty-= key \ + $(AVOCADO_TAGS) \ --failfast=3Don $(SRC_PATH)/tests/acceptance, \ "AVOCADO", "tests/acceptance") =20 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 =20 :avocado: enable - :avocado: tags=3Dx86_64 + :avocado: tags=3Darch:x86_64 """ =20 timeout =3D 60 diff --git a/tests/acceptance/linux_initrd.py b/tests/acceptance/linux_init= rd.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 opti= on. =20 :avocado: enable - :avocado: tags=3Dx86_64 + :avocado: tags=3Darch:x86_64 """ =20 timeout =3D 60 diff --git a/tests/acceptance/virtio_version.py b/tests/acceptance/virtio_v= ersion.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`. =20 :avocado: enable - :avocado: tags=3Dx86_64 + :avocado: tags=3Darch:x86_64 """ =20 # just in case there are failures, show larger diff: diff --git a/tests/requirements.txt b/tests/requirements.txt index 64c6e27a94..426a9e8a9a 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=3D=3D65.0 +avocado-framework=3D=3D67.0 --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069152162432.96638319446083; Fri, 1 Feb 2019 16:59:12 -0800 (PST) Received: from localhost ([127.0.0.1]:35429 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpje7-0003gb-Us for importer@patchew.org; Fri, 01 Feb 2019 19:58:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54405) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcC-0002VA-2P for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjbz-0001ur-Io for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:56:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjbu-00015P-Cb; Fri, 01 Feb 2019 19:56:46 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AAC3DC0495BB; Sat, 2 Feb 2019 00:56:35 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DB2A86013D; Sat, 2 Feb 2019 00:56:29 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:57 -0500 Message-Id: <20190202005610.24048-8-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 02 Feb 2019 00:56:36 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=3Darch:x86_64 is used) This means that if one runs: $ avocado run -p qemu_bin=3D/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=3Dppc64 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 --- 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 d37c4b0e77..94ef894047 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -697,7 +697,9 @@ scenarios. For instance, when a QEMU binary is not exp= licitly given, the one selected will depend on this attribute. =20 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=3Darch:VALUE`` tag, it will be set to ``VALUE``. =20 qemu_bin ~~~~~~~~ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_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=3DNone): class Test(avocado.Test): def setUp(self): self.vm =3D None - self.arch =3D self.params.get('arch') + arches =3D self.tags.get('arch', []) + if len(arches) =3D=3D 1: + arch =3D arches.pop() + else: + arch =3D None + self.arch =3D self.params.get('arch', default=3Darch) default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', default=3Ddefault_qemu_bin) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069812804699.9461703543756; Fri, 1 Feb 2019 17:10:12 -0800 (PST) Received: from localhost ([127.0.0.1]:35585 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjos-0004dz-Oz for importer@patchew.org; Fri, 01 Feb 2019 20:10:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54883) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcb-0002jx-8f for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcM-0003fn-PT for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45198) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0001D1-FS; Fri, 01 Feb 2019 19:57:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 94976804F7; Sat, 2 Feb 2019 00:56:37 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CC7FA6013E; Sat, 2 Feb 2019 00:56:35 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:58 -0500 Message-Id: <20190202005610.24048-9-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 02 Feb 2019 00:56:37 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- 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 =20 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 =20 :avocado: enable - :avocado: tags=3Darch:x86_64 """ =20 timeout =3D 60 =20 - def test(self): + def test_x86_64_pc(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + """ kernel_url =3D ('https://mirrors.kernel.org/fedora/releases/28/' 'Everything/x86_64/os/images/pxeboot/vmlinuz') kernel_hash =3D '238e083e114c48200f80d889f7e32eeb2793e02a' --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069451808707.3049575900733; Fri, 1 Feb 2019 17:04:11 -0800 (PST) Received: from localhost ([127.0.0.1]:35502 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjix-0007oS-RQ for importer@patchew.org; Fri, 01 Feb 2019 20:03:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54771) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcS-0002fB-S9 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcK-0003U1-97 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47480) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcJ-0001Lv-Rh; Fri, 01 Feb 2019 19:57:08 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6C5CD144029; Sat, 2 Feb 2019 00:56:39 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B34586013D; Sat, 2 Feb 2019 00:56:37 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:55:59 -0500 Message-Id: <20190202005610.24048-10-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 02 Feb 2019 00:56:39 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Caio Carrara Signed-off-by: Cleber Rosa --- 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=3Darch:x86_64 :avocado: tags=3Dmachine:pc """ - kernel_url =3D ('https://mirrors.kernel.org/fedora/releases/28/' + kernel_url =3D ('https://mirrors.kernel.org/fedora/releases/29/' 'Everything/x86_64/os/images/pxeboot/vmlinuz') - kernel_hash =3D '238e083e114c48200f80d889f7e32eeb2793e02a' + kernel_hash =3D '23bebd2680757891cf7adedb033532163a792495' kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) =20 self.vm.set_machine('pc') --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069544998889.7898629015269; Fri, 1 Feb 2019 17:05:44 -0800 (PST) Received: from localhost ([127.0.0.1]:35516 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjkV-0000hq-On for importer@patchew.org; Fri, 01 Feb 2019 20:05:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54646) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcO-0002bg-Ai for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcL-0003aK-Ix for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33392) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcK-0001YS-Uf; Fri, 01 Feb 2019 19:57:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9B39FD4784; Sat, 2 Feb 2019 00:56:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 917406013E; Sat, 2 Feb 2019 00:56:39 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:00 -0500 Message-Id: <20190202005610.24048-11-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Sat, 02 Feb 2019 00:56:42 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" The 'printk.time=3D0' 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=C3=A9 --- 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): =20 timeout =3D 60 =20 + KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' + def test_x86_64_pc(self): """ :avocado: tags=3Darch:x86_64 @@ -35,7 +37,7 @@ class BootLinuxConsole(Test): =20 self.vm.set_machine('pc') self.vm.set_console() - kernel_command_line =3D 'console=3DttyS0' + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069362202257.4192423860659; Fri, 1 Feb 2019 17:02:42 -0800 (PST) Received: from localhost ([127.0.0.1]:35494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjhW-0006iF-7z for importer@patchew.org; Fri, 01 Feb 2019 20:02:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcS-0002f2-MB for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcM-0003h9-Us for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33656) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0001hG-MD; Fri, 01 Feb 2019 19:57:10 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 77CEA42BA0; Sat, 2 Feb 2019 00:56:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B38CF6013D; Sat, 2 Feb 2019 00:56:42 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:01 -0500 Message-Id: <20190202005610.24048-12-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 02 Feb 2019 00:56:44 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=C3=A9e Signed-off-by: Cleber Rosa --- tests/acceptance/boot_linux_console.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 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 """ =20 - timeout =3D 60 + timeout =3D 90 =20 KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069557723730.8715148760956; Fri, 1 Feb 2019 17:05:57 -0800 (PST) Received: from localhost ([127.0.0.1]:35529 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjki-0000uK-Im for importer@patchew.org; Fri, 01 Feb 2019 20:05:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcT-0002ez-LV for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcM-0003h1-Us for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42402) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0001pr-K1; Fri, 01 Feb 2019 19:57:10 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 60F3185363; Sat, 2 Feb 2019 00:56:46 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9A8626013D; Sat, 2 Feb 2019 00:56:44 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:02 -0500 Message-Id: <20190202005610.24048-13-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sat, 02 Feb 2019 00:56:46 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This introduces a utility method that monitors the console device and looks for either a message that signals the test success or failure. Reviewed-by: Caio Carrara Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- 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): =20 KERNEL_COMMON_COMMAND_LINE =3D 'printk.time=3D0 ' =20 + def wait_for_console_pattern(self, success_message, + failure_message=3D'Kernel panic - not syn= cing'): + """ + Waits for messages to appear on the console, while logging the con= tent + + :param success_message: if this message appears, test succeeds + :param failure_message: if this message appears, test fails + """ + console =3D self.vm.console_socket.makefile() + console_logger =3D logging.getLogger('console') + while True: + msg =3D console.readline() + console_logger.debug(msg.strip()) + if success_message in msg: + break + if failure_message in msg: + fail =3D 'Failure message found in console: %s' % failure_= message + self.fail(fail) + def test_x86_64_pc(self): """ :avocado: tags=3Darch:x86_64 @@ -41,12 +60,5 @@ class BootLinuxConsole(Test): self.vm.add_args('-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() - console =3D self.vm.console_socket.makefile() - console_logger =3D logging.getLogger('console') - while True: - msg =3D console.readline() - console_logger.debug(msg.strip()) - if 'Kernel command line: %s' % kernel_command_line in msg: - break - if 'Kernel panic - not syncing' in msg: - self.fail("Kernel panic reached") + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069720209666.5140500509581; Fri, 1 Feb 2019 17:08:40 -0800 (PST) Received: from localhost ([127.0.0.1]:35567 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjnO-0003E9-37 for importer@patchew.org; Fri, 01 Feb 2019 20:08:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcT-0002f1-MF for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcK-0003To-7x for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33008) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcJ-0001zJ-PK; Fri, 01 Feb 2019 19:57:08 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 474737D0D5; Sat, 2 Feb 2019 00:56:48 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 81D586013E; Sat, 2 Feb 2019 00:56:46 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:03 -0500 Message-Id: <20190202005610.24048-14-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Sat, 02 Feb 2019 00:56:48 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 eeaab99906..53bdc46ce2 100644 --- a/scripts/qemu.py +++ b/scripts/qemu.py @@ -34,11 +34,6 @@ def kvm_available(target_arch=3DNone): =20 #: Maps machine types to the preferred console device types CONSOLE_DEV_TYPES =3D { - 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', } =20 @@ -121,6 +116,7 @@ class QEMUMachine(object): self._temp_dir =3D None self._launched =3D False self._machine =3D None + self._console_set =3D False self._console_device_type =3D None self._console_address =3D None self._console_socket =3D None @@ -240,13 +236,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 =3D os.path.join(self._temp_dir, self._name + "-console.so= ck") chardev =3D ('socket,id=3Dconsole,path=3D%s,server,nowait' % self._console_address) - device =3D '%s,chardev=3Dconsole' % 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 =3D '%s,chardev=3Dconsole' % self._console_device_t= ype + args.extend(['-device', device]) return args =20 def _pre_launch(self): @@ -472,30 +472,29 @@ class QEMUMachine(object): line. =20 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. =20 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. =20 - @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_TYP= ES. @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 dev= ice:" - " QEMU instance without a " - "defined machine type") + self._console_set =3D 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 =3D device break - if device_type is None: - raise QEMUMachineAddDeviceError("Can not add a console dev= ice:" - " no matching console devi= ce " - "type definition") self._console_device_type =3D device_type =20 @property --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069633798601.5209910342356; Fri, 1 Feb 2019 17:07:13 -0800 (PST) Received: from localhost ([127.0.0.1]:35560 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjlz-000249-Nb for importer@patchew.org; Fri, 01 Feb 2019 20:07:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcZ-0002iG-Ca for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcN-0003j6-Cg for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45280) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0002RB-Sb; Fri, 01 Feb 2019 19:57:10 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CFFF17EBB6; Sat, 2 Feb 2019 00:56:54 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 692B76013D; Sat, 2 Feb 2019 00:56:48 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:04 -0500 Message-Id: <20190202005610.24048-15-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Sat, 02 Feb 2019 00:56:54 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Philippe Mathieu-Daud=C3=A9 Similar to the x86_64 + pc test, it boots a Linux kernel on a 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=C3=A9 Signed-off-by: Cleber Rosa --- .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 1b43ed4df6..a4e3328c23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu" - TEST_CMD=3D"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. =20 +import os import logging =20 from avocado_qemu import Test +from avocado.utils import process +from avocado.utils import archive =20 =20 class BootLinuxConsole(Test): @@ -44,6 +47,21 @@ class BootLinuxConsole(Test): fail =3D 'Failure message found in console: %s' % failure_= message self.fail(fail) =20 + 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 extract= ed + :returns: path of the extracted file + """ + cwd =3D 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=3Darch:x86_64 @@ -62,3 +80,26 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_mips_malta(self): + """ + :avocado: tags=3Darch:mips + :avocado: tags=3Dmachine:malta + :avocado: tags=3Dendian:big + """ + deb_url =3D ('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 =3D 'a8cfc28ad8f45f54811fc6cf74fc43ffcfe0ba04' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-4kc-ma= lta') + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549070043211477.44995922342457; Fri, 1 Feb 2019 17:14:03 -0800 (PST) Received: from localhost ([127.0.0.1]:35693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjsb-0007m3-0N for importer@patchew.org; Fri, 01 Feb 2019 20:13:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcV-0002fj-K2 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcN-0003jC-FS for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43082) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcM-0002bJ-B7; Fri, 01 Feb 2019 19:57:10 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFBBDC0B2A39; Sat, 2 Feb 2019 00:56:56 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id F19266013E; Sat, 2 Feb 2019 00:56:54 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:05 -0500 Message-Id: <20190202005610.24048-16-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Sat, 02 Feb 2019 00:56:57 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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=C3=A9 Signed-off-by: Cleber Rosa --- .travis.yml | 2 +- tests/acceptance/boot_linux_console.py | 32 ++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a4e3328c23..df6a24a3b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 05e43360b8..cd9a4c9b7d 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -10,6 +10,7 @@ =20 import os import logging +import os =20 from avocado_qemu import Test from avocado.utils import process @@ -103,3 +104,34 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D '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=3Darch:mips64el + :avocado: tags=3Dmachine:malta + """ + deb_url =3D ('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 =3D '1aaec92083bf22fda31e0d27fa8d9a388e5fc3d5' + deb_path =3D self.fetch_asset(deb_url, asset_hash=3Ddeb_hash) + kernel_path =3D self.extract_from_deb(deb_path, + '/boot/vmlinux-2.6.32-5-5kc-ma= lta') + + self.vm.set_machine('malta') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069723730983.6002125135776; Fri, 1 Feb 2019 17:08:43 -0800 (PST) Received: from localhost ([127.0.0.1]:35569 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjnR-0003FH-Kl for importer@patchew.org; Fri, 01 Feb 2019 20:08:37 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54644) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcO-0002be-AN for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003Qw-Pu for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:10 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33716) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-0002jE-Sw; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF5AE432AE; Sat, 2 Feb 2019 00:56:58 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 120956013D; Sat, 2 Feb 2019 00:56:56 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:06 -0500 Message-Id: <20190202005610.24048-17-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 02 Feb 2019 00:56:58 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Just like the previous tests, boots a Linux kernel on a ppc64 target using the pseries machine. Reviewed-by: Caio Carrara Signed-off-by: Cleber Rosa --- .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 df6a24a3b6..7fa13d15db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index cd9a4c9b7d..3b973aac26 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -135,3 +135,22 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_ppc64_pseries(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + """ + kernel_url =3D ('http://mirrors.rit.edu/fedora/fedora-secondary/' + 'releases/29/Everything/ppc64le/os/ppc/ppc64/vmlinuz= ') + kernel_hash =3D '3fe04abfc852b66653b8c3c897a59a689270bc77' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('pseries') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dhvc0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069342903960.3109130672696; Fri, 1 Feb 2019 17:02:22 -0800 (PST) Received: from localhost ([127.0.0.1]:35490 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjhK-0006ST-1R for importer@patchew.org; Fri, 01 Feb 2019 20:02:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54602) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcO-0002aa-6x for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcH-0003FB-L2 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56364) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcH-0002sH-4j; Fri, 01 Feb 2019 19:57:05 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 9F2758BD24; Sat, 2 Feb 2019 00:57:00 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E29C46013D; Sat, 2 Feb 2019 00:56:58 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:07 -0500 Message-Id: <20190202005610.24048-18-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 02 Feb 2019 00:57:00 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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). Reviewed-by: Caio Carrara Signed-off-by: Cleber Rosa --- .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 7fa13d15db..0dbd8183f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 3b973aac26..85502fa48a 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -154,3 +154,23 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_aarch64_virt(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + """ + kernel_url =3D ('https://sjc.edge.kernel.org/fedora-buffet/fedora/= linux/' + 'releases/29/Server/aarch64/os/images/pxeboot/vmlinu= z') + kernel_hash =3D '8c73e469fc6ea06a58dc83a628fc695b693b8493' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('virt') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyAMA0' + self.vm.add_args('-cpu', 'cortex-a53', + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549070157737491.6060166616354; Fri, 1 Feb 2019 17:15:57 -0800 (PST) Received: from localhost ([127.0.0.1]:35760 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjuV-0000zb-Ni for importer@patchew.org; Fri, 01 Feb 2019 20:15:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54769) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcT-0002fA-Qk for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcJ-0003QK-N3 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:59386) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcI-000323-QF; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 748012C9765; Sat, 2 Feb 2019 00:57:02 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BFBBB6013D; Sat, 2 Feb 2019 00:57:00 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:08 -0500 Message-Id: <20190202005610.24048-19-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sat, 02 Feb 2019 00:57:02 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Just like the previous tests, boots a Linux kernel on an arm target using the virt machine. Reviewed-by: Caio Carrara Signed-off-by: Cleber Rosa --- .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 0dbd8183f6..0b6416ba06 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmm= u" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 85502fa48a..4b031baf7a 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -174,3 +174,22 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_arm_virt(self): + """ + :avocado: tags=3Darch:arm + :avocado: tags=3Dmachine:virt + """ + kernel_url =3D ('https://sjc.edge.kernel.org/fedora-buffet/fedora/= linux/' + 'releases/29/Server/armhfp/os/images/pxeboot/vmlinuz= ') + kernel_hash =3D 'e9826d741b4fb04cadba8d4824d1ed3b7fb8b4d4' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('virt') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyAMA0' + self.vm.add_args('-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549070253780875.3519625143363; Fri, 1 Feb 2019 17:17:33 -0800 (PST) Received: from localhost ([127.0.0.1]:35782 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjvz-0001nj-RD for importer@patchew.org; Fri, 01 Feb 2019 20:17:27 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54821) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcV-0002fk-L6 for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcM-0003eG-DY for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcL-0003AV-Ax; Fri, 01 Feb 2019 19:57:09 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6266688312; Sat, 2 Feb 2019 00:57:04 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 991596013E; Sat, 2 Feb 2019 00:57:02 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:09 -0500 Message-Id: <20190202005610.24048-20-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 02 Feb 2019 00:57:04 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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. Reviewed-by: Caio Carrara Signed-off-by: Cleber Rosa Reviewed-by: Cornelia Huck --- .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 0b6416ba06..31ff85920a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmm= u" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmm= u,s390x-softmmu" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 4b031baf7a..5d79099602 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -193,3 +193,23 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_s390x_s390_ccw_virtio(self): + """ + :avocado: tags=3Darch:s390x + :avocado: tags=3Dmachine:s390_ccw_virtio + """ + kernel_url =3D ('http://mirrors.rit.edu/fedora/fedora-secondary/re= leases' + '/29/Server/s390x/os/images/kernel.img') + kernel_hash =3D 'e8e8439103ef8053418ef062644ffd46a7919313' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + self.vm.set_machine('s390-ccw-virtio') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3Dsclp0' + self.vm.add_args('-nodefaults', + '-kernel', kernel_path, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1 From nobody Mon May 6 03:14:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549069889445672.8662749597663; Fri, 1 Feb 2019 17:11:29 -0800 (PST) Received: from localhost ([127.0.0.1]:35665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjq4-0005hu-37 for importer@patchew.org; Fri, 01 Feb 2019 20:11:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54817) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gpjcV-0002fi-JX for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gpjcK-0003TI-3o for qemu-devel@nongnu.org; Fri, 01 Feb 2019 19:57:12 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47562) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gpjcJ-0003LF-IZ; Fri, 01 Feb 2019 19:57:07 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 606D6DC8EE; Sat, 2 Feb 2019 00:57:06 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-123-101.rdu2.redhat.com [10.10.123.101]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 82F976013D; Sat, 2 Feb 2019 00:57:04 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 1 Feb 2019 19:56:10 -0500 Message-Id: <20190202005610.24048-21-crosa@redhat.com> In-Reply-To: <20190202005610.24048-1-crosa@redhat.com> References: <20190202005610.24048-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Sat, 02 Feb 2019 00:57:06 +0000 (UTC) Content-Transfer-Encoding: quoted-printable 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 v2 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 , Eduardo Habkost , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cornelia Huck , qemu-s390x@nongnu.org, Wainer dos Santos Moschetta , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Stefan Markovic , Cleber Rosa , Aleksandar Markovic , Caio Carrara , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Aurelien Jarno Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Caio Carrara Signed-off-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Cleber Rosa --- .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 31ff85920a..5f477743c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -189,7 +189,7 @@ matrix: =20 # Acceptance (Functional) tests - env: - - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmm= u,s390x-softmmu" + - CONFIG=3D"--python=3D/usr/bin/python3 --target-list=3Dx86_64-sof= tmmu,mips-softmmu,mips64el-softmmu,ppc64-softmmu,aarch64-softmmu,arm-softmm= u,s390x-softmmu,alpha-softmmu" - TEST_CMD=3D"make check-acceptance" addons: apt: diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index 5d79099602..1e956e540f 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -213,3 +213,25 @@ class BootLinuxConsole(Test): self.vm.launch() console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + + def test_alpha_clipper(self): + """ + :avocado: tags=3Darch:alpha + :avocado: tags=3Dmachine:clipper + """ + kernel_url =3D ('http://archive.debian.org/debian/dists/lenny/main= /' + 'installer-alpha/current/images/cdrom/vmlinuz') + kernel_hash =3D '3a943149335529e2ed3e74d0d787b85fb5671ba3' + kernel_path =3D self.fetch_asset(kernel_url, asset_hash=3Dkernel_h= ash) + + uncompressed_kernel =3D archive.uncompress(kernel_path, self.workd= ir) + + self.vm.set_machine('clipper') + self.vm.set_console() + kernel_command_line =3D self.KERNEL_COMMON_COMMAND_LINE + 'console= =3DttyS0' + self.vm.add_args('-vga', 'std', + '-kernel', uncompressed_kernel, + '-append', kernel_command_line) + self.vm.launch() + console_pattern =3D 'Kernel command line: %s' % kernel_command_line + self.wait_for_console_pattern(console_pattern) --=20 2.20.1