[PATCH] tests/functional/ppc/test_ppe42: Fix warning from the latest version of pylint

Thomas Huth posted 1 patch 4 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260427080731.389061-1-thuth@redhat.com
Maintainers: Glenn Miles <milesg@linux.ibm.com>
tests/functional/ppc/test_ppe42.py | 1 -
1 file changed, 1 deletion(-)
[PATCH] tests/functional/ppc/test_ppe42: Fix warning from the latest version of pylint
Posted by Thomas Huth 4 weeks ago
From: Thomas Huth <thuth@redhat.com>

The pylint from Fedora 44 found a new issue in this test:

 tests/functional/ppc/test_ppe42.py:63:20: W0101: Unreachable code (unreachable)

And indeed, the "break" is unreachable since the previous self.fail()
always aborts immediately. Thus let's remove the "break" to make pylint
happy again.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 tests/functional/ppc/test_ppe42.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/functional/ppc/test_ppe42.py b/tests/functional/ppc/test_ppe42.py
index 7b360a40a54..53958a7938d 100755
--- a/tests/functional/ppc/test_ppe42.py
+++ b/tests/functional/ppc/test_ppe42.py
@@ -60,7 +60,6 @@ def _wait_pass_fail(self, timeout):
                     self.log.debug(f"Execution stopped: {e}")
                     self.log.debug("Exiting due to test failure")
                     self.fail("Failure detected!")
-                    break
             else:
                 self.fail("Timed out waiting for test completion.")
 
-- 
2.53.0
Re: [PATCH] tests/functional/ppc/test_ppe42: Fix warning from the latest version of pylint
Posted by Miles Glenn 3 weeks, 6 days ago
Reviewed-by: Glenn Miles <milesg@linux.ibm.com>

Thanks,

Glenn

On Mon, 2026-04-27 at 10:07 +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> The pylint from Fedora 44 found a new issue in this test:
> 
>  tests/functional/ppc/test_ppe42.py:63:20: W0101: Unreachable code (unreachable)
> 
> And indeed, the "break" is unreachable since the previous self.fail()
> always aborts immediately. Thus let's remove the "break" to make pylint
> happy again.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  tests/functional/ppc/test_ppe42.py | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tests/functional/ppc/test_ppe42.py b/tests/functional/ppc/test_ppe42.py
> index 7b360a40a54..53958a7938d 100755
> --- a/tests/functional/ppc/test_ppe42.py
> +++ b/tests/functional/ppc/test_ppe42.py
> @@ -60,7 +60,6 @@ def _wait_pass_fail(self, timeout):
>                      self.log.debug(f"Execution stopped: {e}")
>                      self.log.debug("Exiting due to test failure")
>                      self.fail("Failure detected!")
> -                    break
>              else:
>                  self.fail("Timed out waiting for test completion.")
>
Re: [PATCH] tests/functional/ppc/test_ppe42: Fix warning from the latest version of pylint
Posted by Philippe Mathieu-Daudé 4 weeks ago
On 27/4/26 10:07, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
> 
> The pylint from Fedora 44 found a new issue in this test:
> 
>   tests/functional/ppc/test_ppe42.py:63:20: W0101: Unreachable code (unreachable)
> 
> And indeed, the "break" is unreachable since the previous self.fail()
> always aborts immediately. Thus let's remove the "break" to make pylint
> happy again.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>   tests/functional/ppc/test_ppe42.py | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>