[Qemu-devel] [PATCH v4 2/4] tests/bios-tables: Improve portability by searching bash in the $PATH

Philippe Mathieu-Daudé posted 4 patches 6 years, 8 months ago
Maintainers: "Michael S. Tsirkin" <mst@redhat.com>, Max Reitz <mreitz@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Kevin Wolf <kwolf@redhat.com>
[Qemu-devel] [PATCH v4 2/4] tests/bios-tables: Improve portability by searching bash in the $PATH
Posted by Philippe Mathieu-Daudé 6 years, 8 months ago
Bash is not always installed as /bin/bash. In particular on OpenBSD,
the package installs it in /usr/local/bin.
Use the 'env' shebang to search bash in the $PATH.

Reviewed-by: Kamil Rytarowski <n54@gmx.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
 tests/data/acpi/rebuild-expected-aml.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
index bf9ba242ad..abdff70a0d 100755
--- a/tests/data/acpi/rebuild-expected-aml.sh
+++ b/tests/data/acpi/rebuild-expected-aml.sh
@@ -1,4 +1,4 @@
-#! /bin/bash
+#!/usr/bin/env bash
 
 #
 # Rebuild expected AML files for acpi unit-test
-- 
2.20.1


Re: [Qemu-devel] [PATCH v4 2/4] tests/bios-tables: Improve portability by searching bash in the $PATH
Posted by Thomas Huth 6 years, 8 months ago
On 07/03/2019 15.58, Philippe Mathieu-Daudé wrote:
> Bash is not always installed as /bin/bash. In particular on OpenBSD,
> the package installs it in /usr/local/bin.
> Use the 'env' shebang to search bash in the $PATH.
> 
> Reviewed-by: Kamil Rytarowski <n54@gmx.com>
> Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
>  tests/data/acpi/rebuild-expected-aml.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
> index bf9ba242ad..abdff70a0d 100755
> --- a/tests/data/acpi/rebuild-expected-aml.sh
> +++ b/tests/data/acpi/rebuild-expected-aml.sh
> @@ -1,4 +1,4 @@
> -#! /bin/bash
> +#!/usr/bin/env bash
>  
>  #
>  # Rebuild expected AML files for acpi unit-test
> 

In case Kevin wants to pick this up, too:

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

Otherwise, I can take this one also through the qtest tree.

Re: [Qemu-devel] [PATCH v4 2/4] tests/bios-tables: Improve portability by searching bash in the $PATH
Posted by Kevin Wolf 6 years, 8 months ago
Am 07.03.2019 um 20:50 hat Thomas Huth geschrieben:
> On 07/03/2019 15.58, Philippe Mathieu-Daudé wrote:
> > Bash is not always installed as /bin/bash. In particular on OpenBSD,
> > the package installs it in /usr/local/bin.
> > Use the 'env' shebang to search bash in the $PATH.
> > 
> > Reviewed-by: Kamil Rytarowski <n54@gmx.com>
> > Reviewed-by: Igor Mammedov <imammedo@redhat.com>
> > Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
> > Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> > ---
> >  tests/data/acpi/rebuild-expected-aml.sh | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/tests/data/acpi/rebuild-expected-aml.sh b/tests/data/acpi/rebuild-expected-aml.sh
> > index bf9ba242ad..abdff70a0d 100755
> > --- a/tests/data/acpi/rebuild-expected-aml.sh
> > +++ b/tests/data/acpi/rebuild-expected-aml.sh
> > @@ -1,4 +1,4 @@
> > -#! /bin/bash
> > +#!/usr/bin/env bash
> >  
> >  #
> >  # Rebuild expected AML files for acpi unit-test
> > 
> 
> In case Kevin wants to pick this up, too:
> 
> Acked-by: Thomas Huth <thuth@redhat.com>
> 
> Otherwise, I can take this one also through the qtest tree.

Thanks! I already queued it yesterday, but having your Ack is better.

Kevin