ktest.pl: Fix the logic for truncating the size of the log file for email
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Mon, 30 Nov 2020 21:38:41 +0000 (16:38 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Dec 2020 12:30:06 +0000 (13:30 +0100)
commit2902e302991a4dacd155658bcb3053e4d6b7d4a0
tree0d364bcd8a5b72f20a15c429bf48e79400ae609e
parent4e282a8dff800c535a5828dc7d2e46cb18ddbc18
ktest.pl: Fix the logic for truncating the size of the log file for email

commit 170f4869e66275f498ae4736106fb54c0fdcd036 upstream.

The logic for truncating the log file for emailing based on the
MAIL_MAX_SIZE option is confusing and incorrect. Simplify it and have the
tail of the log file truncated to the max size specified in the config.

Cc: stable@vger.kernel.org
Fixes: 855d8abd2e8ff ("ktest.pl: Change the logic to control the size of the log file emailed")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tools/testing/ktest/ktest.pl