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

Thomas Richter
2025-11-19T07:56:14Z

On 11/18/25 19:30, Jan Polensky wrote:
> On Mon, Nov 17, 2025 at 01:43:59PM +0100, Thomas Richter wrote:
>> The following test case fails on linux-next repo:
>>
> ---8<--- snip ---8<---
>> #
>>
>> Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
>> ---
>> tools/perf/tests/shell/trace_btf_general.sh | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/tests/shell/trace_btf_general.sh b/tools/perf/tests/shell/trace_btf_general.sh
>> index ef2da806be6b..9cd6180062d8 100755
>> --- a/tools/perf/tests/shell/trace_btf_general.sh
>> +++ b/tools/perf/tests/shell/trace_btf_general.sh
>> @@ -39,7 +39,7 @@ trace_test_buffer() {
>> echo "Testing perf trace's buffer augmentation"
>> # echo will insert a newline (\10) at the end of the buffer
>> output="$(perf trace --sort-events -e write --max-events=1 -- echo "${buffer}" 2>&1)"
>> - if ! echo "$output" | grep -q -E "^echo/[0-9]+ write\([0-9]+, ${buffer}.*, [0-9]+\) += +[0-9]+$"
>> + if ! echo "$output" | grep -qE "^echo/[0-9]+ write\([0-9]+, ${buffer}\\\\10, [0-9]+(, ..)?\) += +[0-9]+$"
>> then
>> printf "Buffer augmentation test failed, output:\n$output\n"
>> err=1
> ---------------8<---------------
> Tested-by: Jan Polensky <japo@linux.ibm.com>
> Reviewed-by: Jan Polensky <japo@linux.ibm.com>
>
> Thank you Thomas
>
> Nit: maybe `(, \"\")?` instead of `(, ..)?` for clarity?
>

Thanks will do it.

--
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