Re: [PATCH Linux-next] perf test: Fix test case perf trace BTF general tests

Thomas Richter
2025-11-27T06:28:53Z

On 11/26/25 16:24, Steven Rostedt wrote:
> On Wed, 26 Nov 2025 08:13:00 +0100
> Thomas Richter <tmricht@linux.ibm.com> wrote:
>
>>>> I haven't tried it without the patches. Does it usually show what "buf" is?
>>>> Now with the reading of user space, it can show the content too!
>>>
>>> Yep, it reads the content using BPF. This is on my 6.16 kernel.
>>>
>>> $ sudo perf trace -e write -- /bin/echo hello
>>> hello
>>> 0.000 ( 0.014 ms): echo/61922 write(fd: 1, buf: hello\10, count: 6) = 6
>>>
>>> Thanks,
>>> Namhyung
>>>
>>>
>>
>> Hello Namhyung, Steven,
>>
>> friendly ping... any progress here?
>>
>
> I honestly have no clue how to fix this, as I don't even know where to
> look. Is it BPF that is messing up? If so, where's the BPF program that is
> doing this.

Yeah, sounds very familiar... happens to me all the time :-)>
> I thought BPF is supposed to handle updates and should never cause API
> breakage?
>
> I'll continue to look at the builtin-trace.c, but it seems that the BPF
> program it's attached to is handing it garbage with:
>
> perf trace -e syscalls:sys_enter_write
>
> The new fields are at the end. The BPF program should simply ignore those
> values. But again, I don't know where this BPF program lives.
>
> -- Steve
Ok, this sounds that the issue will linger around for some time.

Can we then adopt the test case check for perf test case 'perf trace BTF general tests'
to accept that strange 4th parameter?
Right now this test fails on a daily basis in linux-next and will most likely be in linux repo
soon, where it will also fail.

This is sort of 'unfortunate' that our daily continuous integration testing reports several errors
per day...
If you guys object to that fix I sent out a few days ago (which is absolutely ok),
I will disable the test in our CI test suite.

Thanks a lot.
--
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
IBM Deutschland Research & Development GmbH

Vorsitzender des Aufsichtsrats: Wolfgang Wendt

Geschäftsführung: David Faller

Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294