From nobody Tue Feb 10 20:47:56 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; 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 ARC-Seal: i=1; a=rsa-sha256; t=1616185706; cv=none; d=zohomail.com; s=zohoarc; b=jd60LrwgibTEO+c8g4sj+QS7BF7MNlAY7poahod90FSbStGDGKbZaD+evXywfnxZ2z6Z74o/E/QFhQ4KuH9+6dvVG02KOL+0vVKOvZTsAlgnBu0QNr4omMOoSU0+kTDS+e81xlKNOvpZ1SybykDnR6BxKZfTbyGIuZDraPPRdvc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1616185706; h=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=ozyjs1Qp0PnndwjTYVHczt6YWhMK6OLhRYwymumB5Pc=; b=To0M2001Vk1JM94516rUpPM9HvL2dxZ0PnlhqRPopCMRRn8QrMgwERqaM7bVwdiagxptrQ9cwAYy7wWT6+7ApE9uQQbqLOILwpKwI8pAPld/cJ5lkg67cQH/voYV0G0iTXxg7U+9wrtyuM0SYNonuowC/MfQUc40+4fgiUClNro= ARC-Authentication-Results: i=1; mx.zohomail.com; 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1616185706412258.2473933049573; Fri, 19 Mar 2021 13:28:26 -0700 (PDT) Received: from localhost ([::1]:53390 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lNLjM-0001jV-Hr for importer@patchew.org; Fri, 19 Mar 2021 16:28:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47692) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLf1-0004hj-Fq; Fri, 19 Mar 2021 16:23:55 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:33073) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lNLex-0001PB-5k; Fri, 19 Mar 2021 16:23:55 -0400 Received: from localhost.localdomain ([82.142.20.38]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MKKIZ-1l7BxG2KbP-00LrCS; Fri, 19 Mar 2021 21:23:45 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Subject: [PATCH v3 6/6] iotests: iothreads need ioeventfd Date: Fri, 19 Mar 2021 21:23:35 +0100 Message-Id: <20210319202335.2397060-7-laurent@vivier.eu> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210319202335.2397060-1-laurent@vivier.eu> References: <20210319202335.2397060-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Bvr2lMNLeWFB6ix2L7INbQjVwPfsB0Cd5IFjUjpHS0KtvsDGMR9 ZlP4KCWbMBXS6cT1ZONF84AD2WtGoP64I177hZvBcTiji85TRVmGWdyPRsfoP2wfSHxDoep mHxplD6vXQuSwIVW64jDsZJOiv0ZKW7cYM9Ih4nH04+Dt42g1FeKQfpb/hSE/Lk5hQ57eN7 Tu60Me1+7i34V9tyQyIAw== X-UI-Out-Filterresults: notjunk:1;V03:K0:lbiQ0Lcfwxo=:3DyiptjdbaIuF0ninv4s4n Y7jKE2n6dRWGJmoqAYNPJiJxxide7qfejXySBzt+gpUaX8ekPREy60xC6L4nYdnXTaY+eIB+X SrvAX7x0yaPF3gQQNkB8P+OwdUMlDjWclJrR47dUmcDnZRLTUx9LlkBaI4A8G4DBfdH1g/a2y s74DX2pGNcvn64/laGVCp+9dmHbXb/n6crfFxXVgNtk7sXOufDGqDhpr94PQZ8AZp+CxxRSOY iTHutYOnKBmgEqitzWzyDYR0Q2d9EPxlij21ozogBV1LwUCmDEnTny+bCqiTTl1Yc4H7NZc9S lnX1lp+KalxttfV/pCABtKkuzIPzrbUTFa4lPZiIKQskr4SzIfjsbrKATOCBEL6e+CI4+Ibg/ jq4g2znhe3z5zo7wWU+P4NkSmFyi+zBixAbWym69pxEwxldK1MDGJXJq0AQ78iDE6iHndEMA3 dSUOYmPfuw== 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; Received-SPF: none client-ip=212.227.126.187; envelope-from=laurent@vivier.eu; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Kevin Wolf , Peter Maydell , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , Eduardo Habkost , qemu-block@nongnu.org, Cornelia Huck , Markus Armbruster , Max Reitz , qemu-s390x@nongnu.org, Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" And ioeventfd are only available with virtio-scsi-pci or virtio-scsi-ccw, use the alias but add a rule to require virtio-scsi-pci or virtio-scsi-ccw for the tests that use iothreads. Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- tests/qemu-iotests/127 | 3 ++- tests/qemu-iotests/256 | 6 ++++-- tests/qemu-iotests/common.rc | 13 +++++++++++++ tests/qemu-iotests/iotests.py | 5 +++++ 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/tests/qemu-iotests/127 b/tests/qemu-iotests/127 index 98e8e82a8210..32edc3b0685e 100755 --- a/tests/qemu-iotests/127 +++ b/tests/qemu-iotests/127 @@ -44,7 +44,8 @@ trap "_cleanup; exit \$status" 0 1 2 3 15 _supported_fmt qcow2 _supported_proto file fuse =20 -_require_devices virtio-scsi scsi-hd +_require_devices scsi-hd +_require_one_device_of virtio-scsi-pci virtio-scsi-ccw =20 IMG_SIZE=3D64K =20 diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256 index 8d82a1dd865f..13666813bd8f 100755 --- a/tests/qemu-iotests/256 +++ b/tests/qemu-iotests/256 @@ -24,6 +24,8 @@ import os import iotests from iotests import log =20 +iotests._verify_virtio_scsi_pci_or_ccw() + iotests.script_initialize(supported_fmts=3D['qcow2']) size =3D 64 * 1024 * 1024 =20 @@ -61,8 +63,8 @@ with iotests.FilePath('img0') as img0_path, \ log('--- Preparing images & VM ---\n') vm.add_object('iothread,id=3Diothread0') vm.add_object('iothread,id=3Diothread1') - vm.add_device('virtio-scsi-pci,id=3Dscsi0,iothread=3Diothread0') - vm.add_device('virtio-scsi-pci,id=3Dscsi1,iothread=3Diothread1') + vm.add_device('virtio-scsi,id=3Dscsi0,iothread=3Diothread0') + vm.add_device('virtio-scsi,id=3Dscsi1,iothread=3Diothread1') iotests.qemu_img_create('-f', iotests.imgfmt, img0_path, str(size)) iotests.qemu_img_create('-f', iotests.imgfmt, img1_path, str(size)) vm.add_drive(img0_path, interface=3D'none') diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc index 65cdba5723ba..7f49c9716db7 100644 --- a/tests/qemu-iotests/common.rc +++ b/tests/qemu-iotests/common.rc @@ -977,5 +977,18 @@ _require_devices() done } =20 +_require_one_device_of() +{ + available=3D$($QEMU -M none -device help | \ + grep ^name | sed -e 's/^name "//' -e 's/".*$//') + for device + do + if echo "$available" | grep -q "$device" ; then + return + fi + done + _notrun "$* not available" +} + # make sure this script returns success true diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py index 1e9e6a066e90..5af01828951e 100644 --- a/tests/qemu-iotests/iotests.py +++ b/tests/qemu-iotests/iotests.py @@ -1146,6 +1146,11 @@ def _verify_virtio_blk() -> None: if 'virtio-blk' not in out: notrun('Missing virtio-blk in QEMU binary') =20 +def _verify_virtio_scsi_pci_or_ccw() -> None: + out =3D qemu_pipe('-M', 'none', '-device', 'help') + if 'virtio-scsi-pci' not in out and 'virtio-scsi-ccw' not in out: + notrun('Missing virtio-scsi-pci or virtio-scsi-ccw in QEMU binary') + =20 def supports_quorum(): return 'quorum' in qemu_img_pipe('--help') --=20 2.30.2