From: Collin Funk <collin.funk1@gmail.com>
To: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
"Liang, Kan" <kan.liang@linux.intel.com>,
James Clark <james.clark@linaro.org>,
Charlie Jenkins <charlie@rivosinc.com>,
Ravi Bangoria <ravi.bangoria@amd.com>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] perf build: Specify that shellcheck should use the bash dialect.
Date: Fri, 27 Jun 2025 20:35:02 -0700 [thread overview]
Message-ID: <87a55sles9.fsf@gmail.com> (raw)
In-Reply-To: <aF2Fx-cYy6B69d4S@google.com>
Hi Namhyung,
Namhyung Kim <namhyung@kernel.org> writes:
> This caused a trouble on a test environment where 'which' (and
> 'shellcheck' as well) is not available. Now it makes SHELLCHECK
> non-empty unconditionally.
>
> So the version check below failed like below:
>
> make[1]: which: No such file or directory
> /bin/sh: - : invalid option
> Usage: /bin/sh [GNU long option] [option] ...
> /bin/sh [GNU long option] [option] script-file ...
> GNU long options:
> --debug
> --debugger
> --dump-po-strings
> --dump-strings
> --help
> --init-file
> --login
> --noediting
> --noprofile
> --norc
> --posix
> --pretty-print
> --rcfile
> --rpm-requires
> --restricted
> --verbose
> --version
> Shell options:
> -ilrsD or -c command or -O shopt_option (invocation only)
> -abefhkmnptuvxBCEHPT or -o option
> expr: syntax error: unexpected argument ‘060’
>
> And it failed to build later on shellchecks.
>
> TEST /build/arch/x86/tests/gen-insn-x86-dat.sh.shellcheck_log
> /bin/sh: line 1: -s: command not found
> make[6]: *** [arch/x86/tests/Build:25: /build/arch/x86/tests/gen-insn-x86-dat.sh.shellcheck_log] Error 1
> make[6]: *** Waiting for unfinished jobs....
>
> I think it's better to convert 'which' to 'command -v' (in other places
> too) and add the options after the version check.
Oops, I assumed that on a system without shellcheck NO_SHELLCHECK would
be defined. Let me write another version.
I think the 'command -v' change is best left for a separate patch(s).
Since it is used in many other places, and maybe others will raise
objections.
Collin
next prev parent reply other threads:[~2025-06-28 3:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-13 3:36 [PATCH] perf build: Specify that spellcheck should use the bash dialect Collin Funk
2025-06-19 10:28 ` James Clark
2025-06-20 17:40 ` Collin Funk
2025-06-23 8:10 ` James Clark
2025-06-23 16:37 ` Ian Rogers
2025-06-24 2:08 ` Collin Funk
2025-06-20 19:49 ` Namhyung Kim
2025-06-23 8:08 ` James Clark
2025-06-24 2:05 ` [PATCH v2] [PATCH] perf build: Specify that shellcheck " Collin Funk
2025-06-24 5:21 ` Ian Rogers
2025-06-24 5:51 ` Collin Funk
2025-06-24 5:44 ` [PATCH v3] " Collin Funk
2025-06-24 9:37 ` James Clark
2025-06-26 17:39 ` Namhyung Kim
2025-06-28 3:35 ` Collin Funk [this message]
2025-06-28 3:49 ` Collin Funk
2025-06-28 3:41 ` [PATCH v4] " Collin Funk
2025-07-01 17:55 ` Namhyung Kim
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=87a55sles9.fsf@gmail.com \
--to=collin.funk1@gmail.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=charlie@rivosinc.com \
--cc=irogers@google.com \
--cc=james.clark@linaro.org \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=ravi.bangoria@amd.com \
/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.