From: David Gibson <david-xT8FGy+AXnRB3Ne2BGzF6laj5H9X9Tb+@public.gmane.org>
To: Tero Tervala <tero.tervala-ddXEi6N5mqbQT0dZR+AlfA@public.gmane.org>
Cc: devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2] Fix test script to run also on dash shell
Date: Tue, 26 Jul 2022 21:40:54 +1000 [thread overview]
Message-ID: <Yt/SxshGCTRLIiTS@yekko> (raw)
In-Reply-To: <20220704073722.1075849-1-tero.tervala-ddXEi6N5mqbQT0dZR+AlfA@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2149 bytes --]
On Mon, Jul 04, 2022 at 10:37:22AM +0300, Tero Tervala wrote:
> /bin/sh points to dash instead of bash in some linux distros.
> One test would fail if dash was used, this fix will allow all tests
> to run properly on dash too.
>
> dash built-in printf does not support "\xNN" -hex escape format.
> "\NNN" -octal escape format is supported by both bash and dash printf.
>
> Replaced "$(echo "$expect")" because this actually runs /bin/echo
> instead of shell internal echo and in some cases causes "\NNN" escapes
> to be printed as the actual characters they represent instead of the
> escape sequence itself.
>
> Cosmetic quotes added to make printout a bit clearer.
>
> Signed-off-by: Tero Tervala <tero.tervala-ddXEi6N5mqbQT0dZR+AlfA@public.gmane.org>
Applied, thanks.
Sorry it took so long.
> ---
> tests/run_tests.sh | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> index c78351d..1b16eb8 100755
> --- a/tests/run_tests.sh
> +++ b/tests/run_tests.sh
> @@ -195,7 +195,7 @@ asm_to_so_test () {
> run_fdtget_test () {
> expect="$1"
> shift
> - printf "fdtget-runtest.sh %s $*: " "$(echo $expect)"
> + printf "fdtget-runtest.sh \"%s\" $*: " "$expect"
> base_run_test sh "$SRCDIR/fdtget-runtest.sh" "$expect" "$@"
> }
>
> @@ -862,7 +862,7 @@ fdtget_tests () {
> run_fdtget_test "61 62 63 0" -tbx $dtb /randomnode tricky1
> run_fdtget_test "a b c d de ea ad be ef" -tbx $dtb /randomnode blob
> run_fdtget_test "MyBoardName\0MyBoardFamilyName\0" -tr $dtb / compatible
> - run_fdtget_test "\x0a\x0b\x0c\x0d\xde\xea\xad\xbe\xef" -tr $dtb /randomnode blob
> + run_fdtget_test "\012\013\014\015\336\352\255\276\357" -tr $dtb /randomnode blob
>
> # Here the property size is not a multiple of 4 bytes, so it should fail
> run_wrap_error_test $DTGET -tlx $dtb /randomnode mixed
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2022-07-26 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-04 7:37 [PATCH v2] Fix test script to run also on dash shell Tero Tervala
[not found] ` <20220704073722.1075849-1-tero.tervala-ddXEi6N5mqbQT0dZR+AlfA@public.gmane.org>
2022-07-26 11:40 ` David Gibson [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=Yt/SxshGCTRLIiTS@yekko \
--to=david-xt8fgy+axnrb3ne2bgzf6laj5h9x9tb+@public.gmane.org \
--cc=devicetree-compiler-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tero.tervala-ddXEi6N5mqbQT0dZR+AlfA@public.gmane.org \
/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.