qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Thomas Huth
Subject: Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
Date: Tue, 6 Feb 2024 10:20:00 +0100
User-agent: Mozilla Thunderbird

On 06/02/2024 03.29, maobibo wrote:
Hi Philippe,

On 2024/2/5 下午8:58, Philippe Mathieu-Daudé wrote:
Hi Bibo,

On 5/2/24 03:13, 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>
---
  tests/qtest/cdrom-test.c | 3 +++
  1 file changed, 3 insertions(+)

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

What is the default device used, virtio-blk-pci?

yes, it is. For virt machine type, the default type for block device is
virtio interface, and it is defined at function loongarch_class_init().
    mc->block_default_type = IF_VIRTIO

Ok, then you might need to check whether your patch still works when you run "configure" with "--without-default-devices". You might need to check with 'if (qtest_has_device("virtio-blk-pci"))' whether the device is really available in the binary, like it is done some lines earlier in the arm case.

 Thomas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]