diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-09 19:00:36 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-10 15:45:15 +0200 |
commit | fa5365e8b6eff888e99f31cd65afefd3643e5d0e (patch) | |
tree | 1165ee0b97b1a68e56ef81690f4d2e78c2eba8a8 | |
parent | e799b65faef129f2905bd9bf66c30aaaa7115dac (diff) | |
download | qemu-fa5365e8b6eff888e99f31cd65afefd3643e5d0e.zip qemu-fa5365e8b6eff888e99f31cd65afefd3643e5d0e.tar.gz qemu-fa5365e8b6eff888e99f31cd65afefd3643e5d0e.tar.bz2 |
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>
-rw-r--r-- | tests/qtest/drive_del-test.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 8a6f3ac..7b67a4b 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c @@ -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()); |