All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: linux-trace-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/7] tracing: Parse filter from boot event string
Date: Tue, 08 Sep 2026 06:35:35 +0000	[thread overview]
Message-ID: <20260908063536.D3A4E1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260908-tracing-cli-event-filter-v2-7-05396a3fb663@linutronix.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Implicit pointer-to-bool conversion in `trace_events_test.c` prevents testing `handle_filter=true` without a filter.
--

commit 125cd0f8d3ca4f597f1025a42dc567d0ce8c0b36
Author: Thomas Weißschuh <thomas.weissschuh@linutronix.de>

tracing: Parse filter from boot event string

This patch enables specifying a trace event filter from the kernel command
line by parsing the :filter: keyword in the boot event string. It updates
the trace event parsing logic and the associated kunit tests to handle
the new syntax.

> diff --git a/kernel/trace/trace_events_test.c b/kernel/trace/trace_events_test.c
> --- a/kernel/trace/trace_events_test.c
> +++ b/kernel/trace/trace_events_test.c

[ ... ]

> @@ -72,18 +91,19 @@ KUNIT_ARRAY_PARAM(parse_event_string, parse_event_string_test_cases, parse_event
>  static void parse_event_string(struct kunit *test)
>  {
>  	const struct parse_event_string_test_case *params = test->param_value;
> -	char *input, *match, *sub, *event, *mod;
> +	char *input, *match, *sub, *event, *mod, *filter;
>  
>  	input = kunit_kstrdup(test, params->input, GFP_KERNEL);
>  	if (!input)
>  		kunit_skip(test, "ENOMEM");
>  
> -	ftrace_parse_event_string(input, &match, &sub, &event, &mod);
> +	ftrace_parse_event_string(input, &match, &sub, &event, &mod, params->filter, &filter);

[Severity: Low]
Does this pass params->filter (a const char pointer) to the bool handle_filter
argument of ftrace_parse_event_string()? 

This implicitly casts the pointer to a boolean, meaning handle_filter is only
true when a filter string is expected in the test case output. 

Consequently, could the test suite miss coverage for the common early boot
path where handle_filter is set to true, but no :filter: keyword is actually
present in the input string?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908-tracing-cli-event-filter-v2-0-05396a3fb663@linutronix.de?part=7

      reply	other threads:[~2026-09-08  6:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08  6:22 [PATCH v2 0/7] tracing: Parse filter from boot event string Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 1/7] tracing: Restore :mod: trailer after parsing in ftrace_set_clr_event() Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 2/7] tracing: Remove duplicate declaration of ftrace_set_clr_event() Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 3/7] tracing: Stop modifying the input buffer in ftrace_set_clr_event() Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 4/7] tracing: Split the event string parsing logic into a dedicated function Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 5/7] tracing: Add a test for ftrace_parse_event_string() Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 6/7] tracing: Add a filter argument to __ftrace_set_clr_event() Thomas Weißschuh
2026-09-08  6:22 ` [PATCH v2 7/7] tracing: Parse filter from boot event string Thomas Weißschuh
2026-09-08  6:35   ` sashiko-bot [this message]

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=20260908063536.D3A4E1F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=thomas.weissschuh@linutronix.de \
    /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.