Thread (9 messages) 9 messages, 2 authors, 22d ago

Re: [PATCH v2 7/7] tracing: Parse filter from boot event string

From: sashiko-bot@kernel.org
Date: 2026-09-08 06:35:37

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 [off-list ref]

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.
quoted hunk ↗ jump to hunk
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
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help