qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Kevin Wolf" <kwolf@redhat.com>, "Thomas Huth" <thuth@redhat.com>,
	"open list:Block layer core" <qemu-block@nongnu.org>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Max Reitz" <mreitz@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>
Subject: [PATCH  v2 21/22] iotests: iothreads need ioeventfd
Date: Tue, 23 Mar 2021 16:53:07 +0000	[thread overview]
Message-ID: <20210323165308.15244-22-alex.bennee@linaro.org> (raw)
In-Reply-To: <20210323165308.15244-1-alex.bennee@linaro.org>

From: Laurent Vivier <laurent@vivier.eu>

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 <laurent@vivier.eu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210319202335.2397060-7-laurent@vivier.eu>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 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 98e8e82a82..32edc3b068 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
 
-_require_devices virtio-scsi scsi-hd
+_require_devices scsi-hd
+_require_one_device_of virtio-scsi-pci virtio-scsi-ccw
 
 IMG_SIZE=64K
 
diff --git a/tests/qemu-iotests/256 b/tests/qemu-iotests/256
index 8d82a1dd86..13666813bd 100755
--- a/tests/qemu-iotests/256
+++ b/tests/qemu-iotests/256
@@ -24,6 +24,8 @@ import os
 import iotests
 from iotests import log
 
+iotests._verify_virtio_scsi_pci_or_ccw()
+
 iotests.script_initialize(supported_fmts=['qcow2'])
 size = 64 * 1024 * 1024
 
@@ -61,8 +63,8 @@ with iotests.FilePath('img0') as img0_path, \
     log('--- Preparing images & VM ---\n')
     vm.add_object('iothread,id=iothread0')
     vm.add_object('iothread,id=iothread1')
-    vm.add_device('virtio-scsi-pci,id=scsi0,iothread=iothread0')
-    vm.add_device('virtio-scsi-pci,id=scsi1,iothread=iothread1')
+    vm.add_device('virtio-scsi,id=scsi0,iothread=iothread0')
+    vm.add_device('virtio-scsi,id=scsi1,iothread=iothread1')
     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='none')
diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc
index 65cdba5723..7f49c9716d 100644
--- a/tests/qemu-iotests/common.rc
+++ b/tests/qemu-iotests/common.rc
@@ -977,5 +977,18 @@ _require_devices()
     done
 }
 
+_require_one_device_of()
+{
+    available=$($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 1e9e6a066e..5af0182895 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')
 
+def _verify_virtio_scsi_pci_or_ccw() -> None:
+    out = 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')
+
 
 def supports_quorum():
     return 'quorum' in qemu_img_pipe('--help')
-- 
2.20.1



  parent reply	other threads:[~2021-03-23 17:18 UTC|newest]

Thread overview: 149+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23 16:52 [PATCH for 6.0 v2 00/22] fixes for rc1 pre-PR (kernel-doc, semihosting, testing) Alex Bennée
2021-03-23 16:52 ` [PATCH v2 01/22] scripts/kernel-doc: strip QEMU_ from function definitions Alex Bennée
2021-03-23 16:52 ` [PATCH v2 02/22] docs/devel: include the plugin API information from the headers Alex Bennée
2021-03-23 16:52 ` [PATCH v2 03/22] docs/devel: expand style section of memory management Alex Bennée
2021-03-23 16:52 ` [PATCH v2 04/22] tools/virtiofsd: include --socket-group in help Alex Bennée
2021-03-23 16:52 ` [PATCH v2 05/22] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-23 16:52 ` [PATCH v2 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-23 16:52 ` [PATCH v2 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Alex Bennée
2021-03-23 16:52   ` [Bug 1915925] " Alex Bennée
2021-03-23 16:52 ` [PATCH v2 08/22] linux-user/riscv: initialise the TaskState heap/stack info Alex Bennée
2021-03-23 21:29   ` Alistair Francis
2021-03-23 16:52 ` [PATCH v2 09/22] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-24  6:11   ` Thomas Huth
2021-03-24 14:09   ` Richard Henderson
2021-03-23 16:52 ` [PATCH v2 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs Alex Bennée
2021-03-23 16:52 ` [PATCH v2 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support Alex Bennée
2021-03-23 16:52 ` [PATCH v2 12/22] cirrus.yml: Update the FreeBSD task to version 12.2 Alex Bennée
2021-03-23 16:52 ` [PATCH v2 13/22] utils: Tighter tests for qemu_strtosz Alex Bennée
2021-03-23 16:53 ` [PATCH v2 14/22] utils: Work around mingw strto*l bug with 0x Alex Bennée
2021-03-23 16:53 ` [PATCH v2 15/22] gitlab: extend timeouts for CFI builds Alex Bennée
2021-03-23 16:53 ` [PATCH v2 16/22] qdev: define list of archs with virtio-pci or virtio-ccw Alex Bennée
2021-03-23 16:53 ` [PATCH v2 17/22] m68k: add the virtio devices aliases Alex Bennée
2021-03-23 16:53 ` [PATCH v2 18/22] blockdev: with -drive if=virtio, use generic virtio-blk Alex Bennée
2021-03-23 16:53 ` [PATCH v2 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182" Alex Bennée
2021-03-23 16:53 ` [PATCH v2 20/22] iotests: test m68k with the virt machine Alex Bennée
2021-03-23 16:53 ` Alex Bennée [this message]
2021-03-23 16:53 ` [PATCH v2 22/22] gitlab: default to not building the documentation Alex Bennée
2021-03-23 18:21 ` [PATCH for 6.0 v2 00/22] fixes for rc1 pre-PR (kernel-doc, semihosting, testing) no-reply
2021-03-24 13:40 ` Peter Maydell
2021-03-24 14:22   ` Alex Bennée
2021-03-24 15:58     ` Peter Maydell
  -- strict thread matches above, loose matches on Subject: below --
2021-03-24 14:29 [PULL for 6.0 00/22] various fixes " Alex Bennée
2021-03-24 14:30 ` [PULL 01/22] scripts/kernel-doc: strip QEMU_ from function definitions Alex Bennée
2021-03-24 14:30 ` [PULL 02/22] docs/devel: include the plugin API information from the headers Alex Bennée
2021-03-24 14:30 ` [PULL 03/22] docs/devel: expand style section of memory management Alex Bennée
2021-03-24 14:30 ` [PULL 04/22] tools/virtiofsd: include --socket-group in help Alex Bennée
2021-03-24 14:30 ` [PULL 05/22] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-24 14:30 ` [PULL 06/22] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-24 14:30 ` [PULL 07/22] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Alex Bennée
2021-03-24 14:30   ` [Bug 1915925] " Alex Bennée
2021-03-24 14:30 ` [PULL 08/22] linux-user/riscv: initialise the TaskState heap/stack info Alex Bennée
2021-03-24 14:30 ` [PULL 09/22] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-24 14:30 ` [PULL 10/22] gitlab-ci.yml: Merge the trace-backend testing into other jobs Alex Bennée
2021-03-24 14:30 ` [PULL 11/22] configure: Don't use the __atomic_*_16 functions for testing 128-bit support Alex Bennée
2021-03-24 14:30 ` [PULL 12/22] cirrus.yml: Update the FreeBSD task to version 12.2 Alex Bennée
2021-03-24 14:30 ` [PULL 13/22] utils: Tighter tests for qemu_strtosz Alex Bennée
2021-03-24 14:30 ` [PULL 14/22] utils: Work around mingw strto*l bug with 0x Alex Bennée
2021-03-24 14:30 ` [PULL 15/22] gitlab: extend timeouts for CFI builds Alex Bennée
2021-03-24 14:30 ` [PULL 16/22] qdev: define list of archs with virtio-pci or virtio-ccw Alex Bennée
2021-03-24 14:30 ` [PULL 17/22] m68k: add the virtio devices aliases Alex Bennée
2021-03-24 14:30 ` [PULL 18/22] blockdev: with -drive if=virtio, use generic virtio-blk Alex Bennée
2021-03-24 14:30 ` [PULL 19/22] iotests: Revert "iotests: use -ccw on s390x for 040, 139, and 182" Alex Bennée
2021-03-24 14:30 ` [PULL 20/22] iotests: test m68k with the virt machine Alex Bennée
2021-03-24 14:30 ` [PULL 21/22] iotests: iothreads need ioeventfd Alex Bennée
2021-03-24 14:30 ` [PULL 22/22] gitlab: default to not building the documentation Alex Bennée
2021-03-24 14:57 ` [PULL for 6.0 00/22] various fixes (kernel-doc, semihosting, testing) no-reply
2021-03-24 17:41 ` Peter Maydell
2021-03-20 13:36 [PATCH for 6.0 v1 00/14] fixes for rc1 " Alex Bennée
2021-03-20 13:36 ` [PATCH v1 01/14] scripts/kernel-doc: strip QEMU_ from function definitions Alex Bennée
2021-03-20 16:04   ` Richard Henderson
2021-03-20 13:36 ` [PATCH v1 02/14] docs/devel: include the plugin API information from the headers Alex Bennée
2021-03-20 13:36 ` [PATCH v1 03/14] docs/devel: expand style section of memory management Alex Bennée
2021-03-20 16:00   ` Richard Henderson
2021-03-20 13:36 ` [PATCH v1 04/14] tools/virtiofsd: include --socket-group in help Alex Bennée
2021-03-22 11:46   ` Stefan Hajnoczi
2021-03-20 13:36 ` [PATCH v1 05/14] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-20 16:03   ` Richard Henderson
2021-03-20 13:36 ` [PATCH v1 06/14] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-20 13:36 ` [PATCH v1 07/14] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Alex Bennée
2021-03-20 13:36   ` [Bug 1915925] " Alex Bennée
2021-03-20 13:37 ` [PATCH v1 08/14] linux-user/riscv: initialise the TaskState heap/stack info Alex Bennée
2021-03-20 16:05   ` Richard Henderson
2021-03-20 13:37 ` [PATCH v1 09/14] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-20 16:11   ` Richard Henderson
2021-03-20 13:37 ` [PATCH v1 10/14] gitlab-ci.yml: Merge the trace-backend testing into other jobs Alex Bennée
2021-03-22 17:03   ` Willian Rampazzo
2021-03-20 13:37 ` [PATCH v1 11/14] configure: Don't use the __atomic_*_16 functions for testing 128-bit support Alex Bennée
2021-03-20 13:37 ` [PATCH v1 12/14] cirrus.yml: Update the FreeBSD task to version 12.2 Alex Bennée
2021-03-20 13:37 ` [PATCH v1 13/14] utils: Tighter tests for qemu_strtosz Alex Bennée
2021-03-20 13:37 ` [PATCH v1 14/14] utils: Work around mingw strto*l bug with 0x Alex Bennée
2021-03-20 13:54 ` [PATCH for 6.0 v1 00/14] fixes for rc1 (kernel-doc, semihosting, testing) no-reply
2021-03-12 10:20 [PATCH v5 0/5] semihosting/next (SYS_HEAPINFO) Alex Bennée
2021-03-12 10:20 ` [PATCH v5 1/5] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-12 10:20 ` [PATCH v5 2/5] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-12 10:20 ` [PATCH v5 3/5] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Alex Bennée
2021-03-12 10:20   ` [Bug 1915925] " Alex Bennée
2021-03-12 10:32   ` Peter Maydell
2021-03-12 10:32     ` [Bug 1915925] " Peter Maydell
2021-03-12 10:20 ` [PATCH v5 4/5] linux-user/riscv: initialise the TaskState heap/stack info Alex Bennée
2021-03-12 10:20 ` [PATCH v5 5/5] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-12 10:35   ` Peter Maydell
2021-03-12 11:23     ` Alex Bennée
2021-03-12 11:27       ` Peter Maydell
2021-03-12 14:08         ` Alex Bennée
2021-03-09 17:21 [PATCH v3 0/4] semihosting/next (SYS_HEAPINFO) Alex Bennée
2021-03-09 17:21 ` [PATCH v3 1/4] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-09 17:21 ` [PATCH v3 2/4] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-09 17:21 ` [PATCH v3 4/4] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-11 13:32 ` [PATCH v3 0/4] semihosting/next (SYS_HEAPINFO) Peter Maydell
2021-03-11 20:05   ` Alex Bennée
2021-03-09 14:17 [PATCH v2 0/4] semihosting/next (SYS_HEAPINFO fix) Alex Bennée
2021-03-09 14:17 ` [PATCH v2 1/4] semihosting: move semihosting tests to multiarch Alex Bennée
2021-03-09 14:17 ` [PATCH v2 2/4] semihosting/arm-compat-semi: unify GET/SET_ARG helpers Alex Bennée
2021-03-09 16:33   ` Peter Maydell
2021-03-09 17:02   ` Keith Packard via
2021-03-09 17:24     ` Alex Bennée
2021-03-09 14:17 ` [PATCH v2 3/4] semihosting/arm-compat-semi: deref parameter register for SYS_HEAPINFO Alex Bennée
2021-03-09 14:17   ` [Bug 1915925] " Alex Bennée
2021-03-09 16:35   ` [Bug 1915925] " Peter Maydell
2021-03-09 16:35     ` Peter Maydell
2021-03-09 17:01     ` Alex Bennée
2021-03-09 17:01       ` [Bug 1915925] " Alex Bennée
2021-03-09 14:17 ` [PATCH v2 4/4] tests/tcg: add HeapInfo checking to semihosting test Alex Bennée
2021-03-09 17:08   ` Keith Packard via
2021-03-05 13:54 [PATCH v1 0/3] semihosting/next (move from hw, heapinfo) Alex Bennée
2021-03-05 13:54 ` [PATCH v1 1/3] semihosting: Move include/hw/semihosting/ -> include/semihosting/ Alex Bennée
2021-03-05 13:54 ` [PATCH v1 2/3] semihosting: Move hw/semihosting/ -> semihosting/ Alex Bennée
2021-03-05 13:54 ` [PATCH v1 3/3] semihosting/arg-compat: fix up handling of SYS_HEAPINFO Alex Bennée
2021-03-05 13:54   ` [Bug 1915925] " Alex Bennée
2021-03-05 14:10   ` Peter Maydell
2021-03-05 14:10     ` [Bug 1915925] " Peter Maydell
2021-03-05 20:22     ` Keith Packard via
2021-03-05 20:22       ` [Bug 1915925] " Keith Packard
2021-03-05 22:54       ` Peter Maydell
2021-03-05 22:54         ` [Bug 1915925] " Peter Maydell
2021-03-05 23:54         ` Keith Packard via
2021-03-05 23:54           ` [Bug 1915925] " Keith Packard
2021-03-06  1:27           ` Richard Henderson
2021-03-06 14:07           ` Peter Maydell
2021-03-06 14:07             ` [Bug 1915925] " Peter Maydell
2021-03-06 16:54             ` Keith Packard via
2021-03-06 16:54               ` [Bug 1915925] " Keith Packard
2021-03-08 10:09               ` Peter Maydell
2021-03-08 10:09                 ` [Bug 1915925] " Peter Maydell
2021-03-08 13:36                 ` Alistair Francis
2021-03-08 17:28                   ` Keith Packard via
2021-03-08 17:28                     ` [Bug 1915925] " Keith Packard
2021-03-05 20:19   ` Keith Packard via
2021-03-05 20:19     ` [Bug 1915925] " Keith Packard
2021-02-17 12:19 [Bug 1915925] [NEW] ARM semihosting HEAPINFO results wrote to wrong address iNvEr7
2021-02-17 14:50 ` [Bug 1915925] " Peter Maydell
2021-02-17 15:03 ` Peter Maydell
2021-02-17 16:13 ` Philippe Mathieu-Daudé
2021-03-05 13:33 ` Alex Bennée
2021-03-09 17:21 ` [Bug 1915925] [PATCH v3 3/4] semihosting/arm-compat-semi: don't use SET_ARG to report SYS_HEAPINFO Alex Bennée
2021-03-09 17:21   ` Alex Bennée
2021-03-15 12:46 ` [Bug 1915925] Re: ARM semihosting HEAPINFO results wrote to wrong address Alex Bennée
2021-03-25 11:47 ` Alex Bennée
2021-04-30  8:54 ` Thomas Huth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210323165308.15244-22-alex.bennee@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).