tests/qtest/virtio-ccw: Fix device presence checking

An apparent copy-paste error tests for the presence of the
virtio-rng-ccw device in order to perform tests on the virtio-scsi-ccw
device.

Signed-off-by: Samuel Tardieu <sam@rfc1149.net>
Message-ID: <20240106130121.1244993-1-sam@rfc1149.net>
Fixes: 65331bf5d1 ("tests/qtest: Check for virtio-ccw devices before  using them")
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
(cherry picked from commit c98873ee4a)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
Samuel Tardieu 2024-01-06 14:01:21 +01:00 committed by Michael Tokarev
parent 2dd8fdfe49
commit 0b27f20d6a

View File

@ -85,7 +85,7 @@ int main(int argc, char **argv)
if (qtest_has_device("virtio-rng-ccw")) { if (qtest_has_device("virtio-rng-ccw")) {
qtest_add_func("/virtio/rng/nop", virtio_rng_nop); qtest_add_func("/virtio/rng/nop", virtio_rng_nop);
} }
if (qtest_has_device("virtio-rng-ccw")) { if (qtest_has_device("virtio-scsi-ccw")) {
qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop); qtest_add_func("/virtio/scsi/nop", virtio_scsi_nop);
qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug); qtest_add_func("/virtio/scsi/hotplug", virtio_scsi_hotplug);
} }