tests/qtest/drive_del-test: skip pc tests when 'pc' machine is unavailable
test_cli_device_del(), test_device_add_and_del(),
test_drive_add_device_add_and_del() and
test_blockdev_add_device_add_and_del() use "-machine pc" on i386/x86_64.
When QEMU is built without the i440fx/pc machine, these fail with
"unsupported machine type 'pc'".
Skip the x86 case when 'pc' is not available. Non-x86 architectures use
the default machine and are unaffected, and the corresponding _q35
variants already cover x86 under qtest_has_machine("q35").
Signed-off-by: Rohitashv Kumar <roohiit@amazon.de>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
This commit is contained in:
1 parent
6500a6abe6
commit
4e37f749dd
1 file changed
+16
@@ -258,6 +258,10 @@ static void test_cli_device_del(void)
|
||||
}
|
||||
|
||||
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
|
||||
if (!qtest_has_machine("pc")) {
|
||||
g_test_skip("Machine 'pc' is not available");
|
||||
return;
|
||||
}
|
||||
machine_addition = "-machine pc";
|
||||
}
|
||||
|
||||
@@ -332,6 +336,10 @@ static void test_device_add_and_del(void)
|
||||
}
|
||||
|
||||
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
|
||||
if (!qtest_has_machine("pc")) {
|
||||
g_test_skip("Machine 'pc' is not available");
|
||||
return;
|
||||
}
|
||||
machine_addition = "-machine pc";
|
||||
}
|
||||
|
||||
@@ -403,6 +411,10 @@ static void test_drive_add_device_add_and_del(void)
|
||||
}
|
||||
|
||||
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
|
||||
if (!qtest_has_machine("pc")) {
|
||||
g_test_skip("Machine 'pc' is not available");
|
||||
return;
|
||||
}
|
||||
machine_addition = "-machine pc";
|
||||
}
|
||||
|
||||
@@ -456,6 +468,10 @@ static void test_blockdev_add_device_add_and_del(void)
|
||||
}
|
||||
|
||||
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
|
||||
if (!qtest_has_machine("pc")) {
|
||||
g_test_skip("Machine 'pc' is not available");
|
||||
return;
|
||||
}
|
||||
machine_addition = "-machine pc";
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user