* [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
@ 2025-12-27 4:18 Fushuai Wang
2026-01-07 3:49 ` Fushuai Wang
0 siblings, 1 reply; 8+ messages in thread
From: Fushuai Wang @ 2025-12-27 4:18 UTC (permalink / raw)
To: rostedt, mhiramat, mathieu.desnoyers, shuah, wangfushuai
Cc: linux-kernel, linux-trace-kernel, linux-kselftest, Fushuai Wang
When /sys/kernel/tracing/buffer_size_kb is less than 12KB,
the test_multiple_writes test will stall and wait for more
input due to insufficient buffer space.
Check current buffer_size_kb value before the test. If it is
less than 12KB, it temporarily increase the buffer to 12KB,
and restore the original value after the tests are completed.
Fixes: 37f46601383a ("selftests/tracing: Add basic test for trace_marker_raw file")
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
---
V1 -> V2: Restore buffer_size_kb outside of awk script.
.../ftrace/test.d/00basic/trace_marker_raw.tc | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
index 7daf7292209e..a2c42e13f614 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/trace_marker_raw.tc
@@ -89,6 +89,7 @@ test_buffer() {
# The id must be four bytes, test that 3 bytes fails a write
if echo -n abc > ./trace_marker_raw ; then
echo "Too small of write expected to fail but did not"
+ echo ${ORIG} > buffer_size_kb
exit_fail
fi
@@ -99,9 +100,24 @@ test_buffer() {
if write_buffer 0xdeadbeef $size ; then
echo "Too big of write expected to fail but did not"
+ echo ${ORIG} > buffer_size_kb
exit_fail
fi
}
+ORIG=`cat buffer_size_kb`
+
+# test_multiple_writes test needs at least 12KB buffer
+NEW_SIZE=12
+
+if [ ${ORIG} -lt ${NEW_SIZE} ]; then
+ echo ${NEW_SIZE} > buffer_size_kb
+fi
+
test_buffer
-test_multiple_writes
+if ! test_multiple_writes; then
+ echo ${ORIG} > buffer_size_kb
+ exit_fail
+fi
+
+echo ${ORIG} > buffer_size_kb
--
2.36.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2025-12-27 4:18 [PATCH v2] selftests/tracing: Fix test_multiple_writes stall Fushuai Wang
@ 2026-01-07 3:49 ` Fushuai Wang
2026-01-07 15:18 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Fushuai Wang @ 2026-01-07 3:49 UTC (permalink / raw)
To: fushuai.wang
Cc: linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, rostedt, shuah, wangfushuai
> When /sys/kernel/tracing/buffer_size_kb is less than 12KB,
> the test_multiple_writes test will stall and wait for more
> input due to insufficient buffer space.
>
> Check current buffer_size_kb value before the test. If it is
> less than 12KB, it temporarily increase the buffer to 12KB,
> and restore the original value after the tests are completed.
>
> Fixes: 37f46601383a ("selftests/tracing: Add basic test for trace_marker_raw file")
> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Gentle ping.
---
Regards,
WANG
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-07 3:49 ` Fushuai Wang
@ 2026-01-07 15:18 ` Steven Rostedt
2026-01-08 18:27 ` Shuah
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2026-01-07 15:18 UTC (permalink / raw)
To: Fushuai Wang
Cc: linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, shuah, wangfushuai, Shuah Khan
On Wed, 7 Jan 2026 11:49:14 +0800
Fushuai Wang <fushuai.wang@linux.dev> wrote:
> > When /sys/kernel/tracing/buffer_size_kb is less than 12KB,
> > the test_multiple_writes test will stall and wait for more
> > input due to insufficient buffer space.
> >
> > Check current buffer_size_kb value before the test. If it is
> > less than 12KB, it temporarily increase the buffer to 12KB,
> > and restore the original value after the tests are completed.
> >
> > Fixes: 37f46601383a ("selftests/tracing: Add basic test for trace_marker_raw file")
> > Suggested-by: Steven Rostedt <rostedt@goodmis.org>
> > Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
>
> Gentle ping.
>
Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Shuah,
Care to take this through your tree? It does fix a bug so it likely should
go into the rc releases and not wait for the next merge window.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-07 15:18 ` Steven Rostedt
@ 2026-01-08 18:27 ` Shuah
2026-01-08 19:48 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Shuah @ 2026-01-08 18:27 UTC (permalink / raw)
To: Steven Rostedt, Fushuai Wang
Cc: linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, shuah, wangfushuai, Shuah Khan
On 1/7/26 08:18, Steven Rostedt wrote:
> On Wed, 7 Jan 2026 11:49:14 +0800
> Fushuai Wang <fushuai.wang@linux.dev> wrote:
>
>>> When /sys/kernel/tracing/buffer_size_kb is less than 12KB,
>>> the test_multiple_writes test will stall and wait for more
>>> input due to insufficient buffer space.
>>>
>>> Check current buffer_size_kb value before the test. If it is
>>> less than 12KB, it temporarily increase the buffer to 12KB,
>>> and restore the original value after the tests are completed.
>>>
>>> Fixes: 37f46601383a ("selftests/tracing: Add basic test for trace_marker_raw file")
>>> Suggested-by: Steven Rostedt <rostedt@goodmis.org>
>>> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
>>
>> Gentle ping.
>>
>
> Acked-by: Steven Rostedt (Google) <rostedt@goodmis.org>
>
> Shuah,
>
> Care to take this through your tree? It does fix a bug so it likely should
> go into the rc releases and not wait for the next merge window.
>
Yes I can take this through and send this for rc5 or rc6.
But first the following warning needs fixing before I can
apply the patch
WARNING: From:/Signed-off-by: email address mismatch: 'From: Fushuai Wang <fushuai.wang@linux.dev>' != 'Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>'
Fushuai, please send me v3
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-08 18:27 ` Shuah
@ 2026-01-08 19:48 ` Steven Rostedt
2026-01-08 21:03 ` Shuah Khan
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2026-01-08 19:48 UTC (permalink / raw)
To: Shuah
Cc: Fushuai Wang, linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, wangfushuai, Shuah Khan
On Thu, 8 Jan 2026 11:27:26 -0700
Shuah <shuah@kernel.org> wrote:
> Yes I can take this through and send this for rc5 or rc6.
> But first the following warning needs fixing before I can
> apply the patch
>
> WARNING: From:/Signed-off-by: email address mismatch: 'From: Fushuai Wang <fushuai.wang@linux.dev>' != 'Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>'
Hmm, do emails have to match? There's times I used a different SoB than the
From. The From is different than the SoB. The important part I found was to
make sure the name is the same. But I didn't think the email address was
important. And this will become more of an issue, as gmail blocks my
goodmis.org account, so I send with my kernel.org account when my goodmis
is the only one I sign off with. Thus this restriction will fail for me on
my patches.
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-08 19:48 ` Steven Rostedt
@ 2026-01-08 21:03 ` Shuah Khan
2026-01-08 21:52 ` Steven Rostedt
0 siblings, 1 reply; 8+ messages in thread
From: Shuah Khan @ 2026-01-08 21:03 UTC (permalink / raw)
To: Steven Rostedt, Shuah
Cc: Fushuai Wang, linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, wangfushuai, Shuah Khan
On 1/8/26 12:48, Steven Rostedt wrote:
> On Thu, 8 Jan 2026 11:27:26 -0700
> Shuah <shuah@kernel.org> wrote:
>
>> Yes I can take this through and send this for rc5 or rc6.
>> But first the following warning needs fixing before I can
>> apply the patch
>>
>> WARNING: From:/Signed-off-by: email address mismatch: 'From: Fushuai Wang <fushuai.wang@linux.dev>' != 'Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>'
>
> Hmm, do emails have to match? There's times I used a different SoB than the
> From. The From is different than the SoB. The important part I found was to
> make sure the name is the same. But I didn't think the email address was
> important. And this will become more of an issue, as gmail blocks my
> goodmis.org account, so I send with my kernel.org account when my goodmis
> is the only one I sign off with. Thus this restriction will fail for me on
> my patches.
I go by the warning - I don't take patches unless From address
matches the SoB.
thanks,
-- Shuah
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-08 21:03 ` Shuah Khan
@ 2026-01-08 21:52 ` Steven Rostedt
2026-01-09 3:27 ` Fushuai Wang
0 siblings, 1 reply; 8+ messages in thread
From: Steven Rostedt @ 2026-01-08 21:52 UTC (permalink / raw)
To: Shuah Khan
Cc: Shuah, Fushuai Wang, linux-kernel, linux-kselftest,
linux-trace-kernel, mathieu.desnoyers, mhiramat, wangfushuai
On Thu, 8 Jan 2026 14:03:31 -0700
Shuah Khan <skhan@linuxfoundation.org> wrote:
> On 1/8/26 12:48, Steven Rostedt wrote:
> > On Thu, 8 Jan 2026 11:27:26 -0700
> > Shuah <shuah@kernel.org> wrote:
> >
> >> Yes I can take this through and send this for rc5 or rc6.
> >> But first the following warning needs fixing before I can
> >> apply the patch
> >>
> >> WARNING: From:/Signed-off-by: email address mismatch: 'From: Fushuai Wang <fushuai.wang@linux.dev>' != 'Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>'
> >
> > Hmm, do emails have to match? There's times I used a different SoB than the
> > From. The From is different than the SoB. The important part I found was to
> > make sure the name is the same. But I didn't think the email address was
> > important. And this will become more of an issue, as gmail blocks my
> > goodmis.org account, so I send with my kernel.org account when my goodmis
> > is the only one I sign off with. Thus this restriction will fail for me on
> > my patches.
>
> I go by the warning - I don't take patches unless From address
> matches the SoB.
I guess my patches would then fail your requirements ;-)
Anyway, Fushuai, you can add to the top of your commit:
From: Fushuai Wang <wangfushuai@baidu.com>
and that will make the From and SoB match without having to change your
mail client. I usually have that. Because Linus doesn't like my patches
having my company name in it for the "author" but I have it in the SoB to
give credit to the one paying me to do the work.
-- Steve
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v2] selftests/tracing: Fix test_multiple_writes stall
2026-01-08 21:52 ` Steven Rostedt
@ 2026-01-09 3:27 ` Fushuai Wang
0 siblings, 0 replies; 8+ messages in thread
From: Fushuai Wang @ 2026-01-09 3:27 UTC (permalink / raw)
To: rostedt
Cc: fushuai.wang, linux-kernel, linux-kselftest, linux-trace-kernel,
mathieu.desnoyers, mhiramat, shuah, skhan, wangfushuai
> Anyway, Fushuai, you can add to the top of your commit:
>
> From: Fushuai Wang <wangfushuai@baidu.com>
>
> and that will make the From and SoB match without having to change your
> mail client. I usually have that. Because Linus doesn't like my patches
> having my company name in it for the "author" but I have it in the SoB to
> give credit to the one paying me to do the work.
Thanks!
I will send a v3 shortly.
---
Regards,
WANG
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-01-09 3:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-27 4:18 [PATCH v2] selftests/tracing: Fix test_multiple_writes stall Fushuai Wang
2026-01-07 3:49 ` Fushuai Wang
2026-01-07 15:18 ` Steven Rostedt
2026-01-08 18:27 ` Shuah
2026-01-08 19:48 ` Steven Rostedt
2026-01-08 21:03 ` Shuah Khan
2026-01-08 21:52 ` Steven Rostedt
2026-01-09 3:27 ` Fushuai Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox