qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
@ 2024-02-05  2:13 Bibo Mao
  2024-02-05  7:47 ` Thomas Huth
  2024-02-05 12:58 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 8+ messages in thread
From: Bibo Mao @ 2024-02-05  2:13 UTC (permalink / raw)
  To: Thomas Huth, Laurent Vivier; +Cc: Paolo Bonzini, qemu-block, qemu-devel

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);
     } else {
         const char *nonemachine[] = { "none", NULL };
         add_cdrom_param_tests(nonemachine);
-- 
2.39.3



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-05  2:13 [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine Bibo Mao
@ 2024-02-05  7:47 ` Thomas Huth
  2024-02-05  8:13   ` maobibo
  2024-02-06  2:32   ` maobibo
  2024-02-05 12:58 ` Philippe Mathieu-Daudé
  1 sibling, 2 replies; 8+ messages in thread
From: Thomas Huth @ 2024-02-05  7:47 UTC (permalink / raw)
  To: Bibo Mao, Laurent Vivier; +Cc: Paolo Bonzini, qemu-block, qemu-devel

On 05/02/2024 03.13, Bibo Mao wrote:
> The cdrom test skips to execute on LoongArch system with command
> "make check"

Are you sure the test is marked with "skip"? ... it should at least test 
with the "none" machine...?

> 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);
>       } else {
>           const char *nonemachine[] = { "none", NULL };
>           add_cdrom_param_tests(nonemachine);

Anyway, using the virt machine is certainly better than the "none" machine, so:
Acked-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-05  7:47 ` Thomas Huth
@ 2024-02-05  8:13   ` maobibo
  2024-02-06  2:32   ` maobibo
  1 sibling, 0 replies; 8+ messages in thread
From: maobibo @ 2024-02-05  8:13 UTC (permalink / raw)
  To: Thomas Huth, Laurent Vivier; +Cc: Paolo Bonzini, qemu-block, qemu-devel



On 2024/2/5 下午3:47, Thomas Huth wrote:
> On 05/02/2024 03.13, Bibo Mao wrote:
>> The cdrom test skips to execute on LoongArch system with command
>> "make check"
> 
> Are you sure the test is marked with "skip"? ... it should at least test 
> with the "none" machine...?
With the latest code, cdrom testcase passes to run. It is strange that 
about two weeks ago, the result displays SKIP, so I post this patch -:)

Regards
Bibo Mao

> 
>> 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);
>>       } else {
>>           const char *nonemachine[] = { "none", NULL };
>>           add_cdrom_param_tests(nonemachine);
> 
> Anyway, using the virt machine is certainly better than the "none" 
> machine, so:
> Acked-by: Thomas Huth <thuth@redhat.com>



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-05  2:13 [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine Bibo Mao
  2024-02-05  7:47 ` Thomas Huth
@ 2024-02-05 12:58 ` Philippe Mathieu-Daudé
  2024-02-06  2:29   ` maobibo
  1 sibling, 1 reply; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-02-05 12:58 UTC (permalink / raw)
  To: Bibo Mao, Thomas Huth, Laurent Vivier
  Cc: Paolo Bonzini, qemu-block, qemu-devel

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?



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-05 12:58 ` Philippe Mathieu-Daudé
@ 2024-02-06  2:29   ` maobibo
  2024-02-06  9:20     ` Thomas Huth
  0 siblings, 1 reply; 8+ messages in thread
From: maobibo @ 2024-02-06  2:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, Thomas Huth, Laurent Vivier
  Cc: Paolo Bonzini, qemu-block, qemu-devel

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

Regards
Bibo Mao



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-05  7:47 ` Thomas Huth
  2024-02-05  8:13   ` maobibo
@ 2024-02-06  2:32   ` maobibo
  1 sibling, 0 replies; 8+ messages in thread
From: maobibo @ 2024-02-06  2:32 UTC (permalink / raw)
  To: Thomas Huth, Laurent Vivier; +Cc: Paolo Bonzini, qemu-block, qemu-devel

Hi Thomas,

On 2024/2/5 下午3:47, Thomas Huth wrote:
> On 05/02/2024 03.13, Bibo Mao wrote:
>> The cdrom test skips to execute on LoongArch system with command
>> "make check"
> 
> Are you sure the test is marked with "skip"? ... it should at least test 
> with the "none" machine...?
>
I check again, cdrom test case passes to run with "none" machine. And 
the root cause is that xorriso rpm package is missing so it is skipped.

Regards
Bibo Mao

>> 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);
>>       } else {
>>           const char *nonemachine[] = { "none", NULL };
>>           add_cdrom_param_tests(nonemachine);
> 
> Anyway, using the virt machine is certainly better than the "none" 
> machine, so:
> Acked-by: Thomas Huth <thuth@redhat.com>
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-06  2:29   ` maobibo
@ 2024-02-06  9:20     ` Thomas Huth
  2024-02-17  3:51       ` maobibo
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Huth @ 2024-02-06  9:20 UTC (permalink / raw)
  To: maobibo, Philippe Mathieu-Daudé, Laurent Vivier
  Cc: Paolo Bonzini, qemu-block, qemu-devel

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine
  2024-02-06  9:20     ` Thomas Huth
@ 2024-02-17  3:51       ` maobibo
  0 siblings, 0 replies; 8+ messages in thread
From: maobibo @ 2024-02-17  3:51 UTC (permalink / raw)
  To: Thomas Huth, Philippe Mathieu-Daudé, Laurent Vivier
  Cc: Paolo Bonzini, qemu-block, qemu-devel



On 2024/2/6 下午5:20, Thomas Huth wrote:
> 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.
Sorry for the late response. Yes cdrom test case will report failure 
with it is compiled with --without-default-devices option.

I will refresh the patch like arm case.

Regards
Bibo Mao
> 
>   Thomas
> 



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-17  3:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05  2:13 [PATCH] tests/cdrom-test: Add cdrom test for LoongArch virt machine Bibo Mao
2024-02-05  7:47 ` Thomas Huth
2024-02-05  8:13   ` maobibo
2024-02-06  2:32   ` maobibo
2024-02-05 12:58 ` Philippe Mathieu-Daudé
2024-02-06  2:29   ` maobibo
2024-02-06  9:20     ` Thomas Huth
2024-02-17  3:51       ` maobibo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).