[PULL 3/5] tests/avocado: apply proper skipUnless decorator

Thomas Huth posted 5 patches 3 months, 1 week ago
[PULL 3/5] tests/avocado: apply proper skipUnless decorator
Posted by Thomas Huth 3 months, 1 week ago
From: Cleber Rosa <crosa@redhat.com>

Commit 9b45cc993 added many cases of skipUnless for the sake of
organizing flaky tests.  But, Python decorators *must* follow what
they decorate, so the newlines added should *not* exist there.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Message-ID: <20240806173119.582857-3-crosa@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/avocado/boot_linux_console.py | 1 -
 tests/avocado/intel_iommu.py        | 1 -
 tests/avocado/linux_initrd.py       | 1 -
 tests/avocado/machine_aspeed.py     | 2 --
 tests/avocado/machine_mips_malta.py | 2 --
 tests/avocado/machine_rx_gdbsim.py  | 1 -
 tests/avocado/reverse_debugging.py  | 4 ----
 tests/avocado/smmu.py               | 1 -
 8 files changed, 13 deletions(-)

diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py
index 2929aa042d..cffdd6b5a2 100644
--- a/tests/avocado/boot_linux_console.py
+++ b/tests/avocado/boot_linux_console.py
@@ -1522,7 +1522,6 @@ def test_ppc_mac99(self):
     # like issues with a buggy kernel. As a result we don't want it
     # gating releases on Gitlab.
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_sh4_r2d(self):
         """
         :avocado: tags=arch:sh4
diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py
index 008f214397..992583fa7d 100644
--- a/tests/avocado/intel_iommu.py
+++ b/tests/avocado/intel_iommu.py
@@ -13,7 +13,6 @@
 from avocado_qemu.linuxtest import LinuxTest
 
 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
 class IntelIOMMU(LinuxTest):
     """
     :avocado: tags=arch:x86_64
diff --git a/tests/avocado/linux_initrd.py b/tests/avocado/linux_initrd.py
index aad5b19bd9..7f47b98ae7 100644
--- a/tests/avocado/linux_initrd.py
+++ b/tests/avocado/linux_initrd.py
@@ -54,7 +54,6 @@ def test_with_2gib_file_should_exit_error_msg_with_linux_v3_6(self):
             self.assertRegex(self.vm.get_log(), expected_msg)
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_with_2gib_file_should_work_with_linux_v4_16(self):
         """
         :avocado: tags=flaky
diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py
index f8e263d37e..c0b01e8f1f 100644
--- a/tests/avocado/machine_aspeed.py
+++ b/tests/avocado/machine_aspeed.py
@@ -323,7 +323,6 @@ def do_test_aarch64_aspeed_sdk_start(self, image):
         self.wait_for_console_pattern('Starting kernel ...')
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_arm_ast2500_evb_sdk(self):
         """
         :avocado: tags=arch:arm
@@ -343,7 +342,6 @@ def test_arm_ast2500_evb_sdk(self):
         self.wait_for_console_pattern('nodistro.0 ast2500-default ttyS4')
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_arm_ast2600_evb_sdk(self):
         """
         :avocado: tags=arch:arm
diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py
index 8cf84bd805..07a80633b5 100644
--- a/tests/avocado/machine_mips_malta.py
+++ b/tests/avocado/machine_mips_malta.py
@@ -102,7 +102,6 @@ def test_mips_malta_i6400_framebuffer_logo_1core(self):
         self.do_test_i6400_framebuffer_logo(1)
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_mips_malta_i6400_framebuffer_logo_7cores(self):
         """
         :avocado: tags=arch:mips64el
@@ -114,7 +113,6 @@ def test_mips_malta_i6400_framebuffer_logo_7cores(self):
         self.do_test_i6400_framebuffer_logo(7)
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_mips_malta_i6400_framebuffer_logo_8cores(self):
         """
         :avocado: tags=arch:mips64el
diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py
index 412a7a5089..9a0bec8a6e 100644
--- a/tests/avocado/machine_rx_gdbsim.py
+++ b/tests/avocado/machine_rx_gdbsim.py
@@ -49,7 +49,6 @@ def test_uboot(self):
         #exec_command_and_wait_for_pattern(self, 'version', gcc_version)
 
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_linux_sash(self):
         """
         Boots a Linux kernel and checks that the console is operational.
diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py
index 92855a02a5..f24287cd0a 100644
--- a/tests/avocado/reverse_debugging.py
+++ b/tests/avocado/reverse_debugging.py
@@ -207,7 +207,6 @@ def get_pc(self, g):
 
     # unidentified gitlab timeout problem
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_x86_64_pc(self):
         """
         :avocado: tags=arch:x86_64
@@ -225,7 +224,6 @@ class ReverseDebugging_AArch64(ReverseDebugging):
 
     # unidentified gitlab timeout problem
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_aarch64_virt(self):
         """
         :avocado: tags=arch:aarch64
@@ -250,7 +248,6 @@ class ReverseDebugging_ppc64(ReverseDebugging):
 
     # unidentified gitlab timeout problem
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_ppc64_pseries(self):
         """
         :avocado: tags=arch:ppc64
@@ -265,7 +262,6 @@ def test_ppc64_pseries(self):
 
     # See https://gitlab.com/qemu-project/qemu/-/issues/1992
     @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
     def test_ppc64_powernv(self):
         """
         :avocado: tags=arch:ppc64
diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py
index aadda71e4b..83fd79e922 100644
--- a/tests/avocado/smmu.py
+++ b/tests/avocado/smmu.py
@@ -14,7 +14,6 @@
 from avocado_qemu.linuxtest import LinuxTest
 
 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
-
 class SMMU(LinuxTest):
     """
     :avocado: tags=accel:kvm
-- 
2.46.0


Re: [PULL 3/5] tests/avocado: apply proper skipUnless decorator
Posted by Philippe Mathieu-Daudé 3 months ago
On 16/8/24 09:22, Thomas Huth wrote:
> From: Cleber Rosa <crosa@redhat.com>
> 
> Commit 9b45cc993 added many cases of skipUnless for the sake of
> organizing flaky tests.  But, Python decorators *must* follow what
> they decorate, so the newlines added should *not* exist there.
> 
> Signed-off-by: Cleber Rosa <crosa@redhat.com>
> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> Message-ID: <20240806173119.582857-3-crosa@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/avocado/boot_linux_console.py | 1 -
>   tests/avocado/intel_iommu.py        | 1 -
>   tests/avocado/linux_initrd.py       | 1 -
>   tests/avocado/machine_aspeed.py     | 2 --
>   tests/avocado/machine_mips_malta.py | 2 --
>   tests/avocado/machine_rx_gdbsim.py  | 1 -
>   tests/avocado/reverse_debugging.py  | 4 ----
>   tests/avocado/smmu.py               | 1 -
>   8 files changed, 13 deletions(-)


> diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py
> index 412a7a5089..9a0bec8a6e 100644
> --- a/tests/avocado/machine_rx_gdbsim.py
> +++ b/tests/avocado/machine_rx_gdbsim.py
> @@ -49,7 +49,6 @@ def test_uboot(self):
>           #exec_command_and_wait_for_pattern(self, 'version', gcc_version)
>   
>       @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab')
> -
>       def test_linux_sash(self):
>           """
>           Boots a Linux kernel and checks that the console is operational.

For some weird reason a part of this patch is missing...

Re: [PULL 3/5] tests/avocado: apply proper skipUnless decorator
Posted by Thomas Huth 3 months ago
On 20/08/2024 00.31, Philippe Mathieu-Daudé wrote:
> On 16/8/24 09:22, Thomas Huth wrote:
>> From: Cleber Rosa <crosa@redhat.com>
>>
>> Commit 9b45cc993 added many cases of skipUnless for the sake of
>> organizing flaky tests.  But, Python decorators *must* follow what
>> they decorate, so the newlines added should *not* exist there.
>>
>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>> Message-ID: <20240806173119.582857-3-crosa@redhat.com>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>   tests/avocado/boot_linux_console.py | 1 -
>>   tests/avocado/intel_iommu.py        | 1 -
>>   tests/avocado/linux_initrd.py       | 1 -
>>   tests/avocado/machine_aspeed.py     | 2 --
>>   tests/avocado/machine_mips_malta.py | 2 --
>>   tests/avocado/machine_rx_gdbsim.py  | 1 -
>>   tests/avocado/reverse_debugging.py  | 4 ----
>>   tests/avocado/smmu.py               | 1 -
>>   8 files changed, 13 deletions(-)
> 
> 
>> diff --git a/tests/avocado/machine_rx_gdbsim.py 
>> b/tests/avocado/machine_rx_gdbsim.py
>> index 412a7a5089..9a0bec8a6e 100644
>> --- a/tests/avocado/machine_rx_gdbsim.py
>> +++ b/tests/avocado/machine_rx_gdbsim.py
>> @@ -49,7 +49,6 @@ def test_uboot(self):
>>           #exec_command_and_wait_for_pattern(self, 'version', gcc_version)
>>       @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on 
>> GitLab')
>> -
>>       def test_linux_sash(self):
>>           """
>>           Boots a Linux kernel and checks that the console is operational.
> 
> For some weird reason a part of this patch is missing...

I dropped it on purpose since there was another patch on the list that drops 
that decorator completely.

  Thomas


Re: [PULL 3/5] tests/avocado: apply proper skipUnless decorator
Posted by Thomas Huth 3 months ago
On 20/08/2024 10.03, Thomas Huth wrote:
> On 20/08/2024 00.31, Philippe Mathieu-Daudé wrote:
>> On 16/8/24 09:22, Thomas Huth wrote:
>>> From: Cleber Rosa <crosa@redhat.com>
>>>
>>> Commit 9b45cc993 added many cases of skipUnless for the sake of
>>> organizing flaky tests.  But, Python decorators *must* follow what
>>> they decorate, so the newlines added should *not* exist there.
>>>
>>> Signed-off-by: Cleber Rosa <crosa@redhat.com>
>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> Reviewed-by: Thomas Huth <thuth@redhat.com>
>>> Tested-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
>>> Message-ID: <20240806173119.582857-3-crosa@redhat.com>
>>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>>> ---
>>>   tests/avocado/boot_linux_console.py | 1 -
>>>   tests/avocado/intel_iommu.py        | 1 -
>>>   tests/avocado/linux_initrd.py       | 1 -
>>>   tests/avocado/machine_aspeed.py     | 2 --
>>>   tests/avocado/machine_mips_malta.py | 2 --
>>>   tests/avocado/machine_rx_gdbsim.py  | 1 -
>>>   tests/avocado/reverse_debugging.py  | 4 ----
>>>   tests/avocado/smmu.py               | 1 -
>>>   8 files changed, 13 deletions(-)
>>
>>
>>> diff --git a/tests/avocado/machine_rx_gdbsim.py 
>>> b/tests/avocado/machine_rx_gdbsim.py
>>> index 412a7a5089..9a0bec8a6e 100644
>>> --- a/tests/avocado/machine_rx_gdbsim.py
>>> +++ b/tests/avocado/machine_rx_gdbsim.py
>>> @@ -49,7 +49,6 @@ def test_uboot(self):
>>>           #exec_command_and_wait_for_pattern(self, 'version', gcc_version)
>>>       @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable 
>>> on GitLab')
>>> -
>>>       def test_linux_sash(self):
>>>           """
>>>           Boots a Linux kernel and checks that the console is operational.
>>
>> For some weird reason a part of this patch is missing...
> 
> I dropped it on purpose since there was another patch on the list that drops 
> that decorator completely.

This one here, it's even yours ;-) :

 
https://gitlab.com/qemu-project/qemu/-/commit/8a69613e9ccac6c9eb97fb969348284469fd9395

  Thomas