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>