From nobody Sat May 18 21:45:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579656734; cv=none; d=zohomail.com; s=zohoarc; b=nsfJJMSk5+BqVwZ7dHAsFS4+KTUckq4k5wUQlLqZHpJagIgXbWU5jZVOACCHQUC6rW0bR2+BlqZcaZXs15gmBiD/xJfqDWOS3XxDhvnHxHQOxE+nMJFCkXUjyJSsqkfAAyzzeJePyWKKkTNHHwW2u225dC+N998AYZsxGUX3oBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579656734; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=NOT9TfIeQEVy/0w6maL3TiaNhLxc1wdsdkJGKUIqTn4=; b=ebQs0l4uV3ulszOTFIGG2Xp0zDT/KywkpV8/dToGB067O9T6+N+oNAkPW7YLGYDvM00jZWzhOzegT1OWGOA4oL4PvuzC7kVBkCLon1v1ERe+6wComQ0yjRl5U2zdK4hX/wpG8182haPHS+wpilXUSHfnmGk+8vpPw5H0PLYsNq8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579656734770264.42992427940135; Tue, 21 Jan 2020 17:32:14 -0800 (PST) Received: from localhost ([::1]:34832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4sP-0005BK-HQ for importer@patchew.org; Tue, 21 Jan 2020 20:32:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38994) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4oW-0001CE-Pj for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:13 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu4oV-0004Ms-H8 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:12 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:42286 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 1iu4oV-0004MW-Do for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:11 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-341-YNPIP5lhP1SGgW3PNmxXSg-1; Tue, 21 Jan 2020 20:28: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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 34EA48010D7; Wed, 22 Jan 2020 01:28:07 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-78.gru2.redhat.com [10.97.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id C9A8985733; Wed, 22 Jan 2020 01:28:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579656490; 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=NOT9TfIeQEVy/0w6maL3TiaNhLxc1wdsdkJGKUIqTn4=; b=efGkBJRyDotTA2O9Q6LsKjlO6hMe2pHe3BEymchVlfquob7ojKl00RUOxacbWMI7b8k2JT A0pp8JL6R+sPzni3Xu4RvdFhbOHM4BEK9m2eE1lMG2IzwBPAI1Ylg7AXRPEmt10ScaFhLD cUh5N4wf91UGgzpJQeYJyx/k8SIoJ6A= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v3 1/4] tests/acceptance: avocado_qemu: Introduce the 'accel' test parameter Date: Tue, 21 Jan 2020 22:27:50 -0300 Message-Id: <20200122012753.9846-2-wainersm@redhat.com> In-Reply-To: <20200122012753.9846-1-wainersm@redhat.com> References: <20200122012753.9846-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: YNPIP5lhP1SGgW3PNmxXSg-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, thuth@redhat.com, alex.bennee@linaro.org, ehabkost@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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=3Dmachine:VALUE`` tag, it will be set to ``VALUE``. =20 +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=3Daccel:VALUE`` tag, it will be set to ``VALUE``. Current= ly +``VALUE`` should be either ``kvm`` or ``tcg``. + qemu_bin ~~~~~~~~ =20 @@ -800,6 +811,11 @@ machine The machine type that will be set to all QEMUMachine instances created by the test. =20 +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. =20 qemu_bin ~~~~~~~~ diff --git a/tests/acceptance/avocado_qemu/__init__.py b/tests/acceptance/a= vocado_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 =3D os.path.join(os.path.dirname(__file__), = '..', '..', '..') sys.path.append(os.path.join(SRC_ROOT_DIR, 'python')) =20 from qemu.machine import QEMUMachine +from qemu.accel import kvm_available, tcg_available =20 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): =20 def setUp(self): self._vms =3D {} + # VM argumments that are mapped from parameters + self._param_to_vm_args =3D [] =20 self.arch =3D self.params.get('arch', default=3Dself._get_unique_tag_val('ar= ch')) @@ -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 tre= e") =20 + self.accel =3D self.params.get('accel', + default=3Dself._get_unique_tag_val('a= ccel')) + if self.accel: + avail =3D False + if self.accel =3D=3D 'kvm': + if kvm_available(self.arch, self.qemu_bin): + avail =3D True + elif self.accel =3D=3D 'tcg': + if tcg_available(self.qemu_bin): + avail =3D 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 =3D QEMUMachine(self.qemu_bin, sock_dir=3Dtempfile.mkdtemp()) if args: vm.add_args(*args) + if self._param_to_vm_args: + vm.add_args(*self._param_to_vm_args) return vm =20 @property --=20 2.23.0 From nobody Sat May 18 21:45:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579656614; cv=none; d=zohomail.com; s=zohoarc; b=CU8A2Ai+FO1kOQHcU7hhr8qufa1UyJw0USgI0qx+WoNPoZh9CnPoMWNv9A1PIbM1GQo0Yx1oNPtVtrYUHhCW1FASrffR+e36owjm9IpfmodUddcLUl947yrsqjPOmCdDLlZ1vS4pjpGZkQsc48tI6j3W8Jl8xBwyiJpharhvwzE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579656614; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=XkOJW5CRhAR2yP0xNntEPugQOv+nm9ZnOkcmx4SulkI=; b=eF7IKAw/MVQSoSvarXC5ifVhnY2CByeSo/AmRxHvZM0OzCoqZ1OUHN4IrRMuV3QtEPPl7kB37dGpyrb6KAQWRRVtlGceKw6W3VfCfSpbuec00O5pHEMfL/T1dcn7FXmcA67fnt9N9hLL/9IjZdbPDTLLED5noh+97ijjGJjrvyU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579656614287921.5456027701399; Tue, 21 Jan 2020 17:30:14 -0800 (PST) Received: from localhost ([::1]:34794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4qS-0002y9-Af for importer@patchew.org; Tue, 21 Jan 2020 20:30:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39050) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4og-0001Ln-Ma for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu4oe-0004R7-9B for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:22 -0500 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:45747 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 1iu4oe-0004QZ-5e for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:20 -0500 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-340-Mdj64IhoNoS_ApSvrQ7LGQ-1; Tue, 21 Jan 2020 20:28:15 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id DFDCADB23; Wed, 22 Jan 2020 01:28:14 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-78.gru2.redhat.com [10.97.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32C07806B7; Wed, 22 Jan 2020 01:28:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579656499; 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=XkOJW5CRhAR2yP0xNntEPugQOv+nm9ZnOkcmx4SulkI=; b=CjMUrMqrqB28uGy7lsHyunJjQmBkhZcvs7Ie3qkFze4wm1SdNsGwk6Xxnnl8LSNTj0ZV41 cSv5Lr2Lw9j5Xs+6yUpPNSziXL2IbeSdY3IMGfBw5JNhBhfiPsGWIF/wxBmjTlBwHEkt9L gmSmgy6hTpA0pTcpA5kqaBPauSUzKro= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v3 2/4] tests/acceptance: boot_linux_console: Add boot Linux with kvm tests Date: Tue, 21 Jan 2020 22:27:51 -0300 Message-Id: <20200122012753.9846-3-wainersm@redhat.com> In-Reply-To: <20200122012753.9846-1-wainersm@redhat.com> References: <20200122012753.9846-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: Mdj64IhoNoS_ApSvrQ7LGQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 205.139.110.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, thuth@redhat.com, alex.bennee@linaro.org, ehabkost@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Added boot Linux test cases that launch QEMU with kvm enabled. Likewise it was added tests for tcg. Signed-off-by: Wainer dos Santos Moschetta --- tests/acceptance/boot_linux_console.py | 88 ++++++++++++++++++++------ 1 file changed, 68 insertions(+), 20 deletions(-) diff --git a/tests/acceptance/boot_linux_console.py b/tests/acceptance/boot= _linux_console.py index e40b84651b..a36eae630c 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 =20 - def test_x86_64_pc(self): - """ - :avocado: tags=3Darch:x86_64 - :avocado: tags=3Dmachine:pc - """ + def do_test_x86_64_pc(self): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' '/linux/releases/29/Everything/x86_64/os/images/pxeb= oot' '/vmlinuz') @@ -70,6 +66,22 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 + def test_x86_64_pc_kvm(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + :avocado: tags=3Daccel:kvm + """ + self.do_test_x86_64_pc() + + def test_x86_64_pc_tcg(self): + """ + :avocado: tags=3Darch:x86_64 + :avocado: tags=3Dmachine:pc + :avocado: tags=3Daccel:tcg + """ + self.do_test_x86_64_pc() + def test_mips_malta(self): """ :avocado: tags=3Darch:mips @@ -258,11 +270,7 @@ class BootLinuxConsole(Test): kernel_hash =3D '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) =20 - def test_aarch64_virt(self): - """ - :avocado: tags=3Darch:aarch64 - :avocado: tags=3Dmachine:virt - """ + def do_test_aarch64_virt(self): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive/fe= dora' '/linux/releases/29/Everything/aarch64/os/images/pxe= boot' '/vmlinuz') @@ -279,6 +287,22 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 + def test_aarch64_virt_kvm(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + :avocado: tags=3Daccel:kvm + """ + self.do_test_aarch64_virt() + + def test_aarch64_virt_tcg(self): + """ + :avocado: tags=3Darch:aarch64 + :avocado: tags=3Dmachine:virt + :avocado: tags=3Daccel:tcg + """ + self.do_test_aarch64_virt() + def test_arm_virt(self): """ :avocado: tags=3Darch:arm @@ -485,11 +509,7 @@ class BootLinuxConsole(Test): exec_command_and_wait_for_pattern(self, 'reboot', 'reboot: Restarting system= ') =20 - def test_s390x_s390_ccw_virtio(self): - """ - :avocado: tags=3Darch:s390x - :avocado: tags=3Dmachine:s390-ccw-virtio - """ + def do_test_s390x_s390_ccw_virtio(self): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/s390x/os/i= mages' '/kernel.img') @@ -505,6 +525,22 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 + def test_s390x_s390_ccw_virtio_kvm(self): + """ + :avocado: tags=3Darch:s390x + :avocado: tags=3Dmachine:s390-ccw-virtio + :avocado: tags=3Daccel:kvm + """ + self.do_test_s390x_s390_ccw_virtio() + + def test_s390x_s390_ccw_virtio_tcg(self): + """ + :avocado: tags=3Darch:s390x + :avocado: tags=3Dmachine:s390-ccw-virtio + :avocado: tags=3Daccel:tcg + """ + self.do_test_s390x_s390_ccw_virtio() + def test_alpha_clipper(self): """ :avocado: tags=3Darch:alpha @@ -526,11 +562,7 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 - def test_ppc64_pseries(self): - """ - :avocado: tags=3Darch:ppc64 - :avocado: tags=3Dmachine:pseries - """ + def do_test_ppc64_pseries(self): kernel_url =3D ('https://archives.fedoraproject.org/pub/archive' '/fedora-secondary/releases/29/Everything/ppc64le/os' '/ppc/ppc64/vmlinuz') @@ -545,6 +577,22 @@ class BootLinuxConsole(Test): console_pattern =3D 'Kernel command line: %s' % kernel_command_line self.wait_for_console_pattern(console_pattern) =20 + def test_ppc64le_pseries_kvm(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:kvm + """ + self.do_test_ppc64_pseries() + + def test_ppc64le_pseries_tcg(self): + """ + :avocado: tags=3Darch:ppc64 + :avocado: tags=3Dmachine:pseries + :avocado: tags=3Daccel:tcg + """ + self.do_test_ppc64_pseries() + def test_m68k_q800(self): """ :avocado: tags=3Darch:m68k --=20 2.23.0 From nobody Sat May 18 21:45:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579656617; cv=none; d=zohomail.com; s=zohoarc; b=f4DDcM1C8Le3S1bhOsc7h2Z74XvVoRIhTQ0KbPlKboxSBOpl2u/aOiW/1rg2CLSBOa+w1WQzsW1v9a4uL0vsUnX5jKFFFYm7/lgR0kWilhwcm7c0CgVGLSpbPnAaZzEcxeBGo+FIHC/TiU1BvbWTR1UrcCiUpXyjh07IB2/tH70= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579656617; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=Z92ZHg6ZyozFAyTVE3FsZMubNwGe6KnSfuBFnzluyz8=; b=m6k65SlUHlD5szf5Olwlh9/vhlt8GQ4sNthEPyyNQlEph2f+U6iMukJplEsSNR9ovJ/AkZE0Bs75B9jS+Sw36HWJ/L4XtO1rxmUexWjWcTd9kMdlYtlnsge0PDjWKGxsdQqpk9bs/fHdnD67yptEJVjC4YNocPp/GeF6ZEWPVAc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579656617690532.1598710051154; Tue, 21 Jan 2020 17:30:17 -0800 (PST) Received: from localhost ([::1]:34796 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4qW-000324-0q for importer@patchew.org; Tue, 21 Jan 2020 20:30:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39065) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4ok-0001Q4-GE for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu4oj-0004Sh-GV for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:26 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27570 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 1iu4oj-0004SY-DG for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:25 -0500 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-183-gWBXWnU8N66GaCU-H73VbA-1; Tue, 21 Jan 2020 20:28:21 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id AA7498010C2; Wed, 22 Jan 2020 01:28:20 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-78.gru2.redhat.com [10.97.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id A2D58806B7; Wed, 22 Jan 2020 01:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579656505; 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=Z92ZHg6ZyozFAyTVE3FsZMubNwGe6KnSfuBFnzluyz8=; b=QVb+/z3tM+4TT/ayvXnrwalxaypIgYbfUBlaFmQJBiO34S+4PncTyjJ3rB8suFmF5cqwNg Ir5VKNJrUkw6EHkcgaWHzMsUUv5nwgCb25mZlDR+sXqKVw2fCUQL0Rx/tJxwp6SlP4cTim WYjGJsfGkHxJrCoFHXTKMKpXYI2jrQ4= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v3 3/4] tests/acceptance: avocado_qemu: Refactor the handler of 'machine' parameter Date: Tue, 21 Jan 2020 22:27:52 -0300 Message-Id: <20200122012753.9846-4-wainersm@redhat.com> In-Reply-To: <20200122012753.9846-1-wainersm@redhat.com> References: <20200122012753.9846-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: gWBXWnU8N66GaCU-H73VbA-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, thuth@redhat.com, alex.bennee@linaro.org, ehabkost@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" The Test._param_to_vm_args variable contain VM arguments that should be add= ed 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=C3=A9 --- 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/a= vocado_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): =20 self.machine =3D self.params.get('machine', default=3Dself._get_unique_tag_val(= 'machine')) + if self.machine: + self._param_to_vm_args.extend(['-M', self.machine]) =20 default_qemu_bin =3D pick_default_qemu_bin(arch=3Dself.arch) self.qemu_bin =3D self.params.get('qemu_bin', @@ -162,8 +164,6 @@ class Test(avocado.Test): name =3D str(uuid.uuid4()) if self._vms.get(name) is None: self._vms[name] =3D self._new_vm(*args) - if self.machine is not None: - self._vms[name].set_machine(self.machine) return self._vms[name] =20 def tearDown(self): --=20 2.23.0 From nobody Sat May 18 21:45:40 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579656745; cv=none; d=zohomail.com; s=zohoarc; b=lkQ9Pv+gKbQyb770ZROn6IBElyoxTu9QcGkyNR+nwSCmBtFDNmWOOFXCVPXIdaJsYn7/2iR6ZF1jR/u2pgg7Fn4bbhc/KPoZ96yoLf3EAMhmc5VqiKptJFHk1V7l1SQGWl1XY3ef93rm6OyakUm/OpkfzTU4d+poDNXbbTMicyw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579656745; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=16m8CWi1RicKeiu7hQtFCqvb3TfpjKb/WXBT4ZKDVKQ=; b=jVd+TAvB9MHFkdWC9i4sx5rphgVfjR5+dEJcUSLr1SM61UizT9e3k4nnnJxDbRFL7r3FJprQs7g6S0jiIuB8q4jXnAk957BFXY/stagC3+CNGoJS7jP7ApJ1Jwiq8/9CHDd29f9qMwR2KWcC3m2JPU8HFmjhipuTSMJBOsHkf5Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1579656745730447.4341012806549; Tue, 21 Jan 2020 17:32:25 -0800 (PST) Received: from localhost ([::1]:34838 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4sa-0005Ok-FX for importer@patchew.org; Tue, 21 Jan 2020 20:32:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39098) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iu4or-0001ZY-Tz for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iu4oq-0004V4-QS for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:33 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:28086 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 1iu4oq-0004Um-C3 for qemu-devel@nongnu.org; Tue, 21 Jan 2020 20:28:32 -0500 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-339-TYJtqCdTMCmY8qItF7N2Ug-1; Tue, 21 Jan 2020 20:28:27 -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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 576461854336; Wed, 22 Jan 2020 01:28:26 +0000 (UTC) Received: from localhost.localdomain (ovpn-116-78.gru2.redhat.com [10.97.116.78]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6504985736; Wed, 22 Jan 2020 01:28:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579656512; 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=16m8CWi1RicKeiu7hQtFCqvb3TfpjKb/WXBT4ZKDVKQ=; b=T5DbkeSZ4KaOKJxu6rjWYnVm1w+IG1+6SElj7CnwDOezdoVfgXXP+iuPqyOo0dLvM8+zUw ydFgIytyFbpYFrRMe+9i2Q2G5GGdryEc8bNubj+GdBrsp9NdauPKFLM5erTMWpPeMhhY5i TC68HtmEL5s1kPQstlxKfzgjfhsN5bk= From: Wainer dos Santos Moschetta To: qemu-devel@nongnu.org Subject: [PATCH v3 4/4] travis.yml: Enable acceptance KVM tests Date: Tue, 21 Jan 2020 22:27:53 -0300 Message-Id: <20200122012753.9846-5-wainersm@redhat.com> In-Reply-To: <20200122012753.9846-1-wainersm@redhat.com> References: <20200122012753.9846-1-wainersm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: TYJtqCdTMCmY8qItF7N2Ug-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.81 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: philmd@redhat.com, thuth@redhat.com, alex.bennee@linaro.org, ehabkost@redhat.com, crosa@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" 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. Signed-off-by: Wainer dos Santos Moschetta Tested-by: Thomas Huth --- .travis.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6c1038a0f1..c3edd0a907 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: =20 before_script: - if command -v ccache ; then ccache --zero-stats ; fi + - if [[ -e /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 && e= xit 1; } script: @@ -272,12 +276,13 @@ matrix: - TEST_CMD=3D"make check-acceptance" after_script: - python3 -c 'import json; r =3D json.load(open("tests/results/lat= est/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 =20 --=20 2.23.0