diff mbox series

[5/5] avocado/replay_kernel.py: make tcg-icount check in run_vm()

Message ID 20220303153517.168943-6-danielhb413@gmail.com
State New
Headers show
Series --disable-tcg qtest/avocado fixes for ppc64 | expand

Commit Message

Daniel Henrique Barboza March 3, 2022, 3:35 p.m. UTC
The icount framework relies on TCG availability. If QEMU is built with
--disable-tcg we won't have icount either, and then this test will fail
with the following message in an IBM POWER9 host:

tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries:
ERROR: ConnectError: Failed to establish session:
(...)
/11-tests_avocado_replay_kernel.py_ReplayKernelNormal.test_ppc64_pseries/replay.bin:
cannot configure icount, TCG support not available

Although this was revealed in a specific ppc64 scenario, the TCG check
is being done in the common code inside run_vm() because all archs need
TCG to have access to icount.

Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
---
 tests/avocado/replay_kernel.py | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Cédric Le Goater March 7, 2022, 8:47 a.m. UTC | #1
On 3/3/22 16:35, Daniel Henrique Barboza wrote:
> The icount framework relies on TCG availability. If QEMU is built with
> --disable-tcg we won't have icount either, and then this test will fail
> with the following message in an IBM POWER9 host:
> 
> tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries:
> ERROR: ConnectError: Failed to establish session:
> (...)
> /11-tests_avocado_replay_kernel.py_ReplayKernelNormal.test_ppc64_pseries/replay.bin:
> cannot configure icount, TCG support not available
> 
> Although this was revealed in a specific ppc64 scenario, the TCG check
> is being done in the common code inside run_vm() because all archs need
> TCG to have access to icount.
> 
> Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>


Reviewed-by: Cédric Le Goater <clg@kaod.org>

Pavel,

Should I take this patch through the ppc tree ?

Thanks,

C.


> ---
>   tests/avocado/replay_kernel.py | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
> index c68a953730..0b2b0dc692 100644
> --- a/tests/avocado/replay_kernel.py
> +++ b/tests/avocado/replay_kernel.py
> @@ -36,6 +36,9 @@ class ReplayKernelBase(LinuxKernelTest):
>   
>       def run_vm(self, kernel_path, kernel_command_line, console_pattern,
>                  record, shift, args, replay_path):
> +        # icount requires TCG to be available
> +        self.require_accelerator('tcg')
> +
>           logger = logging.getLogger('replay')
>           start_time = time.time()
>           vm = self.get_vm()
> @@ -243,6 +246,7 @@ def test_ppc64_pseries(self):
>           """
>           :avocado: tags=arch:ppc64
>           :avocado: tags=machine:pseries
> +        :avocado: tags=accel:tcg
>           """
>           kernel_url = ('https://archives.fedoraproject.org/pub/archive'
>                         '/fedora-secondary/releases/29/Everything/ppc64le/os'
Pavel Dovgalyuk March 9, 2022, 4:59 a.m. UTC | #2
On 07.03.2022 11:47, Cédric Le Goater wrote:
> On 3/3/22 16:35, Daniel Henrique Barboza wrote:
>> The icount framework relies on TCG availability. If QEMU is built with
>> --disable-tcg we won't have icount either, and then this test will fail
>> with the following message in an IBM POWER9 host:
>>
>> tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries:
>> ERROR: ConnectError: Failed to establish session:
>> (...)
>> /11-tests_avocado_replay_kernel.py_ReplayKernelNormal.test_ppc64_pseries/replay.bin: 
>>
>> cannot configure icount, TCG support not available
>>
>> Although this was revealed in a specific ppc64 scenario, the TCG check
>> is being done in the common code inside run_vm() because all archs need
>> TCG to have access to icount.
>>
>> Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
> 
> 
> Reviewed-by: Cédric Le Goater <clg@kaod.org>
> 
> Pavel,
> 
> Should I take this patch through the ppc tree ?

Nobody has queued it yet, so I think it is ok.

> 
> Thanks,
> 
> C.
> 
> 
>> ---
>>   tests/avocado/replay_kernel.py | 4 ++++
>>   1 file changed, 4 insertions(+)
>>
>> diff --git a/tests/avocado/replay_kernel.py 
>> b/tests/avocado/replay_kernel.py
>> index c68a953730..0b2b0dc692 100644
>> --- a/tests/avocado/replay_kernel.py
>> +++ b/tests/avocado/replay_kernel.py
>> @@ -36,6 +36,9 @@ class ReplayKernelBase(LinuxKernelTest):
>>       def run_vm(self, kernel_path, kernel_command_line, console_pattern,
>>                  record, shift, args, replay_path):
>> +        # icount requires TCG to be available
>> +        self.require_accelerator('tcg')
>> +
>>           logger = logging.getLogger('replay')
>>           start_time = time.time()
>>           vm = self.get_vm()
>> @@ -243,6 +246,7 @@ def test_ppc64_pseries(self):
>>           """
>>           :avocado: tags=arch:ppc64
>>           :avocado: tags=machine:pseries
>> +        :avocado: tags=accel:tcg
>>           """
>>           kernel_url = ('https://archives.fedoraproject.org/pub/archive'
>>                         
>> '/fedora-secondary/releases/29/Everything/ppc64le/os'
>
Cédric Le Goater March 9, 2022, 8:21 a.m. UTC | #3
On 3/9/22 05:59, Pavel Dovgalyuk wrote:
> On 07.03.2022 11:47, Cédric Le Goater wrote:
>> On 3/3/22 16:35, Daniel Henrique Barboza wrote:
>>> The icount framework relies on TCG availability. If QEMU is built with
>>> --disable-tcg we won't have icount either, and then this test will fail
>>> with the following message in an IBM POWER9 host:
>>>
>>> tests/avocado/replay_kernel.py:ReplayKernelNormal.test_ppc64_pseries:
>>> ERROR: ConnectError: Failed to establish session:
>>> (...)
>>> /11-tests_avocado_replay_kernel.py_ReplayKernelNormal.test_ppc64_pseries/replay.bin:
>>> cannot configure icount, TCG support not available
>>>
>>> Although this was revealed in a specific ppc64 scenario, the TCG check
>>> is being done in the common code inside run_vm() because all archs need
>>> TCG to have access to icount.
>>>
>>> Cc: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
>>> Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
>>
>>
>> Reviewed-by: Cédric Le Goater <clg@kaod.org>
>>
>> Pavel,
>>
>> Should I take this patch through the ppc tree ?
> 
> Nobody has queued it yet, so I think it is ok.

Since these are fixes, I will at end of the week.

Thanks,

C.
diff mbox series

Patch

diff --git a/tests/avocado/replay_kernel.py b/tests/avocado/replay_kernel.py
index c68a953730..0b2b0dc692 100644
--- a/tests/avocado/replay_kernel.py
+++ b/tests/avocado/replay_kernel.py
@@ -36,6 +36,9 @@  class ReplayKernelBase(LinuxKernelTest):
 
     def run_vm(self, kernel_path, kernel_command_line, console_pattern,
                record, shift, args, replay_path):
+        # icount requires TCG to be available
+        self.require_accelerator('tcg')
+
         logger = logging.getLogger('replay')
         start_time = time.time()
         vm = self.get_vm()
@@ -243,6 +246,7 @@  def test_ppc64_pseries(self):
         """
         :avocado: tags=arch:ppc64
         :avocado: tags=machine:pseries
+        :avocado: tags=accel:tcg
         """
         kernel_url = ('https://archives.fedoraproject.org/pub/archive'
                       '/fedora-secondary/releases/29/Everything/ppc64le/os'