Message ID | 20201218164522.337181702@goodmis.org |
---|---|
State | Accepted |
Commit | 8cd6bc0359deebd8500e6de95899a8a78d3ec4ba |
Headers | show |
Series | [for-linus,1/2] ktest.pl: If size of log is too big to email, email error message | expand |
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 54188ee16c48..54f7d008e840 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl @@ -4253,7 +4253,12 @@ sub do_send_mail { $mail_command =~ s/\$SUBJECT/$subject/g; $mail_command =~ s/\$MESSAGE/$message/g; - run_command $mail_command; + my $ret = run_command $mail_command; + if (!$ret && defined($file)) { + # try again without the file + $message .= "\n\n*** FAILED TO SEND LOG ***\n\n"; + do_send_email($subject, $message); + } } sub send_email {