Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Filipe Xavier <felipeaggger@gmail.com>
To: Joe Lawrence <joe.lawrence@redhat.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 19:49:50 -0300	[thread overview]
Message-ID: <135e8686-1eaf-44d7-a547-1c9611f7f180@gmail.com> (raw)
In-Reply-To: <Z+GmGfcdEceUzTQc@redhat.com>

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


  reply	other threads:[~2025-03-24 22:49 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
2025-03-24 22:49     ` Filipe Xavier [this message]
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=135e8686-1eaf-44d7-a547-1c9611f7f180@gmail.com \
    --to=felipeaggger@gmail.com \
    --cc=felipe_life@live.com \
    --cc=jikos@kernel.org \
    --cc=joe.lawrence@redhat.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox