qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iotests/testrunner: fix recognition of python tests
@ 2021-01-29  9:06 Vladimir Sementsov-Ogievskiy
  2021-01-29  9:45 ` Thomas Huth
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2021-01-29  9:06 UTC (permalink / raw)
  To: qemu-block; +Cc: kwolf, thuth, vsementsov, qemu-devel, mreitz, jsnow

We should drop final '\n' before comparing with python3 shebang.

Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
 tests/qemu-iotests/testrunner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
index a581be6a29..24b3fba115 100644
--- a/tests/qemu-iotests/testrunner.py
+++ b/tests/qemu-iotests/testrunner.py
@@ -248,7 +248,7 @@ class TestRunner(ContextManager['TestRunner']):
 
         with f_test.open(encoding="utf-8") as f:
             try:
-                if f.readline() == '#!/usr/bin/env python3':
+                if f.readline().rstrip() == '#!/usr/bin/env python3':
                     args.insert(0, self.env.python)
             except UnicodeDecodeError:  # binary test? for future.
                 pass
-- 
2.29.2



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

* Re: [PATCH] iotests/testrunner: fix recognition of python tests
  2021-01-29  9:06 [PATCH] iotests/testrunner: fix recognition of python tests Vladimir Sementsov-Ogievskiy
@ 2021-01-29  9:45 ` Thomas Huth
  2021-01-29 11:30 ` Kevin Wolf
  2021-01-29 17:58 ` John Snow
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2021-01-29  9:45 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-block; +Cc: kwolf, jsnow, qemu-devel, mreitz

On 29/01/2021 10.06, Vladimir Sementsov-Ogievskiy wrote:
> We should drop final '\n' before comparing with python3 shebang.
> 
> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
>   tests/qemu-iotests/testrunner.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
> index a581be6a29..24b3fba115 100644
> --- a/tests/qemu-iotests/testrunner.py
> +++ b/tests/qemu-iotests/testrunner.py
> @@ -248,7 +248,7 @@ class TestRunner(ContextManager['TestRunner']):
>   
>           with f_test.open(encoding="utf-8") as f:
>               try:
> -                if f.readline() == '#!/usr/bin/env python3':
> +                if f.readline().rstrip() == '#!/usr/bin/env python3':
>                       args.insert(0, self.env.python)
>               except UnicodeDecodeError:  # binary test? for future.
>                   pass

Together with your other patch, this fixes "make vm-build-netbsd" for me, 
thanks!

Tested-by: Thomas Huth <thuth@redhat.com>



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

* Re: [PATCH] iotests/testrunner: fix recognition of python tests
  2021-01-29  9:06 [PATCH] iotests/testrunner: fix recognition of python tests Vladimir Sementsov-Ogievskiy
  2021-01-29  9:45 ` Thomas Huth
@ 2021-01-29 11:30 ` Kevin Wolf
  2021-01-29 17:58 ` John Snow
  2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2021-01-29 11:30 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy; +Cc: thuth, jsnow, qemu-devel, qemu-block, mreitz

Am 29.01.2021 um 10:06 hat Vladimir Sementsov-Ogievskiy geschrieben:
> We should drop final '\n' before comparing with python3 shebang.
> 
> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Thanks, applied to the block branch.

Kevin



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

* Re: [PATCH] iotests/testrunner: fix recognition of python tests
  2021-01-29  9:06 [PATCH] iotests/testrunner: fix recognition of python tests Vladimir Sementsov-Ogievskiy
  2021-01-29  9:45 ` Thomas Huth
  2021-01-29 11:30 ` Kevin Wolf
@ 2021-01-29 17:58 ` John Snow
  2 siblings, 0 replies; 4+ messages in thread
From: John Snow @ 2021-01-29 17:58 UTC (permalink / raw)
  To: Vladimir Sementsov-Ogievskiy, qemu-block; +Cc: kwolf, thuth, qemu-devel, mreitz

On 1/29/21 4:06 AM, Vladimir Sementsov-Ogievskiy wrote:
> We should drop final '\n' before comparing with python3 shebang.
> 
> Fixes: d74c754c924ca34e90b7c96ce2f5609d82c0e628
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

Reviewed-by: John Snow <jsnow@redhat.com>

> ---
>   tests/qemu-iotests/testrunner.py | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/qemu-iotests/testrunner.py b/tests/qemu-iotests/testrunner.py
> index a581be6a29..24b3fba115 100644
> --- a/tests/qemu-iotests/testrunner.py
> +++ b/tests/qemu-iotests/testrunner.py
> @@ -248,7 +248,7 @@ class TestRunner(ContextManager['TestRunner']):
>   
>           with f_test.open(encoding="utf-8") as f:
>               try:
> -                if f.readline() == '#!/usr/bin/env python3':
> +                if f.readline().rstrip() == '#!/usr/bin/env python3':
>                       args.insert(0, self.env.python)
>               except UnicodeDecodeError:  # binary test? for future.
>                   pass
> 



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

end of thread, other threads:[~2021-01-29 17:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-29  9:06 [PATCH] iotests/testrunner: fix recognition of python tests Vladimir Sementsov-Ogievskiy
2021-01-29  9:45 ` Thomas Huth
2021-01-29 11:30 ` Kevin Wolf
2021-01-29 17:58 ` John Snow

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).