[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how do the iotests pick a machine model to run on ?
From: |
Peter Maydell |
Subject: |
Re: how do the iotests pick a machine model to run on ? |
Date: |
Fri, 19 Jan 2024 15:26:58 +0000 |
On Fri, 19 Jan 2024 at 14:07, Kevin Wolf <kwolf@redhat.com> wrote:
>
> Am 19.01.2024 um 13:55 hat Peter Maydell geschrieben:
> > 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.
Thanks. Unfortunately your suggested fix doesn't work.
Looking at the definition of verify_virtio_scsi_pci_or_ccw():
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')
this doesn't look to me like it's testing the right thing.
You want to know "will one of these devices work on the
machine type I am going to run", not "is this built in to
the binary at all". The -device help output for qemu-system-sh4
does include virtio-scsi-pci because there is a different
non-default machine type that has PCI; but the machine the
040 test actually runs doesn't have PCI.
(Also, we should probably put an entry for sh4 in machine_map,
because the default board type (shix) is about to be deprecated,
and the r2d board type is thus a better choice.)
-- PMM