All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
@ 2020-09-29 22:48 Philippe Mathieu-Daudé
  2020-09-30 13:24 ` Willian Rampazzo
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-09-29 22:48 UTC (permalink / raw)
  To: qemu-devel
  Cc: Willian Rampazzo, qemu-arm, Philippe Mathieu-Daudé,
	Wainer dos Santos Moschetta, Cleber Rosa

The current 'virt_kvm' test is restricted to GICv2, but can also
work with a GICv3. Duplicate it but add a GICv3 test which can be
tested on some hardware.

Noticed while running:

 $ avocado --show=app run -t machine:virt tests/acceptance/
 ...
 (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)

The job.log content is:

  L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'

With this patch:

 $ avocado --show=app run -t device:gicv3 tests/acceptance/
 (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3: PASS (55.10 s)

Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/acceptance/boot_linux.py | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
index 0055dc7cee..c743e231f4 100644
--- a/tests/acceptance/boot_linux.py
+++ b/tests/acceptance/boot_linux.py
@@ -182,10 +182,11 @@ def test_virt_tcg(self):
         self.add_common_args()
         self.launch_and_wait()
 
-    def test_virt_kvm(self):
+    def test_virt_kvm_gicv2(self):
         """
         :avocado: tags=accel:kvm
         :avocado: tags=cpu:host
+        :avocado: tags=device:gicv2
         """
         if not kvm_available(self.arch, self.qemu_bin):
             self.cancel(KVM_NOT_AVAILABLE)
@@ -195,6 +196,20 @@ def test_virt_kvm(self):
         self.add_common_args()
         self.launch_and_wait()
 
+    def test_virt_kvm_gicv3(self):
+        """
+        :avocado: tags=accel:kvm
+        :avocado: tags=cpu:host
+        :avocado: tags=device:gicv3
+        """
+        if not kvm_available(self.arch, self.qemu_bin):
+            self.cancel(KVM_NOT_AVAILABLE)
+        self.vm.add_args("-accel", "kvm")
+        self.vm.add_args("-cpu", "host")
+        self.vm.add_args("-machine", "virt,gic-version=3")
+        self.add_common_args()
+        self.launch_and_wait()
+
 
 class BootLinuxPPC64(BootLinux):
     """
-- 
2.26.2



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2020-09-29 22:48 [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3 Philippe Mathieu-Daudé
@ 2020-09-30 13:24 ` Willian Rampazzo
  2020-10-05  8:08 ` Philippe Mathieu-Daudé
  2021-03-31 15:45 ` Alex Bennée
  2 siblings, 0 replies; 10+ messages in thread
From: Willian Rampazzo @ 2020-09-30 13:24 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa

On Tue, Sep 29, 2020 at 7:49 PM Philippe Mathieu-Daudé
<philmd@redhat.com> wrote:
>
> The current 'virt_kvm' test is restricted to GICv2, but can also
> work with a GICv3. Duplicate it but add a GICv3 test which can be
> tested on some hardware.

Fair enough! :)

>
> Noticed while running:
>
>  $ avocado --show=app run -t machine:virt tests/acceptance/
>  ...
>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>
> The job.log content is:
>
>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>
> With this patch:
>
>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3: PASS (55.10 s)
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/boot_linux.py | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
> index 0055dc7cee..c743e231f4 100644
> --- a/tests/acceptance/boot_linux.py
> +++ b/tests/acceptance/boot_linux.py
> @@ -182,10 +182,11 @@ def test_virt_tcg(self):
>          self.add_common_args()
>          self.launch_and_wait()
>
> -    def test_virt_kvm(self):
> +    def test_virt_kvm_gicv2(self):
>          """
>          :avocado: tags=accel:kvm
>          :avocado: tags=cpu:host
> +        :avocado: tags=device:gicv2
>          """
>          if not kvm_available(self.arch, self.qemu_bin):
>              self.cancel(KVM_NOT_AVAILABLE)
> @@ -195,6 +196,20 @@ def test_virt_kvm(self):
>          self.add_common_args()
>          self.launch_and_wait()
>
> +    def test_virt_kvm_gicv3(self):
> +        """
> +        :avocado: tags=accel:kvm
> +        :avocado: tags=cpu:host
> +        :avocado: tags=device:gicv3
> +        """
> +        if not kvm_available(self.arch, self.qemu_bin):
> +            self.cancel(KVM_NOT_AVAILABLE)
> +        self.vm.add_args("-accel", "kvm")
> +        self.vm.add_args("-cpu", "host")
> +        self.vm.add_args("-machine", "virt,gic-version=3")
> +        self.add_common_args()
> +        self.launch_and_wait()
> +
>
>  class BootLinuxPPC64(BootLinux):
>      """
> --
> 2.26.2
>

Reviewed-by: Willian Rampazzo <willianr@redhat.com>



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2020-09-29 22:48 [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3 Philippe Mathieu-Daudé
  2020-09-30 13:24 ` Willian Rampazzo
@ 2020-10-05  8:08 ` Philippe Mathieu-Daudé
  2021-03-31 15:45 ` Alex Bennée
  2 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2020-10-05  8:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Willian Rampazzo, qemu-arm, Wainer dos Santos Moschetta, Cleber Rosa

On 9/30/20 12:48 AM, Philippe Mathieu-Daudé wrote:
> The current 'virt_kvm' test is restricted to GICv2, but can also
> work with a GICv3. Duplicate it but add a GICv3 test which can be
> tested on some hardware.
> 
> Noticed while running:
> 
>  $ avocado --show=app run -t machine:virt tests/acceptance/
>  ...
>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
> 
> The job.log content is:
> 
>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
> 
> With this patch:
> 
>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3: PASS (55.10 s)
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/boot_linux.py | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)

Thanks, applied to my acceptance-testing tree.



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2020-09-29 22:48 [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3 Philippe Mathieu-Daudé
  2020-09-30 13:24 ` Willian Rampazzo
  2020-10-05  8:08 ` Philippe Mathieu-Daudé
@ 2021-03-31 15:45 ` Alex Bennée
  2021-04-06 15:22   ` Philippe Mathieu-Daudé
  2 siblings, 1 reply; 10+ messages in thread
From: Alex Bennée @ 2021-03-31 15:45 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> The current 'virt_kvm' test is restricted to GICv2, but can also
> work with a GICv3. Duplicate it but add a GICv3 test which can be
> tested on some hardware.
>
> Noticed while running:
>
>  $ avocado --show=app run -t machine:virt tests/acceptance/
>  ...
>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>
> The job.log content is:
>
>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>
> With this patch:
>
>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>  (1/1)
>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>  PASS (55.10 s)

On the new aarch64 machine which is GICv3 I get the following:

 (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)

which it shouldn't have run. However:

  ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
  Test Suite could not be create. No test references provided nor any other arguments resolved into tests

Is this something that has regressed or am I doing it wrong?

>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/boot_linux.py | 17 ++++++++++++++++-
>  1 file changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
> index 0055dc7cee..c743e231f4 100644
> --- a/tests/acceptance/boot_linux.py
> +++ b/tests/acceptance/boot_linux.py
> @@ -182,10 +182,11 @@ def test_virt_tcg(self):
>          self.add_common_args()
>          self.launch_and_wait()
>  
> -    def test_virt_kvm(self):
> +    def test_virt_kvm_gicv2(self):
>          """
>          :avocado: tags=accel:kvm
>          :avocado: tags=cpu:host
> +        :avocado: tags=device:gicv2
>          """
>          if not kvm_available(self.arch, self.qemu_bin):
>              self.cancel(KVM_NOT_AVAILABLE)
> @@ -195,6 +196,20 @@ def test_virt_kvm(self):
>          self.add_common_args()
>          self.launch_and_wait()
>  
> +    def test_virt_kvm_gicv3(self):
> +        """
> +        :avocado: tags=accel:kvm
> +        :avocado: tags=cpu:host
> +        :avocado: tags=device:gicv3
> +        """
> +        if not kvm_available(self.arch, self.qemu_bin):
> +            self.cancel(KVM_NOT_AVAILABLE)
> +        self.vm.add_args("-accel", "kvm")
> +        self.vm.add_args("-cpu", "host")
> +        self.vm.add_args("-machine", "virt,gic-version=3")
> +        self.add_common_args()
> +        self.launch_and_wait()
> +
>  
>  class BootLinuxPPC64(BootLinux):
>      """


-- 
Alex Bennée


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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-03-31 15:45 ` Alex Bennée
@ 2021-04-06 15:22   ` Philippe Mathieu-Daudé
  2021-04-06 17:12     ` Alex Bennée
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-06 15:22 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa

On 3/31/21 5:45 PM, Alex Bennée wrote:
> 
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> The current 'virt_kvm' test is restricted to GICv2, but can also
>> work with a GICv3. Duplicate it but add a GICv3 test which can be
>> tested on some hardware.
>>
>> Noticed while running:
>>
>>  $ avocado --show=app run -t machine:virt tests/acceptance/
>>  ...
>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>>
>> The job.log content is:
>>
>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>>
>> With this patch:
>>
>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>>  (1/1)
>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>>  PASS (55.10 s)
> 
> On the new aarch64 machine which is GICv3 I get the following:
> 
>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
> 
> which it shouldn't have run. However:
> 
>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
> 
> Is this something that has regressed or am I doing it wrong?

Typo in the tag: "device:gic3" -> "device:gicv3"

>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>>  tests/acceptance/boot_linux.py | 17 ++++++++++++++++-
>>  1 file changed, 16 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
>> index 0055dc7cee..c743e231f4 100644
>> --- a/tests/acceptance/boot_linux.py
>> +++ b/tests/acceptance/boot_linux.py
>> @@ -182,10 +182,11 @@ def test_virt_tcg(self):
>>          self.add_common_args()
>>          self.launch_and_wait()
>>  
>> -    def test_virt_kvm(self):
>> +    def test_virt_kvm_gicv2(self):
>>          """
>>          :avocado: tags=accel:kvm
>>          :avocado: tags=cpu:host
>> +        :avocado: tags=device:gicv2
>>          """
>>          if not kvm_available(self.arch, self.qemu_bin):
>>              self.cancel(KVM_NOT_AVAILABLE)
>> @@ -195,6 +196,20 @@ def test_virt_kvm(self):
>>          self.add_common_args()
>>          self.launch_and_wait()
>>  
>> +    def test_virt_kvm_gicv3(self):
>> +        """
>> +        :avocado: tags=accel:kvm
>> +        :avocado: tags=cpu:host
>> +        :avocado: tags=device:gicv3
>> +        """
>> +        if not kvm_available(self.arch, self.qemu_bin):
>> +            self.cancel(KVM_NOT_AVAILABLE)
>> +        self.vm.add_args("-accel", "kvm")
>> +        self.vm.add_args("-cpu", "host")
>> +        self.vm.add_args("-machine", "virt,gic-version=3")
>> +        self.add_common_args()
>> +        self.launch_and_wait()
>> +
>>  
>>  class BootLinuxPPC64(BootLinux):
>>      """
> 
> 



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-04-06 15:22   ` Philippe Mathieu-Daudé
@ 2021-04-06 17:12     ` Alex Bennée
  2021-04-12 17:55       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 10+ messages in thread
From: Alex Bennée @ 2021-04-06 17:12 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> On 3/31/21 5:45 PM, Alex Bennée wrote:
>> 
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>> 
>>> The current 'virt_kvm' test is restricted to GICv2, but can also
>>> work with a GICv3. Duplicate it but add a GICv3 test which can be
>>> tested on some hardware.
>>>
>>> Noticed while running:
>>>
>>>  $ avocado --show=app run -t machine:virt tests/acceptance/
>>>  ...
>>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>>>
>>> The job.log content is:
>>>
>>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>>>
>>> With this patch:
>>>
>>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>>>  (1/1)
>>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>>>  PASS (55.10 s)
>> 
>> On the new aarch64 machine which is GICv3 I get the following:
>> 
>>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
>> 
>> which it shouldn't have run. However:
>> 
>>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
>>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
>> 
>> Is this something that has regressed or am I doing it wrong?
>
> Typo in the tag: "device:gic3" -> "device:gicv3"

Doh!

But what about:

/tests/venv/bin/avocado run tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2
JOB ID     : 396696d8f9d31d970878cb46025b2ced76f3623f
JOB LOG    : /home/alex/avocado/job-results/job-2021-04-06T17.11-396696d/job.log
 (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.65 s)
RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
JOB TIME   : 0.96 s

why doesn't that skip?

-- 
Alex Bennée


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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-04-06 17:12     ` Alex Bennée
@ 2021-04-12 17:55       ` Philippe Mathieu-Daudé
  2021-04-13 16:25         ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-12 17:55 UTC (permalink / raw)
  To: Alex Bennée
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa

On 4/6/21 7:12 PM, Alex Bennée wrote:
> 
> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> 
>> On 3/31/21 5:45 PM, Alex Bennée wrote:
>>>
>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>
>>>> The current 'virt_kvm' test is restricted to GICv2, but can also
>>>> work with a GICv3. Duplicate it but add a GICv3 test which can be
>>>> tested on some hardware.
>>>>
>>>> Noticed while running:
>>>>
>>>>  $ avocado --show=app run -t machine:virt tests/acceptance/
>>>>  ...
>>>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>>>>
>>>> The job.log content is:
>>>>
>>>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>>>>
>>>> With this patch:
>>>>
>>>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>>>>  (1/1)
>>>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>>>>  PASS (55.10 s)
>>>
>>> On the new aarch64 machine which is GICv3 I get the following:
>>>
>>>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
>>>
>>> which it shouldn't have run. However:
>>>
>>>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
>>>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
>>>
>>> Is this something that has regressed or am I doing it wrong?
>>
>> Typo in the tag: "device:gic3" -> "device:gicv3"
> 
> Doh!
> 
> But what about:
> 
> /tests/venv/bin/avocado run tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2
> JOB ID     : 396696d8f9d31d970878cb46025b2ced76f3623f
> JOB LOG    : /home/alex/avocado/job-results/job-2021-04-06T17.11-396696d/job.log
>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.65 s)
> RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
> JOB TIME   : 0.96 s
> 
> why doesn't that skip?

/home/phil/avocado/job-results/job-2021-04-12T17.51-efdca81/job.log
2021-04-12 17:52:44,589 machine          L0389 DEBUG| Output:
"qemu-system-aarch64: Could not find ROM image
'/home/phil/qemu/build/host/pc-bios/edk2-aarch64-code.fd'\n"

Missing prerequisite:

$ ninja pc-bios/edk2-aarch64-code.fd
[1/1] Generating edk2-aarch64-code.fd with a custom command (wrapped by
meson to capture output)

Then we are good:

$ avocado --show=app,console run -t device:gicv3 tests/acceptance
JOB ID     : e84401e5cc3ae53a3094c79491e661385cc7b4a7
JOB LOG    :
/home/phil/avocado/job-results/job-2021-04-12T17.53-e84401e/job.log
 (1/1)
tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
PASS (16.38 s)
RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
CANCEL 0
JOB TIME   : 16.70 s

Probably some missing dependency in Makefile/Meson?



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-04-12 17:55       ` Philippe Mathieu-Daudé
@ 2021-04-13 16:25         ` Philippe Mathieu-Daudé
  2021-04-13 16:32           ` Alex Bennée
  2021-05-26 18:04           ` Cleber Rosa
  0 siblings, 2 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-13 16:25 UTC (permalink / raw)
  To: Alex Bennée, Paolo Bonzini
  Cc: Willian Rampazzo, qemu-arm, qemu-devel,
	Wainer dos Santos Moschetta, Cleber Rosa

Hi Alex,

On 4/12/21 7:55 PM, Philippe Mathieu-Daudé wrote:
> On 4/6/21 7:12 PM, Alex Bennée wrote:
>>
>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>
>>> On 3/31/21 5:45 PM, Alex Bennée wrote:
>>>>
>>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>>
>>>>> The current 'virt_kvm' test is restricted to GICv2, but can also
>>>>> work with a GICv3. Duplicate it but add a GICv3 test which can be
>>>>> tested on some hardware.
>>>>>
>>>>> Noticed while running:
>>>>>
>>>>>  $ avocado --show=app run -t machine:virt tests/acceptance/
>>>>>  ...
>>>>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>>>>>
>>>>> The job.log content is:
>>>>>
>>>>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>>>>>
>>>>> With this patch:
>>>>>
>>>>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>>>>>  (1/1)
>>>>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>>>>>  PASS (55.10 s)
>>>>
>>>> On the new aarch64 machine which is GICv3 I get the following:
>>>>
>>>>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
>>>>
>>>> which it shouldn't have run. However:
>>>>
>>>>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
>>>>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
>>>>
>>>> Is this something that has regressed or am I doing it wrong?
>>>
>>> Typo in the tag: "device:gic3" -> "device:gicv3"
>>
>> Doh!
>>
>> But what about:
>>
>> /tests/venv/bin/avocado run tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2
>> JOB ID     : 396696d8f9d31d970878cb46025b2ced76f3623f
>> JOB LOG    : /home/alex/avocado/job-results/job-2021-04-06T17.11-396696d/job.log
>>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.65 s)
>> RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
>> JOB TIME   : 0.96 s
>>
>> why doesn't that skip?
> 
> /home/phil/avocado/job-results/job-2021-04-12T17.51-efdca81/job.log
> 2021-04-12 17:52:44,589 machine          L0389 DEBUG| Output:
> "qemu-system-aarch64: Could not find ROM image
> '/home/phil/qemu/build/host/pc-bios/edk2-aarch64-code.fd'\n"
> 
> Missing prerequisite:
> 
> $ ninja pc-bios/edk2-aarch64-code.fd
> [1/1] Generating edk2-aarch64-code.fd with a custom command (wrapped by
> meson to capture output)
> 
> Then we are good:
> 
> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
> JOB ID     : e84401e5cc3ae53a3094c79491e661385cc7b4a7
> JOB LOG    :
> /home/phil/avocado/job-results/job-2021-04-12T17.53-e84401e/job.log
>  (1/1)
> tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
> PASS (16.38 s)
> RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
> CANCEL 0
> JOB TIME   : 16.70 s
> 
> Probably some missing dependency in Makefile/Meson?

Are you using multiple build directories?

I could reproduce doing:

$ mkdir A B
$ cd A
$ make check-qtest-aarch64
$ avocado --show=app,console run -t device:gicv3 tests/acceptance
$ cd ../B
$ ninja qemu-system-aarch64
$ avocado --show=app,console run -t device:gicv3 tests/acceptance

In A edk2-aarch64-code.fd has been expanded in A/pc-bios/,
in B it isn't.

check-acceptance is a Makefile rule, not a ninja one...
I suppose we need to convert it to ninja to be able to use the
rest of the dependencies checks.

Cc'ing Paolo because I'm not sure what the best move and where
to plug things.



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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-04-13 16:25         ` Philippe Mathieu-Daudé
@ 2021-04-13 16:32           ` Alex Bennée
  2021-05-26 18:04           ` Cleber Rosa
  1 sibling, 0 replies; 10+ messages in thread
From: Alex Bennée @ 2021-04-13 16:32 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Wainer dos Santos Moschetta, Willian Rampazzo,
	qemu-arm, Cleber Rosa, Paolo Bonzini


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Hi Alex,
>
> On 4/12/21 7:55 PM, Philippe Mathieu-Daudé wrote:
>> On 4/6/21 7:12 PM, Alex Bennée wrote:
>>>
>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>
>>>> On 3/31/21 5:45 PM, Alex Bennée wrote:
>>>>>
>>>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
>>>>>
>>>>>> The current 'virt_kvm' test is restricted to GICv2, but can also
>>>>>> work with a GICv3. Duplicate it but add a GICv3 test which can be
>>>>>> tested on some hardware.
>>>>>>
>>>>>> Noticed while running:
>>>>>>
>>>>>>  $ avocado --show=app run -t machine:virt tests/acceptance/
>>>>>>  ...
>>>>>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
>>>>>>
>>>>>> The job.log content is:
>>>>>>
>>>>>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
>>>>>>
>>>>>> With this patch:
>>>>>>
>>>>>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
>>>>>>  (1/1)
>>>>>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>>>>>>  PASS (55.10 s)
>>>>>
>>>>> On the new aarch64 machine which is GICv3 I get the following:
>>>>>
>>>>>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
>>>>>
>>>>> which it shouldn't have run. However:
>>>>>
>>>>>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
>>>>>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
>>>>>
>>>>> Is this something that has regressed or am I doing it wrong?
>>>>
>>>> Typo in the tag: "device:gic3" -> "device:gicv3"
>>>
>>> Doh!
>>>
>>> But what about:
>>>
>>> /tests/venv/bin/avocado run tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2
>>> JOB ID     : 396696d8f9d31d970878cb46025b2ced76f3623f
>>> JOB LOG    : /home/alex/avocado/job-results/job-2021-04-06T17.11-396696d/job.log
>>>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.65 s)
>>> RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
>>> JOB TIME   : 0.96 s
>>>
>>> why doesn't that skip?
>> 
>> /home/phil/avocado/job-results/job-2021-04-12T17.51-efdca81/job.log
>> 2021-04-12 17:52:44,589 machine          L0389 DEBUG| Output:
>> "qemu-system-aarch64: Could not find ROM image
>> '/home/phil/qemu/build/host/pc-bios/edk2-aarch64-code.fd'\n"
>> 
>> Missing prerequisite:
>> 
>> $ ninja pc-bios/edk2-aarch64-code.fd
>> [1/1] Generating edk2-aarch64-code.fd with a custom command (wrapped by
>> meson to capture output)
>> 
>> Then we are good:
>> 
>> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
>> JOB ID     : e84401e5cc3ae53a3094c79491e661385cc7b4a7
>> JOB LOG    :
>> /home/phil/avocado/job-results/job-2021-04-12T17.53-e84401e/job.log
>>  (1/1)
>> tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
>> PASS (16.38 s)
>> RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
>> CANCEL 0
>> JOB TIME   : 16.70 s
>> 
>> Probably some missing dependency in Makefile/Meson?
>
> Are you using multiple build directories?

Yes - many.

> I could reproduce doing:
>
> $ mkdir A B
> $ cd A
> $ make check-qtest-aarch64
> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
> $ cd ../B
> $ ninja qemu-system-aarch64
> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
>
> In A edk2-aarch64-code.fd has been expanded in A/pc-bios/,
> in B it isn't.
>
> check-acceptance is a Makefile rule, not a ninja one...
> I suppose we need to convert it to ninja to be able to use the
> rest of the dependencies checks.
>
> Cc'ing Paolo because I'm not sure what the best move and where
> to plug things.


-- 
Alex Bennée


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

* Re: [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3
  2021-04-13 16:25         ` Philippe Mathieu-Daudé
  2021-04-13 16:32           ` Alex Bennée
@ 2021-05-26 18:04           ` Cleber Rosa
  1 sibling, 0 replies; 10+ messages in thread
From: Cleber Rosa @ 2021-05-26 18:04 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Wainer dos Santos Moschetta, Willian Rampazzo,
	qemu-arm, Paolo Bonzini, Alex Bennée

[-- Attachment #1: Type: text/plain, Size: 5126 bytes --]

On Tue, Apr 13, 2021 at 06:25:47PM +0200, Philippe Mathieu-Daudé wrote:
> Hi Alex,
> 
> On 4/12/21 7:55 PM, Philippe Mathieu-Daudé wrote:
> > On 4/6/21 7:12 PM, Alex Bennée wrote:
> >>
> >> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> >>
> >>> On 3/31/21 5:45 PM, Alex Bennée wrote:
> >>>>
> >>>> Philippe Mathieu-Daudé <philmd@redhat.com> writes:
> >>>>
> >>>>> The current 'virt_kvm' test is restricted to GICv2, but can also
> >>>>> work with a GICv3. Duplicate it but add a GICv3 test which can be
> >>>>> tested on some hardware.
> >>>>>
> >>>>> Noticed while running:
> >>>>>
> >>>>>  $ avocado --show=app run -t machine:virt tests/acceptance/
> >>>>>  ...
> >>>>>  (2/6) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm: ERROR: Unexpected empty reply from server (1.82 s)
> >>>>>
> >>>>> The job.log content is:
> >>>>>
> >>>>>   L0351 DEBUG| Output: 'qemu-system-aarch64: host does not support in-kernel GICv2 emulation\n'
> >>>>>
> >>>>> With this patch:
> >>>>>
> >>>>>  $ avocado --show=app run -t device:gicv3 tests/acceptance/
> >>>>>  (1/1)
> >>>>>  tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
> >>>>>  PASS (55.10 s)
> >>>>
> >>>> On the new aarch64 machine which is GICv3 I get the following:
> >>>>
> >>>>  (006/142) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.47 s)
> >>>>
> >>>> which it shouldn't have run. However:
> >>>>
> >>>>   ./tests/venv/bin/avocado --show=app run -t device:gic3 tests/acceptance/
> >>>>   Test Suite could not be create. No test references provided nor any other arguments resolved into tests
> >>>>
> >>>> Is this something that has regressed or am I doing it wrong?
> >>>
> >>> Typo in the tag: "device:gic3" -> "device:gicv3"
> >>
> >> Doh!
> >>
> >> But what about:
> >>
> >> /tests/venv/bin/avocado run tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2
> >> JOB ID     : 396696d8f9d31d970878cb46025b2ced76f3623f
> >> JOB LOG    : /home/alex/avocado/job-results/job-2021-04-06T17.11-396696d/job.log
> >>  (1/1) tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv2: ERROR: Unexpected empty reply from server (0.65 s)
> >> RESULTS    : PASS 0 | ERROR 1 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
> >> JOB TIME   : 0.96 s
> >>
> >> why doesn't that skip?
> > 
> > /home/phil/avocado/job-results/job-2021-04-12T17.51-efdca81/job.log
> > 2021-04-12 17:52:44,589 machine          L0389 DEBUG| Output:
> > "qemu-system-aarch64: Could not find ROM image
> > '/home/phil/qemu/build/host/pc-bios/edk2-aarch64-code.fd'\n"
> > 
> > Missing prerequisite:
> > 
> > $ ninja pc-bios/edk2-aarch64-code.fd
> > [1/1] Generating edk2-aarch64-code.fd with a custom command (wrapped by
> > meson to capture output)
> > 
> > Then we are good:
> > 
> > $ avocado --show=app,console run -t device:gicv3 tests/acceptance
> > JOB ID     : e84401e5cc3ae53a3094c79491e661385cc7b4a7
> > JOB LOG    :
> > /home/phil/avocado/job-results/job-2021-04-12T17.53-e84401e/job.log
> >  (1/1)
> > tests/acceptance/boot_linux.py:BootLinuxAarch64.test_virt_kvm_gicv3:
> > PASS (16.38 s)
> > RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 |
> > CANCEL 0
> > JOB TIME   : 16.70 s
> > 
> > Probably some missing dependency in Makefile/Meson?
> 
> Are you using multiple build directories?
> 
> I could reproduce doing:
> 
> $ mkdir A B
> $ cd A
> $ make check-qtest-aarch64
> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
> $ cd ../B
> $ ninja qemu-system-aarch64
> $ avocado --show=app,console run -t device:gicv3 tests/acceptance
> 
> In A edk2-aarch64-code.fd has been expanded in A/pc-bios/,
> in B it isn't.
> 
> check-acceptance is a Makefile rule, not a ninja one...
> I suppose we need to convert it to ninja to be able to use the
> rest of the dependencies checks.
> 
> Cc'ing Paolo because I'm not sure what the best move and where
> to plug things.
> 
> 

While a proper build system conversion fix doesn't happen, what about:

diff --git a/tests/acceptance/boot_linux.py b/tests/acceptance/boot_linux.py
index 314370fd1f..5d42d98dc7 100644
--- a/tests/acceptance/boot_linux.py
+++ b/tests/acceptance/boot_linux.py
@@ -69,9 +69,10 @@ class BootLinuxAarch64(LinuxTest):
     chksum = '1e18d9c0cf734940c4b5d5ec592facaed2af0ad0329383d5639c997fdf16fe49'
 
     def add_common_args(self):
-        self.vm.add_args('-bios',
-                         os.path.join(BUILD_DIR, 'pc-bios',
-                                      'edk2-aarch64-code.fd'))
+        bios_path = os.path.join(BUILD_DIR, 'pc-bios', 'edk2-aarch64-code.fd')
+        if not os.path.exists(bios_path):
+            self.cancel('Missing bios file "%s"', bios_path)
+        self.vm.add_args('-bios', bios_path)
         self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0')
         self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom')

I can send a patch if this looks reasonable.

- Cleber.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

end of thread, other threads:[~2021-05-26 18:18 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-29 22:48 [PATCH] tests/acceptance: Add a 'virt_kvm' test using the GICv3 Philippe Mathieu-Daudé
2020-09-30 13:24 ` Willian Rampazzo
2020-10-05  8:08 ` Philippe Mathieu-Daudé
2021-03-31 15:45 ` Alex Bennée
2021-04-06 15:22   ` Philippe Mathieu-Daudé
2021-04-06 17:12     ` Alex Bennée
2021-04-12 17:55       ` Philippe Mathieu-Daudé
2021-04-13 16:25         ` Philippe Mathieu-Daudé
2021-04-13 16:32           ` Alex Bennée
2021-05-26 18:04           ` Cleber Rosa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.