Re: [PATCH] selftests/ftrace: Limit number of lines processed in 'trace'

From: Shuah Khan
Date: Tue Oct 18 2022 - 18:41:34 EST


On 10/17/22 04:55, Naveen N. Rao wrote:
On very large machines, ftracetest can seem to hang or otherwise take a
very long time to complete individual tests. This can be attributed to
statements that try to process the entire contents of 'trace'.

Limit the number of lines processed from 'trace' to resolve this. Apart
from the change in test.d/functions to add TRACENL, this commit is the
result of running the below command (and fixing some whitespace errors):
grep -l -R 'cat trace |' -- ./tools/testing/selftests/ftrace/test.d/ | \
xargs -n 1 sed --in-place -e "s/cat trace |/head -\$\{TRACENL\} trace |/g"

Reported-by: Akanksha J N <akanksha@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Naveen N. Rao <naveen.n.rao@xxxxxxxxxxxxxxxxxx>

Please cc linux-kselftest list on all selftest patches.

thanks,
-- Shuah