From patchwork Sat Feb 9 04:01:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10804083 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 81A9914E1 for ; Sat, 9 Feb 2019 04:03:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 720862E23B for ; Sat, 9 Feb 2019 04:03:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65A302E289; Sat, 9 Feb 2019 04:03:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 159C62E23B for ; Sat, 9 Feb 2019 04:03:14 +0000 (UTC) Received: from localhost ([127.0.0.1]:39317 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gsJrG-000150-8A for patchwork-qemu-devel@patchwork.kernel.org; Fri, 08 Feb 2019 23:03:14 -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) 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_Mathieu-Daud=C3=A9?= , Max Reitz , Cleber Rosa , =?utf-8?q?Al?= =?utf-8?q?ex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts')) -from qemu import QEMUMachine +from qemu import QEMUMachine, kvm_available # Note: # This test was added to check that mirror dead-lock was fixed (see previous @@ -49,7 +49,8 @@ qemu_img_create('-f', iotests.imgfmt, '-o', 'preallocation=metadata', disk, str(size)) vm = QEMUMachine(iotests.qemu_prog) -vm.add_args('-machine', 'accel=kvm') +if kvm_available(): + vm.add_args('-machine', 'accel=kvm') if iotests.qemu_default_machine == 's390-ccw-virtio': vm.add_args('-no-shutdown') vm.add_args('-drive', 'id=src,file=' + 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 sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'scripts')) -from qemu import QEMUMachine +from qemu import QEMUMachine, kvm_available if iotests.qemu_default_machine == 's390-ccw-virtio': virtio_scsi_device = 'virtio-scsi-ccw' @@ -33,7 +33,8 @@ else: virtio_scsi_device = 'virtio-scsi-pci' vm = QEMUMachine(iotests.qemu_prog) -vm.add_args('-machine', 'accel=kvm') +if kvm_available(): + vm.add_args('-machine', 'accel=kvm') vm.launch() log(vm.qmp('blockdev-add', node_name='hd0', driver='null-co')) From patchwork Sat Feb 9 04:01:32 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 10804085 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4D3D514E1 for ; Sat, 9 Feb 2019 04:03:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C96C2E23B for ; Sat, 9 Feb 2019 04:03:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2E2972E289; Sat, 9 Feb 2019 04:03:34 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C7EF72E23B for ; Sat, 9 Feb 2019 04:03:33 +0000 (UTC) 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-5p for patchwork-qemu-devel@patchwork.kernel.org; Fri, 08 Feb 2019 23:03:33 -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) 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_Mathieu-Daud=C3=A9?= , Max Reitz , Cleber Rosa , =?utf-8?q?Al?= =?utf-8?q?ex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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="--target-list=x86_64-softmmu --enable-gnutls --audio-drv-list=" + - TEST_CMD="make check-block" + + # Using newer GCC with sanitizers - addons: apt: