[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <135e8686-1eaf-44d7-a547-1c9611f7f180@gmail.com>
Date: Mon, 24 Mar 2025 19:49:50 -0300
From: Filipe Xavier <felipeaggger@...il.com>
To: Joe Lawrence <joe.lawrence@...hat.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 3/24/25 3:36 PM, Joe Lawrence wrote:
> 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
Thanks for review Joe, I'm sending a new version with all the fixes.
Cheers
Filipe
Powered by blists - more mailing lists