Received: by 10.213.65.68 with SMTP id h4csp84143imn; Fri, 6 Apr 2018 16:16:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx49i6gpn1SN94U4efz/kD7Y+yfitQcsPlk5uX5ErVjJFpKnahsVm7/RPKqdj+EmXwy3ZO8gI X-Received: by 10.98.165.8 with SMTP id v8mr17445856pfm.225.1523056568548; Fri, 06 Apr 2018 16:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523056568; cv=none; d=google.com; s=arc-20160816; b=diQ27DwjmP8OrJS/zaAaIDjAaa5Ry1+WWOviahdHUgQBEKoZRa6K7NRI2MaOejFLzq VXw9GGN2PbtGny13mY7JjtW+a5QPEYWYASlx+me7NRTo7nq445sjWe2w2OUDXTMRTojS CXaCLzs8MwAb6f25roLLkmB0cE4NTR7N0YZajUFUXRtGilIzFSrmvKBornzm6WwYLDh5 Fgr9h460UCqlnidqpvWRAsK/BcIbD72dYLBGNzgrqQn6uCZmy6loX4B6NwMYMVc4nxn3 fsQt3lLA1uy8JqPCsDGJlvIi2zHy3EqTVvCN/oqmPZDpubmZI+/jD1/TNFfYGiDnirOx VzHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject :dkim-signature:arc-authentication-results; bh=vXBXqmEZivB/I9+wtgHTUN8KMEpvJq89aMq3hlIpXw4=; b=nG2ttTCZfCXiVWX7/LdBMzq6abXC8pknNCkqgF6E0FHB7SBicqzje75GitCMVj/Awv RXaqfVh6ZBcTFbgHnxasm1RnDmlNizdbdYCg9cCU15yz8G4rPVhL8uPT/KP0iRVyFZXs bCApS7E2elSKt8hMcfcO4KMhr4353/l1yTyQHRo8zZzQNyCfeuro9x9ymf+BepesRPL+ woNNC3njT4uVHyQpg2Z/Ii9oHRCx96F08/U+qGGDxJWf7LEAvze2XR3MUmETVO5O1I9v rvn32TdKop+wzujvmp+iLRhjwR7ooZ/A2NlEGP4hslEqmORFfnnBHxKf5JAz5LA8iYVl 0vfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=OMY3dvM3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si7675738pgr.146.2018.04.06.16.15.31; Fri, 06 Apr 2018 16:16:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2017-10-26 header.b=OMY3dvM3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753075AbeDFXMb (ORCPT + 99 others); Fri, 6 Apr 2018 19:12:31 -0400 Received: from userp2130.oracle.com ([156.151.31.86]:49598 "EHLO userp2130.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751982AbeDFXMa (ORCPT ); Fri, 6 Apr 2018 19:12:30 -0400 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w36N4eww019324; Fri, 6 Apr 2018 23:12:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2017-10-26; bh=vXBXqmEZivB/I9+wtgHTUN8KMEpvJq89aMq3hlIpXw4=; b=OMY3dvM3nQA/9VncJRVE+C3BVlt3I7zZfdm3MOZn6erL6th4Hm61e6GF32IlvgDsvBce 8xESQd23guSRVQEcEBoeVXr+lrHNnddBRiwojr6YuM23994mjlXpY7Qy4ZVzhHwFJitS WoNbVXe2/dqoCUogOYv0PsII1To51kcCneySRmcNn7YhdqcENoCP8pqee7kSheTIzO+d A3+XeC7x5ZFEfs/d4e15yIMVugQNhNFZRiFj71Rn6FOcc1dctTwOASqhfYF58o5u7QL4 14X4KJxEPeGIw3CIx5sKq8Q01fTzFVVXti5GfG45Ycwh+hK9mIAd7R72zlEAl2s48xqQ pQ== Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp2130.oracle.com with ESMTP id 2h5k57y12t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 06 Apr 2018 23:12:28 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w36NCR3x020888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 6 Apr 2018 23:12:27 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id w36NCRAP002178; Fri, 6 Apr 2018 23:12:27 GMT Received: from [10.211.54.111] (/10.211.54.111) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 06 Apr 2018 16:12:26 -0700 Subject: Re: [PATCH v3 1/4] Ktest: add email support To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, dhaval.giani@oracle.com References: <1522094884-22718-1-git-send-email-tianyang.chen@oracle.com> <1522094884-22718-2-git-send-email-tianyang.chen@oracle.com> <20180406142409.6d98254b@gandalf.local.home> <20180406184130.6809805c@gandalf.local.home> From: Tim Tianyang Chen Organization: Oracle Corporation Message-ID: <81730b00-fcd9-3ccc-bb84-51f69e7364c9@oracle.com> Date: Fri, 6 Apr 2018 16:12:21 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180406184130.6809805c@gandalf.local.home> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8855 signatures=668698 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804060229 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > I just fixed them up and pulled them in myself. ;-) > > I also added the following on top of them (and testing this, live while > testing ftrace patches and other builds). Thanks Steve! > diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl > index 30a4c053f98b..837fa75cbb47 100755 > --- a/tools/testing/ktest/ktest.pl > +++ b/tools/testing/ktest/ktest.pl > @@ -23,7 +23,7 @@ my %evals; > > #default opts > my %default = ( > - "MAILER" => "sendmail", # default mailer > + "MAILER" => "sendmail", # default mailer Noticed this when I sent the new version. > "EMAIL_ON_ERROR" => 1, > "EMAIL_WHEN_FINISHED" => 1, > "EMAIL_WHEN_CANCELED" => 0, > @@ -218,6 +218,7 @@ my $dirname = $FindBin::Bin; > > my $mailto; > my $mailer; > +my $mail_exec; > my $email_on_error; > my $email_when_finished; > my $email_when_started; > @@ -1431,7 +1433,14 @@ sub do_not_reboot { > ($test_type eq "config_bisect" && $opt{"CONFIG_BISECT_TYPE[$i]"} eq "build"); > } > > +my $in_die = 0; > + > sub dodie { > + > + # avoid recusion > + return if ($in_die); > + $in_die = 1; > + > doprint "CRITICAL FAILURE... ", @_, "\n"; Good idea. > > my $i = $iteration; > @@ -4126,21 +4135,31 @@ sub set_test_option { > > sub _mailx_send { > my ($subject, $message) = @_; > - system("$mailer -s \'$subject\' $mailto <<< \'$message\'"); > + > + if (!defined($mail_exec)) { > + $mail_exec = $mailer; > + } > + run_command "$mail_exec -s \'$subject\' $mailto <<< \'$message\'"; > } > > sub _sendmail_send { > my ($subject, $message) = @_; > - system("echo -e \"Subject: $subject\n\n$message\" | sendmail -t $mailto"); > + > + if (!defined($mail_exec)) { > + $mail_exec = "/usr/sbin/sendmail"; > + } > + run_command "echo \'Subject: $subject\n\n$message\' | $mail_exec -t $mailto"; > } > Not sure if I understand why $mail_exec is necessary. Doesn't $mailer already have a default? Wouldn't people just use $mailer to define the executable they want to use? What if the $mailx_exec specified doesn't use '-t' option? Thanks, Tim