lkml.org 
[lkml]   [2018]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[for-next][PATCH 22/23] ktest.pl: Use run_command to execute sending mail
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

Instead of open coding system() call, use run_command which will log the
sending of email as well.

Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
tools/testing/ktest/ktest.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl
index ac6750bb5942..f487f91ccf03 100755
--- a/tools/testing/ktest/ktest.pl
+++ b/tools/testing/ktest/ktest.pl
@@ -4135,12 +4135,12 @@ sub set_test_option {

sub _mailx_send {
my ($subject, $message) = @_;
- system("$mail_path/$mailer -s \'$subject\' $mailto <<< \'$message\'");
+ run_command "$mail_path/$mailer -s \'$subject\' $mailto <<< \'$message\'";
}

sub _sendmail_send {
my ($subject, $message) = @_;
- system("echo -e \"Subject: $subject\n\n$message\" | $mail_path/sendmail -t $mailto");
+ run_command "echo \'Subject: $subject\n\n$message\' | $mail_path/sendmail -t $mailto";
}

sub find_mailer {
--
2.16.3

\
 
 \ /
  Last update: 2018-04-08 22:20    [W:0.146 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site