From patchwork Wed Feb 5 20:32:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367075 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7883112B for ; Wed, 5 Feb 2020 20:35:20 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8E99A20659 for ; Wed, 5 Feb 2020 20:35:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SrDAVpmb" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8E99A20659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56084 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izROJ-0002sN-QE for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:35:19 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34725) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRM8-0006iT-Pm for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM5-00047D-Nd for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:03 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:53704 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM5-0003w5-Ay for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=JDz9mCNIGI2Zk8KDdwuh1w5mj6qkINma+v2v7MnALiQ=; b=SrDAVpmb9S+pGpWt7tVCctUbCQL+Suwo+X+SxALPhYuCuW3moBNHhCJWTQirHE819KRDkD rRj1NBtKu88HF5OJtMQRZZ+2Hd3s/Y/1idy/iGK6hxySp2SvviEawavv1fmr5FukQaf1HU vqWnTnNG8Q4nF0pnAucgowi31oCPIAo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-347-80jNTVxMOTeA4oABZTNdfw-1; Wed, 05 Feb 2020 15:32:55 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BCCAD1137842; Wed, 5 Feb 2020 20:32:54 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id F2A0310013A1; Wed, 5 Feb 2020 20:32:53 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 1/8] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter Date: Wed, 5 Feb 2020 15:32:43 -0500 Message-Id: <20200205203250.30526-2-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: 80jNTVxMOTeA4oABZTNdfw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The test case may need to boot the VM with an accelerator that isn't actually enabled on the QEMU binary and/or present in the host. In this case the test behavior is undefined, and the best course of action is to skip its execution. This change introduced the 'accel' parameter (and the handler of tag with same name) used to indicate the test case requires a given accelerator available. It was implemented a mechanism to skip the test case if the accelerator is not available. Moreover, the QEMU -accel argument is set automatically to any VM launched if the parameter is present. Signed-off-by: Wainer dos Santos Moschetta --- docs/devel/testing.rst | 16 ++++++++++++++++ tests/acceptance/avocado_qemu/__init__.py | 23 +++++++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index ab5be0c729..d17d0e90aa 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -759,6 +759,17 @@ 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=machine:VALUE`` tag, it will be set to ``VALUE``. +accel +~~~~~ +The accelerator that will be set to all QEMUMachine instances created +by the test. + +The ``accel`` attribute will be set to the test parameter of the same +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=accel:VALUE`` tag, it will be set to ``VALUE``. Currently +``VALUE`` should be either ``kvm`` or ``tcg``. + qemu_bin ~~~~~~~~ @@ -800,6 +811,11 @@ machine The machine type that will be set to all QEMUMachine instances created by the test. +accel +~~~~~ +The accelerator that will be set to all QEMUMachine instances created +by the test. In case the accelerator is not available (both QEMU +binary and the host system are checked) then the test is canceled. qemu_bin ~~~~~~~~ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index 6618ea67c1..c83a75ccbc 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -20,6 +20,7 @@ SRC_ROOT_DIR = os.path.join(os.path.dirname(__file__), '..', '..', '..') sys.path.append(os.path.join(SRC_ROOT_DIR, 'python')) from qemu.machine import QEMUMachine +from qemu.accel import kvm_available, tcg_available def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) @@ -111,6 +112,8 @@ class Test(avocado.Test): def setUp(self): self._vms = {} + # VM argumments that are mapped from parameters + self._param_to_vm_args = [] self.arch = self.params.get('arch', default=self._get_unique_tag_val('arch')) @@ -124,10 +127,30 @@ class Test(avocado.Test): if self.qemu_bin is None: self.cancel("No QEMU binary defined or found in the source tree") + self.accel = self.params.get('accel', + default=self._get_unique_tag_val('accel')) + if self.accel: + avail = False + if self.accel == 'kvm': + if kvm_available(self.arch, self.qemu_bin): + avail = True + elif self.accel == 'tcg': + if tcg_available(self.qemu_bin): + avail = True + else: + self.cancel("Unknown accelerator: %s" % self.accel) + + if avail: + self._param_to_vm_args.extend(['-accel', self.accel]) + else: + self.cancel("%s is not available" % self.accel) + def _new_vm(self, *args): vm = QEMUMachine(self.qemu_bin, sock_dir=tempfile.mkdtemp()) if args: vm.add_args(*args) + if self._param_to_vm_args: + vm.add_args(*self._param_to_vm_args) return vm @property From patchwork Wed Feb 5 20:32:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367079 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CC951112B for ; Wed, 5 Feb 2020 20:36:49 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A311A2072B for ; Wed, 5 Feb 2020 20:36:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IKNstoFU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A311A2072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56116 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRPk-0004jN-Ra for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:36:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34772) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRM9-0006iW-CM for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM8-0004Ii-9Q for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:27264 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM8-0004FX-5Z for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3UqJMxRmZ3B+z0w0X8z/nuvUFxb9Oqz7piGrWh3XpDo=; b=IKNstoFUXqS7ZdGfugjLn+vaBKKElQjT4KU5WGLL3yseSN3ZR7Ri1vNBI4jglxT2X8CBcv vrSFwLI4bceTJSqxMgsRHlaTEhVDWdr3VjCkZctVafwdJQsmCTbdgjk29dG2x2VVBKIt0Q +I1HKr0Slajupz0LXb6wlXgAjruAmTU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-330-LmjiUhWWPM-jtO-UFx7xbw-1; Wed, 05 Feb 2020 15:32:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A7C798010F8; Wed, 5 Feb 2020 20:32:55 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id DD4CD10013A1; Wed, 5 Feb 2020 20:32:54 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 2/8] tests/acceptance: boot_linux_console: Add boot Linux/x86 with KVM Date: Wed, 5 Feb 2020 15:32:44 -0500 Message-Id: <20200205203250.30526-3-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: LmjiUhWWPM-jtO-UFx7xbw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.61 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Added boot Linux on x86_64 test case that launch QEMU with KVM enabled. Likewise it was added one test for TCG. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index e40b84651b..fc72cdde0d 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -51,11 +51,7 @@ class BootLinuxConsole(Test): os.chdir(cwd) return self.workdir + path - def test_x86_64_pc(self): - """ - :avocado: tags=arch:x86_64 - :avocado: tags=machine:pc - """ + def do_test_x86_64_pc(self): kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/x86_64/os/images/pxeboot' '/vmlinuz') @@ -70,6 +66,22 @@ class BootLinuxConsole(Test): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + def test_x86_64_pc_kvm(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + :avocado: tags=accel:kvm + """ + self.do_test_x86_64_pc() + + def test_x86_64_pc_tcg(self): + """ + :avocado: tags=arch:x86_64 + :avocado: tags=machine:pc + :avocado: tags=accel:tcg + """ + self.do_test_x86_64_pc() + def test_mips_malta(self): """ :avocado: tags=arch:mips From patchwork Wed Feb 5 20:32:45 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367081 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCAA614D5 for ; Wed, 5 Feb 2020 20:38:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A2F482072B for ; Wed, 5 Feb 2020 20:38:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dUDzOswP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A2F482072B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRR7-000695-SD for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:38:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34874) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRMF-0006nL-1W for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM9-0004Qp-He for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:10 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:48568 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM9-0004NL-Dg for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YZzZagDMAIa73gHlbhHDi/KoiEhZ9DhGVYUeUAQzSr4=; b=dUDzOswPr84xaKhmKjW4XgRQjWYVyA0d8+o64oURB02rWGay5hyKu1cNFqiUSL4w6J/w3f k0HuCsFqNtT/vTF8MCxcsjqCWPtcWlxwfwwzy6jmveUo4mBRTTbEw2yLzfYlS+lwyXTLqY 3QMNzQZ5R1OE06Hh2BhdS3w7nOYmb60= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-429-OKidnxS7P1akqN6WFxMK4A-1; Wed, 05 Feb 2020 15:32:57 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 92A1EDB23; Wed, 5 Feb 2020 20:32:56 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id CA35A10013A1; Wed, 5 Feb 2020 20:32:55 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 3/8] tests/acceptance: boot_linux_console: Add boot Linux/aarch64 with KVM Date: Wed, 5 Feb 2020 15:32:45 -0500 Message-Id: <20200205203250.30526-4-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: OKidnxS7P1akqN6WFxMK4A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" This split in two the boot Linux test for aarch64: one that uses KVM acceleration and another with TCG. It changes -cpu to 'max' which is a common match between kvm and tcg. Note: on kvm test, even though it is tagged with 'machine:virt', it later has the value overwritten to pass the GIC version. The reason for that is an Avocado limitation, which is unable to parse correctly a tag containing ',' (this char being a tag delimiter). Keep the 'machine:virt' tag is still useful since it can be used on tests filtering. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index fc72cdde0d..76a66ee533 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -270,11 +270,7 @@ class BootLinuxConsole(Test): kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) - def test_aarch64_virt(self): - """ - :avocado: tags=arch:aarch64 - :avocado: tags=machine:virt - """ + def do_test_aarch64_virt(self): kernel_url = ('https://archives.fedoraproject.org/pub/archive/fedora' '/linux/releases/29/Everything/aarch64/os/images/pxeboot' '/vmlinuz') @@ -284,13 +280,30 @@ class BootLinuxConsole(Test): self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + 'console=ttyAMA0') - self.vm.add_args('-cpu', 'cortex-a53', + self.vm.add_args('-cpu', 'max', '-kernel', kernel_path, '-append', kernel_command_line) self.vm.launch() console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + def test_aarch64_virt_kvm(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:virt + :avocado: tags=accel:kvm + """ + self.vm.set_machine('virt,gic-version=max') + self.do_test_aarch64_virt() + + def test_aarch64_virt_tcg(self): + """ + :avocado: tags=arch:aarch64 + :avocado: tags=machine:virt + :avocado: tags=accel:tcg + """ + self.do_test_aarch64_virt() + def test_arm_virt(self): """ :avocado: tags=arch:arm From patchwork Wed Feb 5 20:32:46 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367071 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id AA2FF14E3 for ; Wed, 5 Feb 2020 20:34:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 803AE214AF for ; Wed, 5 Feb 2020 20:34:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="CPzbTGZ5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 803AE214AF Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRN2-00007S-KY for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:34:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34746) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRM8-0006iV-Pq for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM7-0004FH-P7 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:04 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:31073 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM7-0004Ak-Ll for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XjKDdskZ2C0qnl6/P4NRgUHjmFbpHvatwx7sQXn5eyw=; b=CPzbTGZ5cOrigZRzqRuKtOvU0dNpzAvnq//zbK+Z/oMlV0dZwwNxR6FoW/aEJk4QzQTBZh SZuGl4Z6nFYNBvMwZIPf6e7JRoilhMfv4BeEGU+kkfJIPJZH2k+089EtWmfVmZL8+7jAdE OaMKAiIDPObBDPcCeT4iyiXe5ymPwN0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-13-y2qWjA7XMHqCFQ-TP4HUWQ-1; Wed, 05 Feb 2020 15:32:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7EB4C1137841; Wed, 5 Feb 2020 20:32:57 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id B5A0410013A1; Wed, 5 Feb 2020 20:32:56 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 4/8] python/qemu: accel: Fix kvm_available() on ppc64le Date: Wed, 5 Feb 2020 15:32:46 -0500 Message-Id: <20200205203250.30526-5-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: y2qWjA7XMHqCFQ-TP4HUWQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" On ppc64le, the accel.kvm_available() check may wrongly return False because the host arch (as returned by os.uname[4]) and the target arch (ppc64) mismatch. In order to solve this it is added an ppc64le -> ppc64 mapping which is used as an fallback verification. Fixes: 53a049d7d78e5ccf6d4c0d7 Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé --- python/qemu/accel.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/qemu/accel.py b/python/qemu/accel.py index 0b38ddf0ab..36ae85791e 100644 --- a/python/qemu/accel.py +++ b/python/qemu/accel.py @@ -24,7 +24,8 @@ LOG = logging.getLogger(__name__) # support which often includes its 32 bit cousin. ADDITIONAL_ARCHES = { "x86_64" : "i386", - "aarch64" : "armhf" + "aarch64" : "armhf", + "ppc64le" : "ppc64", } def list_accel(qemu_bin): From patchwork Wed Feb 5 20:32:47 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367073 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5E027112B for ; Wed, 5 Feb 2020 20:34:10 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3502620659 for ; Wed, 5 Feb 2020 20:34:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NiljYs+N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3502620659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRNB-0000VY-9F for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:34:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34994) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRML-00072O-Mq for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRMK-0005E6-B4 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:17 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:43972 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRMK-00059C-6j for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uvRpncIm2GFwWR1rhLCciCWBKtJgGZNQdlNj/+PUO6U=; b=NiljYs+NyLILl3U9oJavmWlhsOBl12UAbxbwtJgfw8X2IClei8D2YcxkvHWFMlXGwLlsbF cJgcQOCZAvIPiLb543j0DjD4IBeQnbaId7Oq2fAbF2K6ZeoewFhj5/DtbACuShITAOGseX PILL40HXLf42pEybNedwcVMa1iHLiWA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-74-yTkpxFgGNTOdQ8qnJR0RoQ-1; Wed, 05 Feb 2020 15:32:59 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6D5B98010F8; Wed, 5 Feb 2020 20:32:58 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id A164F10013A1; Wed, 5 Feb 2020 20:32:57 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 5/8] test/acceptance: boot_linux_console: Add boot Linux/ppc64le with KVM Date: Wed, 5 Feb 2020 15:32:47 -0500 Message-Id: <20200205203250.30526-6-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: yTkpxFgGNTOdQ8qnJR0RoQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Likewise this splitted the boot Linux for ppc64le test in a version for KVM and another for TCG. The kvm test case is designed to run on POWER8 or greater, otherwise it is skipped. The SMT should be off on POWER8, that is also checked. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 39 ++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index 76a66ee533..ca385c90a4 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -19,6 +19,8 @@ from avocado_qemu import exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern from avocado.utils import process from avocado.utils import archive +from avocado.utils.cpu import get_cpu_vendor_name +from avocado.utils.path import find_command class BootLinuxConsole(Test): @@ -551,11 +553,7 @@ class BootLinuxConsole(Test): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) - def test_ppc64_pseries(self): - """ - :avocado: tags=arch:ppc64 - :avocado: tags=machine:pseries - """ + def do_test_ppc64_pseries(self): kernel_url = ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') @@ -570,6 +568,37 @@ class BootLinuxConsole(Test): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + @skipUnless(find_command('ppc64_cpu', default=False)) + def test_ppc64_pseries_kvm(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:kvm + + It assumes running on POWER8 or greater, otherwise skip the test. + If on POWER8 then SMT should be off, otherwise skip the test. + """ + cpu = get_cpu_vendor_name() + if not cpu.startswith('power'): + self.cancel('do not test with %s cpu' % cpu) + else: + version = int(cpu.replace('power', '')) + if version < 8: + self.cancel('cpu %s is not >= POWER8') + elif version == 8: + smt = process.run('ppc64_cpu --smt -n').stdout_text.strip() + if smt != 'SMT=1': + self.cancel('%s on POWER8' % smt) + self.do_test_ppc64_pseries() + + def test_ppc64_pseries_tcg(self): + """ + :avocado: tags=arch:ppc64 + :avocado: tags=machine:pseries + :avocado: tags=accel:tcg + """ + self.do_test_ppc64_pseries() + def test_m68k_q800(self): """ :avocado: tags=arch:m68k From patchwork Wed Feb 5 20:32:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367077 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9688714D5 for ; Wed, 5 Feb 2020 20:35:23 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6DE9120659 for ; Wed, 5 Feb 2020 20:35:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="asFemNE2" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6DE9120659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56086 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izROM-0002wT-K8 for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:35:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34811) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRMA-0006ip-GM for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM9-0004PN-8i for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:06 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:55153 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM9-0004Ld-4s for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=IQRbzIUcnufUVFf+NWbNUmQbce3BA+STKioUNBZCc0M=; b=asFemNE2UVPq6W35ptaBDLHHtGEdsDiwAQdWhnxduGOHIC4bZYQp/ZckgMd7ZrZo2jJjAJ 6/HRT6UpTi+f+BoChCkiyms14WYxZOlznNWyk6NatirYPh3F22mFI9m4A7HnZKdJ5Tf2sA uJkBWI1iFDu8Q5PFTr3d6S3JCt/ppB8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-320-SEZChmZEPo6EhVCdkxcK7A-1; Wed, 05 Feb 2020 15:33:00 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 58B4F184AEA6; Wed, 5 Feb 2020 20:32:59 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8E39210013A1; Wed, 5 Feb 2020 20:32:58 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 6/8] tests/acceptance: boot_linux_console: Add boot Linux/s390x with KVM Date: Wed, 5 Feb 2020 15:32:48 -0500 Message-Id: <20200205203250.30526-7-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: SEZChmZEPo6EhVCdkxcK7A-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Yet another splitting of boot the Linux tests between KVM and TCG. This time for s390x. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot_linux_console.py index ca385c90a4..2256623f7e 100644 --- a/tests/acceptance/boot_linux_console.py +++ b/tests/acceptance/boot_linux_console.py @@ -512,11 +512,7 @@ class BootLinuxConsole(Test): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system') - def test_s390x_s390_ccw_virtio(self): - """ - :avocado: tags=arch:s390x - :avocado: tags=machine:s390-ccw-virtio - """ + def do_test_s390x_s390_ccw_virtio(self): kernel_url = ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/s390x/os/images' '/kernel.img') @@ -532,6 +528,22 @@ class BootLinuxConsole(Test): console_pattern = 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) + def test_s390x_s390_ccw_virtio_kvm(self): + """ + :avocado: tags=arch:s390x + :avocado: tags=machine:s390-ccw-virtio + :avocado: tags=accel:kvm + """ + self.do_test_s390x_s390_ccw_virtio() + + def test_s390x_s390_ccw_virtio_tcg(self): + """ + :avocado: tags=arch:s390x + :avocado: tags=machine:s390-ccw-virtio + :avocado: tags=accel:tcg + """ + self.do_test_s390x_s390_ccw_virtio() + def test_alpha_clipper(self): """ :avocado: tags=arch:alpha From patchwork Wed Feb 5 20:32:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367067 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 50EEA112B for ; Wed, 5 Feb 2020 20:33:56 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D9FB820659 for ; Wed, 5 Feb 2020 20:33:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SXPSG/Ja" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D9FB820659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56058 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRMw-0008NA-Qz for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:33:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34733) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRM8-0006iU-Rv for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM7-0004Ci-CI for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:04 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:46228 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM7-0004Ay-8J for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=f2uGlt86COKYUDhQFWse6Ly3NxnMC67p7pADYGwbJQI=; b=SXPSG/Ja1F20BdF5vlWu0eDFvojeS8Rsp2HMnhfyKKULS3VX8N2c506WNZkCkKzjesKPHO d9y5QMY0szusDYLS+Nb4uEZ/dh/Xr7ZxnWin9LUREImIM4ZmcjczbdGR6Zgch+Fiw6oFSz ZiaUCDNqAmEGYvqXuoMu8qocDAkW7Hk= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-25-L3N2HlyWNy2oB4eabLWiPw-1; Wed, 05 Feb 2020 15:33:01 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 48E978010F8; Wed, 5 Feb 2020 20:33:00 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7C1A810013A1; Wed, 5 Feb 2020 20:32:59 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 7/8] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter Date: Wed, 5 Feb 2020 15:32:49 -0500 Message-Id: <20200205203250.30526-8-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: L3N2HlyWNy2oB4eabLWiPw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" The Test._param_to_vm_args variable contain VM arguments that should be added at launch which were originated from test parameters. Use this variable to set -M from 'machine' parameter as well. Signed-off-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé --- tests/acceptance/avocado_qemu/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/avocado_qemu/__init__.py index c83a75ccbc..443ac02aff 100644 --- a/tests/acceptance/avocado_qemu/__init__.py +++ b/tests/acceptance/avocado_qemu/__init__.py @@ -120,6 +120,8 @@ class Test(avocado.Test): self.machine = self.params.get('machine', default=self._get_unique_tag_val('machine')) + if self.machine: + self._param_to_vm_args.extend(['-M', self.machine]) default_qemu_bin = pick_default_qemu_bin(arch=self.arch) self.qemu_bin = self.params.get('qemu_bin', @@ -162,8 +164,6 @@ class Test(avocado.Test): name = str(uuid.uuid4()) if self._vms.get(name) is None: self._vms[name] = self._new_vm(*args) - if self.machine is not None: - self._vms[name].set_machine(self.machine) return self._vms[name] def tearDown(self): From patchwork Wed Feb 5 20:32:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wainer dos Santos Moschetta X-Patchwork-Id: 11367069 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9F224112B for ; Wed, 5 Feb 2020 20:34:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 761AB20659 for ; Wed, 5 Feb 2020 20:34:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="dEA6oKY/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 761AB20659 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:56060 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRN2-000075-Kn for patchwork-qemu-devel@patchwork.kernel.org; Wed, 05 Feb 2020 15:34:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:34785) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1izRM9-0006iX-K2 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1izRM8-0004KG-I9 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:05 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:40321 helo=us-smtp-delivery-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1izRM8-0004IC-E4 for qemu-devel@nongnu.org; Wed, 05 Feb 2020 15:33:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580934784; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CGSpo52D3fZW4+N8anSSrynW9tfxc5ispo3LN8n7cwk=; b=dEA6oKY/IFVTys2pOP+lgTs37lOLBxVOJLOyuBylBX1K8M1qBN8MSe3FuaQrikzyUvyThg UM/s49PiPUj24RkF8AUVS6j+wsUbpKA+10j1C0DdlKq+L55DLdlQYUyeblHdk88+1BYIsN JA1ax8MlaSG+kf2qIZi4m6bhR9KI+bE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-331-N1omvasKNKejBFW67Drqiw-1; Wed, 05 Feb 2020 15:33:02 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 314CE8010F9; Wed, 5 Feb 2020 20:33:01 +0000 (UTC) Received: from virtlab501.virt.lab.eng.bos.redhat.com (virtlab501.virt.lab.eng.bos.redhat.com [10.19.152.162]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67C47100164D; Wed, 5 Feb 2020 20:33:00 +0000 (UTC) From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v4 8/8] travis.yml: Enable acceptance KVM tests Date: Wed, 5 Feb 2020 15:32:50 -0500 Message-Id: <20200205203250.30526-9-wainersm@redhat.com> In-Reply-To: <20200205203250.30526-1-wainersm@redhat.com> References: <20200205203250.30526-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: N1omvasKNKejBFW67Drqiw-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: drjones@redhat.com, ehabkost@redhat.com, philmd@redhat.com, thuth@redhat.com, crosa@redhat.com, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Some acceptance tests require KVM or they are skipped. Travis enables nested virtualization by default with Ubuntu 18.04 (Bionic) on x86_64. So in order to run the kvm tests, this changed the acceptance builder to run in a Bionic VM. Also it was needed to ensure the current user has rw permission to /dev/kvm. python3.5-venv is not packaged on Bionic. So it was replaced with python3.6-venv. Signed-off-by: Wainer dos Santos Moschetta --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ae645e9fc..76fc828887 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ # Additional builds with specific requirements for a full VM need to # be added as additional matrix: entries later on dist: xenial +sudo: true language: c compiler: - gcc @@ -83,6 +84,9 @@ git: before_script: - if command -v ccache ; then ccache --zero-stats ; fi + - if [[ -c /dev/kvm ]] && ! [[ -r /dev/kvm && -w /dev/kvm ]]; then + sudo chmod o+rw /dev/kvm ; + fi - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} - ${SRC_DIR}/configure ${BASE_CONFIG} ${CONFIG} || { cat config.log && exit 1; } script: @@ -272,12 +276,13 @@ matrix: - TEST_CMD="make check-acceptance" after_script: - python3 -c 'import json; r = json.load(open("tests/results/latest/results.json")); [print(t["logfile"]) for t in r["tests"] if t["status"] not in ("PASS", "SKIP")]' | xargs cat + dist: bionic addons: apt: packages: - python3-pil - python3-pip - - python3.5-venv + - python3.6-venv - tesseract-ocr - tesseract-ocr-eng