From: John Snow <jsnow@redhat.com>
To: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
qemu-block@nongnu.org
Cc: kwolf@redhat.com, thuth@redhat.com, qemu-devel@nongnu.org,
mreitz@redhat.com
Subject: Re: [PATCH] iotests/testrunner: fix recognition of python tests
Date: Fri, 29 Jan 2021 12:58:19 -0500 [thread overview]
Message-ID: <a7bd5ab5-e1eb-9612-1945-f2e861b26e3b@redhat.com> (raw)
In-Reply-To: <20210129090616.84145-1-vsementsov@virtuozzo.com>
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
>
prev parent reply other threads:[~2021-01-29 17:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a7bd5ab5-e1eb-9612-1945-f2e861b26e3b@redhat.com \
--to=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
--cc=vsementsov@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).