[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z+GmGfcdEceUzTQc@redhat.com>
Date: Mon, 24 Mar 2025 14:36:09 -0400
From: Joe Lawrence <joe.lawrence@...hat.com>
To: Filipe Xavier <felipeaggger@...il.com>
Cc: Josh Poimboeuf <jpoimboe@...nel.org>, Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>, Petr Mladek <pmladek@...e.com>,
Shuah Khan <shuah@...nel.org>,
Marcos Paulo de Souza <mpdesouza@...e.com>,
live-patching@...r.kernel.org, linux-kselftest@...r.kernel.org,
linux-kernel@...r.kernel.org, felipe_life@...e.com
Subject: Re: [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers
functions
On Tue, Mar 18, 2025 at 06:20:35PM -0300, Filipe Xavier wrote:
> [ ... snip ... ]
>
> + if [[ -n "$FTRACE_FILTER" ]]; then
> + echo "$FTRACE_FILTER" \
> + | sed -e "/#### all functions enabled ####/d"
> + > "$SYSFS_TRACING_DIR/set_ftrace_filter"
> + fi
Also, this may be more stylistic than a functional nit (I don't know for
sure), but shellcheck [1] seemed confused about these lines:
In tools/testing/selftests/livepatch/functions.sh line 90:
> "$SYSFS_TRACING_DIR/set_ftrace_filter"
^-- SC2188 (warning): This redirection doesn't have a command. Move to its command (or use 'true' as no-op).
I wasn't going to comment on these until I saw shellcheck note them, but
I thought shell script convention was typically to end the line with the
redirection/pipe then escape the end of line like:
commands | commands > \
tee output.txt
There are a few existing examples of this pattern if you grep the
functions.sh file for '\\$'.
That said, I'm far from certain whether which order is better than the
other. The only reason for bringing it up is that shellcheck warns on
this patch's usage.
[1] https://www.shellcheck.net/
-- Joe
Powered by blists - more mailing lists