From nobody Tue Apr 16 11:16:29 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 1549685027288221.3379135154114; Fri, 8 Feb 2019 20:03:47 -0800 (PST) Received: from localhost ([127.0.0.1]:39325 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsJrh-0001yv-8T for importer@patchew.org; Fri, 08 Feb 2019 23:03:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46624) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsJqA-00013f-Br for qemu-devel@nongnu.org; Fri, 08 Feb 2019 23:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsJq9-0000Nx-Hx for qemu-devel@nongnu.org; Fri, 08 Feb 2019 23:02:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45816) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsJq7-0000Dr-79; Fri, 08 Feb 2019 23:02:03 -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 mx1.redhat.com (Postfix) with ESMTPS id DAE00C059B8C; Sat, 9 Feb 2019 04:01:42 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-41.rdu2.redhat.com [10.10.120.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C10001001F5D; Sat, 9 Feb 2019 04:01:37 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 8 Feb 2019 23:01:31 -0500 Message-Id: <20190209040132.25573-2-crosa@redhat.com> In-Reply-To: <20190209040132.25573-1-crosa@redhat.com> References: <20190209040132.25573-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Sat, 09 Feb 2019 04:01: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 1/2] qemu-iotests: only enable kvm if the host seems to support it 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: Kevin Wolf , Fam Zheng , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Reitz , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" There are certainly some improvements to be made with regards to kvm capabilities detection, but this seems good enough for this specific case. Signed-off-by: Cleber Rosa --- tests/qemu-iotests/235 | 5 +++-- tests/qemu-iotests/238 | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/235 b/tests/qemu-iotests/235 index d6edd97ab4..c83b548adc 100755 --- a/tests/qemu-iotests/235 +++ b/tests/qemu-iotests/235 @@ -25,7 +25,7 @@ from iotests import qemu_img_create, qemu_io, file_path, = log =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scrip= ts')) =20 -from qemu import QEMUMachine +from qemu import QEMUMachine, kvm_available =20 # Note: # This test was added to check that mirror dead-lock was fixed (see previo= us @@ -49,7 +49,8 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocatio= n=3Dmetadata', disk, str(size)) =20 vm =3D QEMUMachine(iotests.qemu_prog) -vm.add_args('-machine', 'accel=3Dkvm') +if kvm_available(): + vm.add_args('-machine', 'accel=3Dkvm') if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': vm.add_args('-no-shutdown') vm.add_args('-drive', 'id=3Dsrc,file=3D' + disk) diff --git a/tests/qemu-iotests/238 b/tests/qemu-iotests/238 index f81ee1112f..75ccd5f82f 100755 --- a/tests/qemu-iotests/238 +++ b/tests/qemu-iotests/238 @@ -25,7 +25,7 @@ from iotests import log =20 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scrip= ts')) =20 -from qemu import QEMUMachine +from qemu import QEMUMachine, kvm_available =20 if iotests.qemu_default_machine =3D=3D 's390-ccw-virtio': virtio_scsi_device =3D 'virtio-scsi-ccw' @@ -33,7 +33,8 @@ else: virtio_scsi_device =3D 'virtio-scsi-pci' =20 vm =3D QEMUMachine(iotests.qemu_prog) -vm.add_args('-machine', 'accel=3Dkvm') +if kvm_available(): + vm.add_args('-machine', 'accel=3Dkvm') vm.launch() =20 log(vm.qmp('blockdev-add', node_name=3D'hd0', driver=3D'null-co')) --=20 2.20.1 From nobody Tue Apr 16 11:16:29 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 154968504354595.77241695892087; Fri, 8 Feb 2019 20:04:03 -0800 (PST) Received: from localhost ([127.0.0.1]:39327 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsJrz-0002E7-GB for importer@patchew.org; Fri, 08 Feb 2019 23:03:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsJqA-00013h-C8 for qemu-devel@nongnu.org; Fri, 08 Feb 2019 23:02:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gsJq9-0000O2-IA for qemu-devel@nongnu.org; Fri, 08 Feb 2019 23:02:06 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51756) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gsJq7-0000EN-54; Fri, 08 Feb 2019 23:02:03 -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 mx1.redhat.com (Postfix) with ESMTPS id 483CE88305; Sat, 9 Feb 2019 04:01:44 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-120-41.rdu2.redhat.com [10.10.120.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 122D810E81CB; Sat, 9 Feb 2019 04:01:42 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Date: Fri, 8 Feb 2019 23:01:32 -0500 Message-Id: <20190209040132.25573-3-crosa@redhat.com> In-Reply-To: <20190209040132.25573-1-crosa@redhat.com> References: <20190209040132.25573-1-crosa@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Sat, 09 Feb 2019 04:01: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 2/2] qemu-iotests: add "make check-block" job to Travis 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: Kevin Wolf , Fam Zheng , qemu-block@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Max Reitz , Cleber Rosa , =?UTF-8?q?Alex=20Benn=C3=A9e?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" I usually keep an eye if I'm breaking stuff by looking at Travis (too). So it seems like a good idea to add a job that will do that. A few things deserve a better explanation: * test 233 requires "--enable-gnutls", and fails without it * QEMU seems unable to initialize sound devices on the environment given by Travis, and that's why it's compiled without any audio driver. * The syntax for setting an empty list of audio drivers possibly deserves some TLC (it's not currently possible to set it to an empty list with quotes, resulting in something like "Unknown driver '''' selected". Signed-off-by: Cleber Rosa --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 87d9fa971c..6d60ae9762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -196,6 +196,14 @@ matrix: packages: - python3-pip - python3.5-venv + + + # qemu-iotests + - env: + - CONFIG=3D"--target-list=3Dx86_64-softmmu --enable-gnutls --audio= -drv-list=3D" + - TEST_CMD=3D"make check-block" + + # Using newer GCC with sanitizers - addons: apt: --=20 2.20.1