* [PATCH v2 3/4] perf llvm-utils: remove bashism from kernel include fetch script
@ 2018-06-29 17:46 Kim Phillips
2018-07-12 14:01 ` [tip:perf/urgent] perf llvm-utils: Remove " tip-bot for Kim Phillips
0 siblings, 1 reply; 2+ messages in thread
From: Kim Phillips @ 2018-06-29 17:46 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, Alexander Shishkin,
Jiri Olsa, Namhyung Kim, Thomas Richter, Michael Petlan,
Hendrik Brückner ,
Sandipan Das
Like system(), popen() calls /bin/sh, which may/may not be bash.
Script when run on dash and encounters the line, yields:
exit: Illegal number: -1
checkbashisms report on script content:
possible bashism (exit|return with negative status code):
exit -1
Remove the bashism and use the more portable non-zero failure
status code 1.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
---
v2: new for this remove bashisms series
tools/perf/util/llvm-utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 976e658e38dc..5e94857dfca2 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -266,16 +266,16 @@ static const char *kinc_fetch_script =
"#!/usr/bin/env sh\n"
"if ! test -d \"$KBUILD_DIR\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"TMPDIR=`mktemp -d`\n"
"if test -z \"$TMPDIR\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"cat << EOF > $TMPDIR/Makefile\n"
"obj-y := dummy.o\n"
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [tip:perf/urgent] perf llvm-utils: Remove bashism from kernel include fetch script
2018-06-29 17:46 [PATCH v2 3/4] perf llvm-utils: remove bashism from kernel include fetch script Kim Phillips
@ 2018-07-12 14:01 ` tip-bot for Kim Phillips
0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Kim Phillips @ 2018-07-12 14:01 UTC (permalink / raw)
To: linux-tip-commits
Cc: namhyung, acme, kim.phillips, jolsa, linux-kernel, tglx,
brueckner, mpetlan, tmricht, hpa, peterz, alexander.shishkin,
mingo, sandipan
Commit-ID: f6432b9f65001651412dbc3589d251534822d4ab
Gitweb: https://git.kernel.org/tip/f6432b9f65001651412dbc3589d251534822d4ab
Author: Kim Phillips <kim.phillips@arm.com>
AuthorDate: Fri, 29 Jun 2018 12:46:52 -0500
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 11 Jul 2018 10:01:51 -0300
perf llvm-utils: Remove bashism from kernel include fetch script
Like system(), popen() calls /bin/sh, which may/may not be bash.
Script when run on dash and encounters the line, yields:
exit: Illegal number: -1
checkbashisms report on script content:
possible bashism (exit|return with negative status code):
exit -1
Remove the bashism and use the more portable non-zero failure
status code 1.
Signed-off-by: Kim Phillips <kim.phillips@arm.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sandipan Das <sandipan@linux.vnet.ibm.com>
Cc: Thomas Richter <tmricht@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20180629124652.8d0af7e2281fd3fd8262cacc@arm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/llvm-utils.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tools/perf/util/llvm-utils.c b/tools/perf/util/llvm-utils.c
index 976e658e38dc..5e94857dfca2 100644
--- a/tools/perf/util/llvm-utils.c
+++ b/tools/perf/util/llvm-utils.c
@@ -266,16 +266,16 @@ static const char *kinc_fetch_script =
"#!/usr/bin/env sh\n"
"if ! test -d \"$KBUILD_DIR\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"if ! test -f \"$KBUILD_DIR/include/generated/autoconf.h\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"TMPDIR=`mktemp -d`\n"
"if test -z \"$TMPDIR\"\n"
"then\n"
-" exit -1\n"
+" exit 1\n"
"fi\n"
"cat << EOF > $TMPDIR/Makefile\n"
"obj-y := dummy.o\n"
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-12 14:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-06-29 17:46 [PATCH v2 3/4] perf llvm-utils: remove bashism from kernel include fetch script Kim Phillips
2018-07-12 14:01 ` [tip:perf/urgent] perf llvm-utils: Remove " tip-bot for Kim Phillips
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).