* [LTP] [PATCH 0/2] Travis build fixes
@ 2020-12-17 12:15 Petr Vorel
2020-12-17 12:15 ` [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash Petr Vorel
2020-12-17 12:15 ` [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path Petr Vorel
0 siblings, 2 replies; 7+ messages in thread
From: Petr Vorel @ 2020-12-17 12:15 UTC (permalink / raw)
To: ltp
Hi,
FYI only first commit is required to fix travis failures.
Kind regards,
Petr
Petr Vorel (2):
docparse/parse.sh: Fix parsing on dash
docparse/parse.sh: Fix running with relative path
docparse/parse.sh | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
2.29.2
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash
2020-12-17 12:15 [LTP] [PATCH 0/2] Travis build fixes Petr Vorel
@ 2020-12-17 12:15 ` Petr Vorel
2020-12-17 12:20 ` Cyril Hrubis
2020-12-17 12:15 ` [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path Petr Vorel
1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2020-12-17 12:15 UTC (permalink / raw)
To: ltp
bash keeps escape sequences (e.g. \t and \n) when using echo:
$ a="-v\tverbose output\n"; echo "$a"
-v\tverbose output\n
$
But dash interprets them (behaves like echo -e on bash):
$ a="-v\tverbose output\n"; echo -e "$a"
-e -v verbose output
$
Using printf does not help, because it'd have to be separated with --
which cannot be used for printing variables.
Fortunately cat << EOF redirection is portable.
In the future we should probably avoid shell as much as possible.
Fixes: 0962c9a37 ("syscalls/perf_event_open02: Use anonymous .options")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
docparse/parse.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/docparse/parse.sh b/docparse/parse.sh
index 4ae0c42b2..172eab702 100755
--- a/docparse/parse.sh
+++ b/docparse/parse.sh
@@ -32,7 +32,9 @@ for test in `find testcases/ -name '*.c'`; do
echo ','
fi
first=
- echo -n "$a"
+ cat <<EOF
+$a
+EOF
fi
done
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path
2020-12-17 12:15 [LTP] [PATCH 0/2] Travis build fixes Petr Vorel
2020-12-17 12:15 ` [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash Petr Vorel
@ 2020-12-17 12:15 ` Petr Vorel
2020-12-17 12:22 ` Cyril Hrubis
1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2020-12-17 12:15 UTC (permalink / raw)
To: ltp
that's not needed for build, but useful for debugging.
Running as ./parse.sh fails:
cat: ./../VERSION: No such file or directory
top_srcdir must be absolute path.
Fixes: a069cd36b ("docparse: Add test documentation parser")
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
docparse/parse.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docparse/parse.sh b/docparse/parse.sh
index 172eab702..79011bc10 100755
--- a/docparse/parse.sh
+++ b/docparse/parse.sh
@@ -5,7 +5,7 @@
set -e
top_builddir=$PWD/..
-top_srcdir="$(dirname $0)/.."
+top_srcdir="$(cd $(dirname $0)/..; pwd)"
cd $top_srcdir
--
2.29.2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash
2020-12-17 12:15 ` [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash Petr Vorel
@ 2020-12-17 12:20 ` Cyril Hrubis
2020-12-17 12:36 ` Petr Vorel
2020-12-17 12:58 ` Petr Vorel
0 siblings, 2 replies; 7+ messages in thread
From: Cyril Hrubis @ 2020-12-17 12:20 UTC (permalink / raw)
To: ltp
Hi!
> bash keeps escape sequences (e.g. \t and \n) when using echo:
>
> $ a="-v\tverbose output\n"; echo "$a"
> -v\tverbose output\n
> $
>
> But dash interprets them (behaves like echo -e on bash):
>
> $ a="-v\tverbose output\n"; echo -e "$a"
> -e -v verbose output
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Can we remove the \t from the perf_event_open02.c as well please? I
doubt that it will do any good when we pass the strings into asciidoc
parser...
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path
2020-12-17 12:15 ` [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path Petr Vorel
@ 2020-12-17 12:22 ` Cyril Hrubis
0 siblings, 0 replies; 7+ messages in thread
From: Cyril Hrubis @ 2020-12-17 12:22 UTC (permalink / raw)
To: ltp
Hi!
> that's not needed for build, but useful for debugging.
>
> Running as ./parse.sh fails:
> cat: ./../VERSION: No such file or directory
>
> top_srcdir must be absolute path.
>
> Fixes: a069cd36b ("docparse: Add test documentation parser")
>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> docparse/parse.sh | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/docparse/parse.sh b/docparse/parse.sh
> index 172eab702..79011bc10 100755
> --- a/docparse/parse.sh
> +++ b/docparse/parse.sh
> @@ -5,7 +5,7 @@
> set -e
>
> top_builddir=$PWD/..
> -top_srcdir="$(dirname $0)/.."
> +top_srcdir="$(cd $(dirname $0)/..; pwd)"
>
> cd $top_srcdir
Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash
2020-12-17 12:20 ` Cyril Hrubis
@ 2020-12-17 12:36 ` Petr Vorel
2020-12-17 12:58 ` Petr Vorel
1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2020-12-17 12:36 UTC (permalink / raw)
To: ltp
> Hi!
> > bash keeps escape sequences (e.g. \t and \n) when using echo:
> > $ a="-v\tverbose output\n"; echo "$a"
> > -v\tverbose output\n
> > $
> > But dash interprets them (behaves like echo -e on bash):
> > $ a="-v\tverbose output\n"; echo -e "$a"
> > -e -v verbose output
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Thanks for both reviews!
> Can we remove the \t from the perf_event_open02.c as well please? I
> doubt that it will do any good when we pass the strings into asciidoc
> parser...
Sure, I'll replace it with <tab>.
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
* [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash
2020-12-17 12:20 ` Cyril Hrubis
2020-12-17 12:36 ` Petr Vorel
@ 2020-12-17 12:58 ` Petr Vorel
1 sibling, 0 replies; 7+ messages in thread
From: Petr Vorel @ 2020-12-17 12:58 UTC (permalink / raw)
To: ltp
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Both patches merged, thanks!
Kind regards,
Petr
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-12-17 12:58 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-17 12:15 [LTP] [PATCH 0/2] Travis build fixes Petr Vorel
2020-12-17 12:15 ` [LTP] [PATCH 1/2] docparse/parse.sh: Fix parsing on dash Petr Vorel
2020-12-17 12:20 ` Cyril Hrubis
2020-12-17 12:36 ` Petr Vorel
2020-12-17 12:58 ` Petr Vorel
2020-12-17 12:15 ` [LTP] [PATCH 2/2] docparse/parse.sh: Fix running with relative path Petr Vorel
2020-12-17 12:22 ` Cyril Hrubis
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.