All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-devel@nongnu.org, "Richard Henderson" <rth@twiddle.net>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-block@nongnu.org, "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Juan Quintela" <quintela@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
	kvm@vger.kernel.org
Subject: Re: [PATCH v2 07/12] tests/acceptance: Remove shebang header
Date: Tue, 24 Mar 2020 10:19:10 +0000	[thread overview]
Message-ID: <87369yawdd.fsf@linaro.org> (raw)
In-Reply-To: <20200130163232.10446-8-philmd@redhat.com>


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Patch created mechanically by running:
>
>   $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \
>       | xargs grep -L 'if __name__.*__main__')
>   $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \
>       $(git grep -lF '#!/usr/bin/env python' \
>       | xargs grep -L 'if __name__.*__main__')

OK, but my question is why? Aren't shebangs considered good practice for
finding the executable for a script?

If the acceptance scripts are special in this regard we should say why
in the commit message.

>
> Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/virtio_seg_max_adjust.py  | 1 -
>  tests/acceptance/x86_cpu_model_versions.py | 1 -
>  2 files changed, 2 deletions(-)
>  mode change 100755 => 100644 tests/acceptance/virtio_seg_max_adjust.py
>
> diff --git a/tests/acceptance/virtio_seg_max_adjust.py b/tests/acceptance/virtio_seg_max_adjust.py
> old mode 100755
> new mode 100644
> index 5458573138..8d4f24da49
> --- a/tests/acceptance/virtio_seg_max_adjust.py
> +++ b/tests/acceptance/virtio_seg_max_adjust.py
> @@ -1,4 +1,3 @@
> -#!/usr/bin/env python
>  #
>  # Test virtio-scsi and virtio-blk queue settings for all machine types
>  #
> diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/x86_cpu_model_versions.py
> index 90558d9a71..01ff614ec2 100644
> --- a/tests/acceptance/x86_cpu_model_versions.py
> +++ b/tests/acceptance/x86_cpu_model_versions.py
> @@ -1,4 +1,3 @@
> -#!/usr/bin/env python
>  #
>  # Basic validation of x86 versioned CPU models and CPU model aliases
>  #


-- 
Alex Bennée

WARNING: multiple messages have this Message-ID (diff)
From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: "Fam Zheng" <fam@euphon.net>, "Kevin Wolf" <kwolf@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@virtuozzo.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Eduardo Habkost" <ehabkost@redhat.com>,
	qemu-block@nongnu.org, "Juan Quintela" <quintela@redhat.com>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	qemu-devel@nongnu.org, kvm@vger.kernel.org,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Max Reitz" <mreitz@redhat.com>,
	"Michael Roth" <mdroth@linux.vnet.ibm.com>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [PATCH v2 07/12] tests/acceptance: Remove shebang header
Date: Tue, 24 Mar 2020 10:19:10 +0000	[thread overview]
Message-ID: <87369yawdd.fsf@linaro.org> (raw)
In-Reply-To: <20200130163232.10446-8-philmd@redhat.com>


Philippe Mathieu-Daudé <philmd@redhat.com> writes:

> Patch created mechanically by running:
>
>   $ chmod 644 $(git grep -lF '#!/usr/bin/env python' \
>       | xargs grep -L 'if __name__.*__main__')
>   $ sed -i "/^#\!\/usr\/bin\/\(env\ \)\?python.\?$/d" \
>       $(git grep -lF '#!/usr/bin/env python' \
>       | xargs grep -L 'if __name__.*__main__')

OK, but my question is why? Aren't shebangs considered good practice for
finding the executable for a script?

If the acceptance scripts are special in this regard we should say why
in the commit message.

>
> Reported-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> Suggested-by: Stefan Hajnoczi <stefanha@redhat.com>
> Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/acceptance/virtio_seg_max_adjust.py  | 1 -
>  tests/acceptance/x86_cpu_model_versions.py | 1 -
>  2 files changed, 2 deletions(-)
>  mode change 100755 => 100644 tests/acceptance/virtio_seg_max_adjust.py
>
> diff --git a/tests/acceptance/virtio_seg_max_adjust.py b/tests/acceptance/virtio_seg_max_adjust.py
> old mode 100755
> new mode 100644
> index 5458573138..8d4f24da49
> --- a/tests/acceptance/virtio_seg_max_adjust.py
> +++ b/tests/acceptance/virtio_seg_max_adjust.py
> @@ -1,4 +1,3 @@
> -#!/usr/bin/env python
>  #
>  # Test virtio-scsi and virtio-blk queue settings for all machine types
>  #
> diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/x86_cpu_model_versions.py
> index 90558d9a71..01ff614ec2 100644
> --- a/tests/acceptance/x86_cpu_model_versions.py
> +++ b/tests/acceptance/x86_cpu_model_versions.py
> @@ -1,4 +1,3 @@
> -#!/usr/bin/env python
>  #
>  # Basic validation of x86 versioned CPU models and CPU model aliases
>  #


-- 
Alex Bennée


  parent reply	other threads:[~2020-03-24 10:19 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-30 16:32 [PATCH v2 00/12] python: Explicit usage of Python 3 Philippe Mathieu-Daudé
2020-01-30 16:32 ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 01/12] scripts/checkpatch.pl: Only allow Python 3 interpreter Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 02/12] tests/qemu-iotests/check: Allow use of python3 interpreter Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 03/12] tests/qemu-iotests: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 04/12] tests: Explicit usage of Python 3 Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 05/12] scripts: Explicit usage of Python 3 (scripts with __main__) Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 06/12] scripts/minikconf: Explicit usage of Python 3 Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 07/12] tests/acceptance: Remove shebang header Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 23:47   ` Philippe Mathieu-Daudé
2020-01-30 23:47     ` Philippe Mathieu-Daudé
2020-03-24 10:19   ` Alex Bennée [this message]
2020-03-24 10:19     ` Alex Bennée
2020-01-30 16:32 ` [PATCH v2 08/12] scripts/tracetool: " Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 09/12] tests/vm: " Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 10/12] tests/qemu-iotests: Explicit usage of Python3 (scripts without __main__) Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 11/12] scripts: Explicit usage of Python 3 " Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-01-30 16:32 ` [PATCH v2 12/12] tests/qemu-iotests/check: Only check for Python 3 interpreter Philippe Mathieu-Daudé
2020-01-30 16:32   ` Philippe Mathieu-Daudé
2020-02-04 16:06 ` [PATCH v2 00/12] python: Explicit usage of Python 3 Paolo Bonzini
2020-02-04 16:06   ` Paolo Bonzini
2020-02-04 17:20 ` Philippe Mathieu-Daudé
2020-02-04 17:20   ` Philippe Mathieu-Daudé

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=87369yawdd.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=crosa@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=fam@euphon.net \
    --cc=kvm@vger.kernel.org \
    --cc=kwolf@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mreitz@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.