[PATCH v2] tests/cdrom-test: Add cdrom test for LoongArch virt machine

Bibo Mao posted 1 patch 8 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240217100230.134042-1-maobibo@loongson.cn
Maintainers: John Snow <jsnow@redhat.com>, Thomas Huth <thuth@redhat.com>, Laurent Vivier <lvivier@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/cdrom-test.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH v2] tests/cdrom-test: Add cdrom test for LoongArch virt machine
Posted by Bibo Mao 8 months, 2 weeks ago
The cdrom test skips to execute on LoongArch system with command
"make check", this patch enables cdrom test for LoongArch virt
machine platform.

With this patch, cdrom test passes to run on LoongArch virt
machine type.

Signed-off-by: Bibo Mao <maobibo@loongson.cn>
---
Add virtio-blk-pci checking since LoongArch virt machine type does
not support ISA bus and IDE harddisk.

---
 tests/qtest/cdrom-test.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
index 0945383789..5d89e62515 100644
--- a/tests/qtest/cdrom-test.c
+++ b/tests/qtest/cdrom-test.c
@@ -271,6 +271,11 @@ int main(int argc, char **argv)
             const char *virtmachine[] = { "virt", NULL };
             add_cdrom_param_tests(virtmachine);
         }
+    } else if (g_str_equal(arch, "loongarch64")) {
+        if (qtest_has_device("virtio-blk-pci")) {
+            const char *virtmachine[] = { "virt", NULL };
+            add_cdrom_param_tests(virtmachine);
+        }
     } else {
         const char *nonemachine[] = { "none", NULL };
         add_cdrom_param_tests(nonemachine);

base-commit: 5767815218efd3cbfd409505ed824d5f356044ae
-- 
2.39.3
Re: [PATCH v2] tests/cdrom-test: Add cdrom test for LoongArch virt machine
Posted by Thomas Huth 8 months, 2 weeks ago
On 17/02/2024 11.02, Bibo Mao wrote:
> The cdrom test skips to execute on LoongArch system with command
> "make check", this patch enables cdrom test for LoongArch virt
> machine platform.
> 
> With this patch, cdrom test passes to run on LoongArch virt
> machine type.
> 
> Signed-off-by: Bibo Mao <maobibo@loongson.cn>
> ---
> Add virtio-blk-pci checking since LoongArch virt machine type does
> not support ISA bus and IDE harddisk.
> 
> ---
>   tests/qtest/cdrom-test.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/tests/qtest/cdrom-test.c b/tests/qtest/cdrom-test.c
> index 0945383789..5d89e62515 100644
> --- a/tests/qtest/cdrom-test.c
> +++ b/tests/qtest/cdrom-test.c
> @@ -271,6 +271,11 @@ int main(int argc, char **argv)
>               const char *virtmachine[] = { "virt", NULL };
>               add_cdrom_param_tests(virtmachine);
>           }
> +    } else if (g_str_equal(arch, "loongarch64")) {
> +        if (qtest_has_device("virtio-blk-pci")) {
> +            const char *virtmachine[] = { "virt", NULL };
> +            add_cdrom_param_tests(virtmachine);
> +        }
>       } else {
>           const char *nonemachine[] = { "none", NULL };
>           add_cdrom_param_tests(nonemachine);
> 
> base-commit: 5767815218efd3cbfd409505ed824d5f356044ae

Reviewed-by: Thomas Huth <thuth@redhat.com>