From: Joe Lawrence <joe.lawrence@redhat.com>
To: Filipe Xavier <felipeaggger@gmail.com>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Jiri Kosina <jikos@kernel.org>, Miroslav Benes <mbenes@suse.cz>,
Petr Mladek <pmladek@suse.com>, Shuah Khan <shuah@kernel.org>,
Marcos Paulo de Souza <mpdesouza@suse.com>,
live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org, felipe_life@live.com
Subject: Re: [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers functions
Date: Mon, 24 Mar 2025 14:36:09 -0400 [thread overview]
Message-ID: <Z+GmGfcdEceUzTQc@redhat.com> (raw)
In-Reply-To: <20250318-ftrace-sftest-livepatch-v2-1-60cb0aa95cca@gmail.com>
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
next prev parent reply other threads:[~2025-03-24 18:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-18 21:20 [PATCH v2 0/2] selftests: livepatch: test if ftrace can trace a livepatched function Filipe Xavier
2025-03-18 21:20 ` [PATCH v2 1/2] selftests: livepatch: add new ftrace helpers functions Filipe Xavier
2025-03-24 18:22 ` Joe Lawrence
2025-03-24 18:36 ` Joe Lawrence [this message]
2025-03-24 22:49 ` Filipe Xavier
2025-03-18 21:20 ` [PATCH v2 2/2] selftests: livepatch: test if ftrace can trace a livepatched function Filipe Xavier
2025-03-24 18:43 ` Joe Lawrence
2025-03-21 13:13 ` [PATCH v2 0/2] " Miroslav Benes
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=Z+GmGfcdEceUzTQc@redhat.com \
--to=joe.lawrence@redhat.com \
--cc=felipe_life@live.com \
--cc=felipeaggger@gmail.com \
--cc=jikos@kernel.org \
--cc=jpoimboe@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mpdesouza@suse.com \
--cc=pmladek@suse.com \
--cc=shuah@kernel.org \
/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.