mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-01 06:21:52 -06:00
tests/qtest/cdrom-test: Improve the machine detection in the cdrom test
When configuring QEMU with the --without-default-devices switch, these tests are currently failing since they assume that the "pc" and "q35" machines are always available. Add some proper checks to make the test work without these machines, too. Message-ID: <20240905191434.694440-3-thuth@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
ea9cdbcf3a
commit
d822b883d7
1 changed files with 42 additions and 35 deletions
|
@ -135,6 +135,7 @@ static void add_x86_tests(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (qtest_has_machine("pc")) {
|
||||
qtest_add_data_func("cdrom/boot/default", "-cdrom ", test_cdboot);
|
||||
if (qtest_has_device("virtio-scsi-ccw")) {
|
||||
qtest_add_data_func("cdrom/boot/virtio-scsi",
|
||||
|
@ -142,14 +143,7 @@ static void add_x86_tests(void)
|
|||
"-blockdev file,node-name=cdr,filename=",
|
||||
test_cdboot);
|
||||
}
|
||||
/*
|
||||
* Unstable CI test under load
|
||||
* See https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05509.html
|
||||
*/
|
||||
if (g_test_slow() && qtest_has_machine("isapc")) {
|
||||
qtest_add_data_func("cdrom/boot/isapc", "-M isapc "
|
||||
"-drive if=ide,media=cdrom,file=", test_cdboot);
|
||||
}
|
||||
|
||||
if (qtest_has_device("am53c974")) {
|
||||
qtest_add_data_func("cdrom/boot/am53c974",
|
||||
"-device am53c974 -device scsi-cd,drive=cd1 "
|
||||
|
@ -168,6 +162,18 @@ static void add_x86_tests(void)
|
|||
"-blockdev file,node-name=cd1,filename=",
|
||||
test_cdboot);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Unstable CI test under load
|
||||
* See https://lists.gnu.org/archive/html/qemu-devel/2019-02/msg05509.html
|
||||
*/
|
||||
if (g_test_slow() && qtest_has_machine("isapc")) {
|
||||
qtest_add_data_func("cdrom/boot/isapc", "-M isapc "
|
||||
"-drive if=ide,media=cdrom,file=", test_cdboot);
|
||||
}
|
||||
|
||||
if (qtest_has_machine("q35")) {
|
||||
if (qtest_has_device("megasas")) {
|
||||
qtest_add_data_func("cdrom/boot/megasas", "-M q35 "
|
||||
"-device megasas -device scsi-cd,drive=cd1 "
|
||||
|
@ -180,6 +186,7 @@ static void add_x86_tests(void)
|
|||
"-blockdev file,node-name=cd1,filename=",
|
||||
test_cdboot);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void add_s390x_tests(void)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue