From: Kevin Wolf <kwolf@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: QEMU Developers <qemu-devel@nongnu.org>,
Hanna Reitz <hreitz@redhat.com>,
Qemu-block <qemu-block@nongnu.org>
Subject: Re: how do the iotests pick a machine model to run on ?
Date: Fri, 19 Jan 2024 15:06:59 +0100 [thread overview]
Message-ID: <ZaqCA5uYWFSgK6F-@redhat.com> (raw)
In-Reply-To: <CAFEAcA_7s=scvgYfG8kGmJ==5cKmvvA-ZqVkpt4M9jV6eS1Zow@mail.gmail.com>
Am 19.01.2024 um 13:55 hat Peter Maydell geschrieben:
> If you build QEMU with support for the sh4 target only
> (configure --target-list=sh4-softmmu) then 'make check' fails
> in the iotests, because some iotests, including for instance 040,
> try to create a machine with a virtio-scsi device, but they don't
> do anything to ensure that the machine they create actually
> has a PCI bus to plug the virtio-scsi device into, and so the test
> fails:
>
> +Traceback (most recent call last):
> + File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/tests/qemu-iotests/040",
> line 94, in setUp
> + self.vm.launch()
> + File "/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/python/qemu/machine/machine.py",
> line 455, in launch
> + raise VMLaunchFailure(
> +qemu.machine.machine.VMLaunchFailure: ConnectError: Failed to
> establish session: EOFError
> + Exit code: 1
> + Command:
> /mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/sh4/qemu-system-sh4
> -display none -vga none -chardev socket,id=mon,fd=5 -mon
> chardev=mon,mode=control -chardev socket,id=qtest,fd=3 -qtest
> chardev:qtest -accel qtest -nodefaults -display none -accel qtest
> -drive if=none,id=drive0,file=/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/sh4/scratch/qcow2-file-040/test.img,format=qcow2,cache=writeback,aio=threads,node-name=top,backing.node-name=mid,backing.backing.node-name=base
> -device virtio-scsi -device scsi-hd,id=scsi0,drive=drive0
> + Output: [I 0.000000] OPENED
> +qemu-system-sh4: -device virtio-scsi: No 'PCI' bus found for device
> 'virtio-scsi-pci'
>
> (It happens that the default machine type for 'sh4'
> does not have a PCI bus.)
>
> How are the iotests supposed to select a machine model to run
> on, and how are they intended to mark themselves as requiring
> particular facilities, like PCI? Presumably some of the tests
> are missing the appropriate annotations to ensure they're
> skipped when the facilities required aren't present.
Probably next to nobody builds only sh4 and then runs 'make check'...
I think the following patch should fix this test case (but as nobody
ever tested it, I fully expect other cases to fail, too). The fix could
of course be a lot more fine grained and skip only some individual tests
instead of all of them. I doubt we care, though, as long as it passes.
iotests use machine_map in tests/qemu-iotests/testenv.py to decide which
machine to use for which target (unless the individual test case
overrides that). If the target isn't the list, it gets the default
machine type.
Kevin
diff --git a/tests/qemu-iotests/040 b/tests/qemu-iotests/040
index 5c18e413ec..19f0bb1010 100755
--- a/tests/qemu-iotests/040
+++ b/tests/qemu-iotests/040
@@ -952,5 +952,6 @@ class TestCommitWithOverriddenBacking(iotests.QMPTestCase):
self.vm.event_wait('BLOCK_JOB_COMPLETED')
if __name__ == '__main__':
+ iotests.verify_virtio_scsi_pci_or_ccw()
iotests.main(supported_fmts=['qcow2', 'qed'],
supported_protocols=['file'])
next prev parent reply other threads:[~2024-01-19 14:07 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-19 12:55 how do the iotests pick a machine model to run on ? Peter Maydell
2024-01-19 14:06 ` Kevin Wolf [this message]
2024-01-19 15:26 ` Peter Maydell
2024-01-19 16:18 ` Peter Maydell
2024-03-25 17:05 ` 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=ZaqCA5uYWFSgK6F-@redhat.com \
--to=kwolf@redhat.com \
--cc=hreitz@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.