tests/qtest: s390x: fix operation in a build without any boards or devices
Do the bare minimum to ensure that at least a vanilla --without-default-devices build works for all targets except i386, x86_64 and ppc64. In particular this fixes s390x-softmmu; i386 and x86_64 have about a dozen failing tests that do not pass -M and therefore require a default machine type; ppc64 has the same issue, though only with numa-test. If we can for now ignore the cases where boards and devices are picked by hand, drive_del-test however can be fixed easily; almost all tests check for the virtio-blk or virtio-scsi device that they use, and are already skipped. Only one didn't get the memo; plus another one does not need a machine at all and can be run with -M none. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-ID: <20240509170044.190795-6-pbonzini@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
e799b65fae
commit
fa5365e8b6
@ -173,7 +173,7 @@ static void test_drive_without_dev(void)
|
||||
QTestState *qts;
|
||||
|
||||
/* Start with an empty drive */
|
||||
qts = qtest_init("-drive if=none,id=drive0");
|
||||
qts = qtest_init("-drive if=none,id=drive0 -M none");
|
||||
|
||||
/* Delete the drive */
|
||||
drive_del(qts);
|
||||
@ -192,6 +192,11 @@ static void test_after_failed_device_add(void)
|
||||
QDict *response;
|
||||
QTestState *qts;
|
||||
|
||||
if (!has_device_builtin("virtio-blk")) {
|
||||
g_test_skip("Device virtio-blk is not available");
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(driver, sizeof(driver), "virtio-blk-%s",
|
||||
qvirtio_get_dev_type());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user