Skip to contentSkip to conversation

tests/data/acpi: disassemble-aml: rename and change interpreter line

PATCH Superseded Mohamed Mediouni 4 participants 5 messages Jan 29

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/data/acpi: disassemble-aml: rename and change interpreter line

/usr/bin/bash isn't guaranteed to be present. Switch to /usr/bin/env bash.

Rename disassemle to disassemble in the same commit.

Adapt the correponding message in rebuild-expected-aml.

---
 tests/data/acpi/disassemle-aml.sh       | 4 ++--
 tests/data/acpi/rebuild-expected-aml.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tests/data/acpi/disassemle-aml.sh +2 -2
index 89561d233d..62e1991ace 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/usr/bin/env bash
 
 outdir=
 while getopts "o:" arg; do
@@ -7,7 +7,7 @@ while getopts "o:" arg; do
         outdir=$OPTARG
         ;;
     \? )
-        echo "Usage: ./tests/data/acpi/disassemle-aml.sh [-o <output-directory>]"
+        echo "Usage: ./tests/data/acpi/disassemble-aml.sh [-o <output-directory>]"
         exit 1
         ;;
 
tests/data/acpi/rebuild-expected-aml.sh +1 -1
index cbf9ffe0dd..af45cf3007 100755
@@ -57,7 +57,7 @@ old_allowed_dif=`grep -v -e 'List of comma-separated changed AML files to ignore
 echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
 
 echo "The files were rebuilt and can be added to git."
-echo "You can use ${SRC_PATH}/tests/data/acpi/disassemle-aml.sh to disassemble them to ASL."
+echo "You can use ${SRC_PATH}/tests/data/acpi/disassemble-aml.sh to disassemble them to ASL."
 
 if [ -z "$old_allowed_dif" ]; then
     echo "Note! Please do not commit expected files with source changes"
Signature · 1 line
2.50.1 (Apple Git-155)
#1 lore raw
Quoted 8 lines · Mohamed Mediouni

/usr/bin/bash isn't guaranteed to be present. Switch to /usr/bin/env bash.

Rename disassemle to disassemble in the same commit.

Adapt the correponding message in rebuild-expected-aml.

/bin/bash then - that's in the posix standard I think.

Quoted 39 lines
---
 tests/data/acpi/disassemle-aml.sh       | 4 ++--
 tests/data/acpi/rebuild-expected-aml.sh | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
tests/data/acpi/disassemle-aml.sh +2 -2
index 89561d233d..62e1991ace 100755
@@ -1,4 +1,4 @@
-#!/usr/bin/bash
+#!/usr/bin/env bash
 
 outdir=
 while getopts "o:" arg; do
@@ -7,7 +7,7 @@ while getopts "o:" arg; do
         outdir=$OPTARG
         ;;
     \? )
-        echo "Usage: ./tests/data/acpi/disassemle-aml.sh [-o <output-directory>]"
+        echo "Usage: ./tests/data/acpi/disassemble-aml.sh [-o <output-directory>]"
         exit 1
         ;;
 
tests/data/acpi/rebuild-expected-aml.sh +1 -1
index cbf9ffe0dd..af45cf3007 100755
@@ -57,7 +57,7 @@ old_allowed_dif=`grep -v -e 'List of comma-separated changed AML files to ignore
 echo '/* List of comma-separated changed AML files to ignore */' > ${SRC_PATH}/tests/qtest/bios-tables-test-allowed-diff.h
 
 echo "The files were rebuilt and can be added to git."
-echo "You can use ${SRC_PATH}/tests/data/acpi/disassemle-aml.sh to disassemble them to ASL."
+echo "You can use ${SRC_PATH}/tests/data/acpi/disassemble-aml.sh to disassemble them to ASL."
 
 if [ -z "$old_allowed_dif" ]; then
     echo "Note! Please do not commit expected files with source changes"
Signature · 1 line
2.50.1 (Apple Git-155)
#2 lore raw
Quoted 4 lines · Michael S. Tsirkin
Quoted 3 lines · Mohamed Mediouni

/usr/bin/bash isn't guaranteed to be present. Switch to /usr/bin/env bash.

Quoted 8 lines
Quoted 5 lines

Rename disassemle to disassemble in the same commit.

Adapt the correponding message in rebuild-expected-aml.

/bin/bash then - that's in the posix standard I think.

Using /usr/bin/env bash is a pretty "standard" and good practice.
https://stackoverflow.com/questions/21612980/why-is-usr-bin-env-bash-superior-to-bin-bash

Regards,
Pierrick

#3 lore raw
Quoted 9 lines · Pierrick Bouvier
Quoted 8 lines · Michael S. Tsirkin
Quoted 7 lines · Mohamed Mediouni

/usr/bin/bash isn't guaranteed to be present. Switch to /usr/bin/env bash.

Rename disassemle to disassemble in the same commit.

Adapt the correponding message in rebuild-expected-aml.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

/bin/bash then - that's in the posix standard I think.

Using /usr/bin/env bash is a pretty "standard" and good practice.
https://stackoverflow.com/questions/21612980/why-is-usr-bin-env-bash- superior-to-bin-bash

On Darwin/macOS:

$ which bash
/opt/homebrew/bin/bash

WRT QEMU source tree:

$ git grep -E '#!.?/bin/bash' | wc -l
      43
$ git grep -E '#!.?/usr/bin/env bash' | wc -l
     242
#4 lore raw
Quoted 26 lines · Philippe Mathieu-Daudé
Quoted 7 lines · Pierrick Bouvier
Quoted 6 lines · Michael S. Tsirkin
Quoted 5 lines · Mohamed Mediouni

/usr/bin/bash isn't guaranteed to be present. Switch to /usr/bin/env bash.

Rename disassemle to disassemble in the same commit.

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

Adapt the correponding message in rebuild-expected-aml.

/bin/bash then - that's in the posix standard I think.

Using /usr/bin/env bash is a pretty "standard" and good practice.
https://stackoverflow.com/questions/21612980/why-is-usr-bin-env-bash- superior-to-bin-bash

On Darwin/macOS:

$ which bash
/opt/homebrew/bin/bash
Quoted 6 lines

WRT QEMU source tree:

$ git grep -E '#!.?/bin/bash' | wc -l
     43
$ git grep -E '#!.?/usr/bin/env bash' | wc -l
    242

For reference macOS has a /bin/bash but it’s only there for legacy reasons as it’s the last pre-GPLv3 release:

% /bin/bash --version
GNU bash, version 3.2.57(1)-release (arm64-apple-darwin25) Copyright (C) 2007 Free Software Foundation, Inc.